@@ -34,24 +34,24 @@ function(add_cppinterop_unittest name)
3434 add_dependencies (CppInterOpUnitTests ${name} )
3535 target_include_directories (${name} PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${GTEST_INCLUDE_DIR} )
3636 set_property (TARGET ${name} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
37- if (WIN32 )
38- target_link_libraries (${name} PUBLIC ${ARG_LIBRARIES} ${gtest_libs} )
39- set_property (TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS "${MSVC_EXPORTS} " )
40- else ()
41- target_link_libraries (${name} PRIVATE ${ARG_LIBRARIES} ${gtest_libs} ${link_pthreads_lib} )
42- endif ()
43- if (EMSCRIPTEN)
44- # Without this cmake will try and get node to run the html file.
45- # This guarantees that it runs the js file, and uses emsdks node.
46- add_test (NAME cppinterop-${name} COMMAND $ENV{EMSDK_NODE} ${name} .js)
47- else ()
48- add_test (NAME cppinterop-${name} COMMAND ${name} )
49- endif ()
37+ if (WIN32 )
38+ target_link_libraries (${name} PUBLIC ${ARG_LIBRARIES} ${gtest_libs} )
39+ set_property (TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS "${MSVC_EXPORTS} " )
40+ else ()
41+ target_link_libraries (${name} PRIVATE ${ARG_LIBRARIES} ${gtest_libs} ${link_pthreads_lib} )
42+ endif ()
43+ if (EMSCRIPTEN)
44+ # Without this cmake will try and get node to run the html file.
45+ # This guarantees that it runs the js file, and uses emsdks node.
46+ add_test (NAME cppinterop-${name} COMMAND $ENV{EMSDK_NODE} ${name} .js)
47+ else ()
48+ add_test (NAME cppinterop-${name} COMMAND ${name} )
49+ endif ()
5050 set_tests_properties (cppinterop-${name} PROPERTIES
51- TIMEOUT "${TIMEOUT_VALUE} "
52- ENVIRONMENT "CPLUS_INCLUDE_PATH=${CMAKE_BINARY_DIR} /etc"
53- LABELS
54- DEPENDS )
51+ TIMEOUT "${TIMEOUT_VALUE} "
52+ ENVIRONMENT "CPLUS_INCLUDE_PATH=${CMAKE_BINARY_DIR} /etc"
53+ LABELS
54+ DEPENDS )
5555 # FIXME: Just call gtest_add_tests this function is available.
5656 #gtest_add_tests(${name} "${Arguments}" AUTO)
5757endfunction ()
0 commit comments