cmake_minimum_required(VERSION 3.9) project(dnapp) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3 -ggdb") set(SRCS src/main.cpp) add_executable(${PROJECT_NAME} ${SRCS}) if(MSVC) target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX) else() target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wpedantic -Werror) endif() # Google Test include(FetchContent) FetchContent_Declare( googletest URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip ) # For Windows: Prevent overriding the parent project's compiler/linker settings set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) enable_testing() add_executable( Sequence_test tests/Sequence_test.cpp ) target_link_libraries( Sequence_test GTest::gtest_main ) include(GoogleTest) gtest_discover_tests(Sequence_test)