fixed clr testing

This commit is contained in:
Charlton, Scott R 2021-05-05 14:17:00 -06:00
parent fbddcf3789
commit af20075233
2 changed files with 14 additions and 0 deletions

View File

@ -16,6 +16,11 @@ gtest_discover_tests(TestIPhreeqcLib)
add_executable(TestIPhreeqc TestIPhreeqc.cpp FileTest.cpp)
target_link_libraries(TestIPhreeqc IPhreeqc gtest gtest_main)
if (MSVC AND BUILD_SHARED_LIBS AND BUILD_CLR_LIBS)
# Setup references for /CLR
set_target_properties(TestIPhreeqc PROPERTIES VS_DOTNET_REFERENCES "${CMAKE_CURRENT_SOURCE_DIR}/../src/phreeqcpp/ZedGraph.dll")
endif()
gtest_discover_tests(TestIPhreeqc)
add_executable(TestSelectedOutput TestSelectedOutput.cpp)

View File

@ -33,6 +33,11 @@ SET(EXTRA_LIBS ${EXTRA_LIBS} IPhreeqc)
# link
target_link_libraries(test_c ${EXTRA_LIBS})
if (MSVC AND BUILD_SHARED_LIBS AND BUILD_CLR_LIBS)
# Setup references for /CLR
set_target_properties(test_c PROPERTIES VS_DOTNET_REFERENCES "${CMAKE_CURRENT_SOURCE_DIR}/../src/phreeqcpp/ZedGraph.dll")
endif()
# test compile and run
add_test(TestCompileAndRunC test_c)
@ -63,6 +68,10 @@ SET(EXTRA_LIBS ${EXTRA_LIBS} IPhreeqc)
# link
target_link_libraries(test_cxx ${EXTRA_LIBS})
if (MSVC AND BUILD_SHARED_LIBS AND BUILD_CLR_LIBS)
# Setup references for /CLR
set_target_properties(test_cxx PROPERTIES VS_DOTNET_REFERENCES "${CMAKE_CURRENT_SOURCE_DIR}/../src/phreeqcpp/ZedGraph.dll")
endif()
# test compile and run
add_test(TestCompileAndRunCXX test_cxx)