Skip to content

Commit

Permalink
Set gtest to link to dynamic CRT on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtrevelyan committed Nov 27, 2023
1 parent eeeb3ee commit a2f0d76
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmake/Testing.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
option(RTNEURAL_TEST_REPORTS "Output test reports to XML files" OFF)

macro(rtneural_setup_testing)

include(CTest)
enable_testing()
add_custom_target(rtneural_test COMMAND ctest -C ${Configuration} --output-on-failure)

# From the GoogleTest README:
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
CPMAddPackage("gh:google/[email protected]")

endmacro()

function(rtneural_add_test)
Expand Down

0 comments on commit a2f0d76

Please sign in to comment.