From 949d23481c03099acf6682c64707ea5a034a80b3 Mon Sep 17 00:00:00 2001 From: Dmytro Vyazelenko <696855+vyazelenko@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:24:42 +0100 Subject: [PATCH] [C] Add missing JVM options to allow generating codes. --- sbe-benchmarks/src/main/cpp/CMakeLists.txt | 2 +- sbe-samples/src/main/cpp/CMakeLists.txt | 2 +- sbe-tool/src/main/cpp/CMakeLists.txt | 2 +- sbe-tool/src/test/c/CMakeLists.txt | 2 +- sbe-tool/src/test/cpp/CMakeLists.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sbe-benchmarks/src/main/cpp/CMakeLists.txt b/sbe-benchmarks/src/main/cpp/CMakeLists.txt index 085e8bf224..055ea4f63a 100644 --- a/sbe-benchmarks/src/main/cpp/CMakeLists.txt +++ b/sbe-benchmarks/src/main/cpp/CMakeLists.txt @@ -39,7 +39,7 @@ set(SBE_MD_SCHEMA ${CODEC_PERF_SCHEMA_DIR}/fix-message-samples.xml) add_custom_command( OUTPUT ${GENERATED_CODECS} DEPENDS ${SBE_CAR_SCHEMA} ${SBE_MD_SCHEMA} sbe-jar ${SBE_JAR} - COMMAND ${Java_JAVA_EXECUTABLE} -Dsbe.output.dir=${CXX_CODEC_TARGET_DIR} -Dsbe.target.language="cpp" -jar ${SBE_JAR} ${SBE_CAR_SCHEMA} ${SBE_MD_SCHEMA} + COMMAND ${Java_JAVA_EXECUTABLE} --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dsbe.output.dir=${CXX_CODEC_TARGET_DIR} -Dsbe.target.language="cpp" -jar ${SBE_JAR} ${SBE_CAR_SCHEMA} ${SBE_MD_SCHEMA} ) add_custom_target(perf_codecs DEPENDS ${GENERATED_CODECS}) diff --git a/sbe-samples/src/main/cpp/CMakeLists.txt b/sbe-samples/src/main/cpp/CMakeLists.txt index dd6a5f0b32..2e0a6c8d16 100644 --- a/sbe-samples/src/main/cpp/CMakeLists.txt +++ b/sbe-samples/src/main/cpp/CMakeLists.txt @@ -24,7 +24,7 @@ set(EXAMPLES_SCHEMA ${CODEC_EXAMPLES_SCHEMA_DIR}/example-schema.xml) add_custom_command( OUTPUT ${GENERATED_CODECS} DEPENDS ${EXAMPLES_SCHEMA} sbe-jar ${SBE_JAR} - COMMAND ${Java_JAVA_EXECUTABLE} -Dsbe.output.dir=${CXX_CODEC_TARGET_DIR} -Dsbe.generate.ir=true -Dsbe.target.language=cpp -Dsbe.xinclude.aware=true -jar ${SBE_JAR} ${EXAMPLES_SCHEMA} + COMMAND ${Java_JAVA_EXECUTABLE} --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dsbe.output.dir=${CXX_CODEC_TARGET_DIR} -Dsbe.generate.ir=true -Dsbe.target.language=cpp -Dsbe.xinclude.aware=true -jar ${SBE_JAR} ${EXAMPLES_SCHEMA} ) add_custom_target(examples_codecs DEPENDS ${GENERATED_CODECS}) diff --git a/sbe-tool/src/main/cpp/CMakeLists.txt b/sbe-tool/src/main/cpp/CMakeLists.txt index c79be7c58a..abb1f83a49 100644 --- a/sbe-tool/src/main/cpp/CMakeLists.txt +++ b/sbe-tool/src/main/cpp/CMakeLists.txt @@ -28,7 +28,7 @@ find_package(Java REQUIRED) add_custom_command(OUTPUT ${CODECS} COMMAND - ${Java_JAVA_EXECUTABLE} + ${Java_JAVA_EXECUTABLE} --add-opens java.base/jdk.internal.misc=ALL-UNNAMED "-Dsbe.output.dir=${CMAKE_CURRENT_SOURCE_DIR}" "-Dsbe.target.language=CPP" "-jar" "${SBE_JAR}" diff --git a/sbe-tool/src/test/c/CMakeLists.txt b/sbe-tool/src/test/c/CMakeLists.txt index e8ea222cf7..33169a501d 100644 --- a/sbe-tool/src/test/c/CMakeLists.txt +++ b/sbe-tool/src/test/c/CMakeLists.txt @@ -46,7 +46,7 @@ add_custom_command( OUTPUT ${GENERATED_CODECS} DEPENDS sbe-jar ${SBE_JAR} ${CODE_GENERATION_SCHEMA} ${CODE_GENERATION_SCHEMA_WITH_VERSION} ${GROUP_WITH_DATA_SCHEMA} ${ISSUE889_SCHEMA} COMMAND - ${Java_JAVA_EXECUTABLE} + ${Java_JAVA_EXECUTABLE} --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dsbe.output.dir=${C_CODEC_TARGET_DIR} -Dsbe.target.language="C" -jar ${SBE_JAR} diff --git a/sbe-tool/src/test/cpp/CMakeLists.txt b/sbe-tool/src/test/cpp/CMakeLists.txt index b3271dade0..ee09f3881e 100644 --- a/sbe-tool/src/test/cpp/CMakeLists.txt +++ b/sbe-tool/src/test/cpp/CMakeLists.txt @@ -61,7 +61,7 @@ add_custom_command( ${ACCESS_ORDER_SCHEMA} sbe-jar ${SBE_JAR} COMMAND - ${Java_JAVA_EXECUTABLE} + ${Java_JAVA_EXECUTABLE} --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dsbe.output.dir=${CXX_CODEC_TARGET_DIR} -Dsbe.generate.ir="true" -Dsbe.target.language="cpp"