Skip to content

Commit 444c081

Browse files
authored
Apply PR suggestions
1 parent 2484e20 commit 444c081

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,6 @@ option(CPPINTEROP_INCLUDE_DOCS "Generate build targets for the CppInterOp docs."
451451
option(CPPINTEROP_ENABLE_DOXYGEN "Use doxygen to generate CppInterOp interal API documentation.")
452452
option(CPPINTEROP_ENABLE_SPHINX "Use sphinx to generage CppInterOp user documentation")
453453

454-
option(CPPINTEROP_ENABLE_TESTING "Enables the testing infrastructure." ON)
455454

456455
if(MSVC)
457456

lib/Interpreter/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,12 @@ if(EMSCRIPTEN)
132132
NO_SONAME 1
133133
LINK_FLAGS "-s WASM_BIGINT -s SIDE_MODULE=1 ${SYMBOLS_LIST}"
134134
)
135-
# When compiling Emscripten tests the shared library it links to is expected to be in the same folder as the compiled Javascript
136-
add_custom_command(TARGET clangCppInterOp POST_BUILD
137-
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:clangCppInterOp> ${CMAKE_BINARY_DIR}/unittests/CppInterOp/
138-
)
135+
if (CPPINTEROP_ENABLE_TESTING)
136+
# When compiling Emscripten tests the shared library it links to is expected to be in the same folder as the compiled Javascript
137+
add_custom_command(TARGET clangCppInterOp POST_BUILD
138+
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:clangCppInterOp> ${CMAKE_BINARY_DIR}/unittests/CppInterOp/
139+
)
140+
endif(CPPINTEROP_ENABLE_TESTING)
139141
endif()
140142

141143
string(REPLACE ";" "\;" _VER CPPINTEROP_VERSION)

unittests/CppInterOp/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ if(EMSCRIPTEN)
3434
# Without ALLOW_MEMORY_GROWTH=1 tests will fail with aborted(OOM). Approach to fix taken from answers to
3535
# https://stackoverflow.com/questions/67222200/runtimeerror-abortoom-build-with-s-assertions-1-for-more-info
3636
set_target_properties(CppInterOpTests PROPERTIES
37-
COMPILE_FLAGS "-s MAIN_MODULE=1"
3837
LINK_FLAGS "-s MAIN_MODULE=1 -s WASM_BIGINT -s EXPORTED_RUNTIME_METHODS='[\"FS\",\"PATH\",\"LDSO\",\"loadDynamicLibrary\",\"ERRNO_CODES\"]' --preload-file ${SYSROOT_PATH}/include@/include -s ALLOW_MEMORY_GROWTH=1"
3938
)
4039
endif()
@@ -79,7 +78,6 @@ if(EMSCRIPTEN)
7978
# Without ALLOW_MEMORY_GROWTH=1 tests will fail with aborted(OOM). Approach to fix taken from answers to
8079
# https://stackoverflow.com/questions/67222200/runtimeerror-abortoom-build-with-s-assertions-1-for-more-info
8180
set_target_properties(DynamicLibraryManagerTests PROPERTIES
82-
COMPILE_FLAGS "-s MAIN_MODULE=1"
8381
LINK_FLAGS "-s MAIN_MODULE=1 -s WASM_BIGINT -s EXPORTED_RUNTIME_METHODS='[\"FS\",\"PATH\",\"LDSO\",\"loadDynamicLibrary\",\"ERRNO_CODES\"]' --preload-file ${SYSROOT_PATH}/include@/include -s ALLOW_MEMORY_GROWTH=1"
8482
)
8583
endif()

0 commit comments

Comments
 (0)