Files
sandbox/CMakeLists.txt
torsten 684ad1cd3a
sandbox/pipeline/pr-main There was a failure building this commit
Add minimal C++ example and pass PR policy checks
2026-08-04 19:57:01 +02:00

24 lines
587 B
CMake

cmake_minimum_required(VERSION 3.20)
project(sandbox LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_executable(sandbox main.cpp)
enable_testing()
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
add_executable(test_main tests/test_main.cpp)
target_link_libraries(test_main GTest::gtest_main)
include(GoogleTest)
gtest_discover_tests(test_main)