File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,8 @@ target_link_libraries(scratchcpp PRIVATE utf8cpp)
2525target_link_libraries (scratchcpp PRIVATE zip)
2626
2727target_compile_definitions (scratchcpp PRIVATE LIBSCRATCHCPP_LIBRARY)
28+
29+ set (BUILD_TESTING TRUE )
30+ if (BUILD_TESTING)
31+ add_subdirectory (test )
32+ endif ()
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.14)
2+ project (my_project)
3+
4+ set (CMAKE_CXX_STANDARD 17)
5+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
6+
7+ set (GTEST_DIR thirdparty/googletest)
8+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /../${GTEST_DIR} ${CMAKE_CURRENT_BINARY_DIR} /${GTEST_DIR} )
9+
10+ # For Windows: Prevent overriding the parent project's compiler/linker settings
11+ set (gtest_force_shared_crt ON CACHE BOOL "" FORCE)
12+
13+ enable_testing ()
14+
15+ include (GoogleTest)
You can’t perform that action at this time.
0 commit comments