We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fdfe1f commit 0699cafCopy full SHA for 0699caf
src/CMakeLists.txt
@@ -120,7 +120,16 @@ target_include_directories( test_cpputils2
120
${CMAKE_CURRENT_SOURCE_DIR}/source
121
${CMAKE_CURRENT_SOURCE_DIR}/include
122
)
123
-target_link_libraries(test_cpputils2 PRIVATE GTest::gtest_main rt spdlog::spdlog)
+
124
+set(TEST_LIBS GTest::gtest GTest::gtest_main spdlog::spdlog)
125
126
+if (WIN32)
127
+ list(APPEND TEST_LIBS ws2_32)
128
+else()
129
+ list(APPEND TEST_LIBS rt)
130
+endif()
131
132
+target_link_libraries(test_cpputils2 PRIVATE cpputils2 ${TEST_LIBS})
133
include(CTest)
134
135
#add_test(CppUtils2Test test_cpputils2 --gtest_output=xml)
0 commit comments