Pascal Serrarens 07f78105aa Add 'ControlCore/' from commit '0a57e6d99abadc3257c6b1fdf5880b993e0d0fcb'
git-subtree-dir: ControlCore
git-subtree-mainline: 2b5f5a58ac608aca3aad452a87f6cb27f428cbde
git-subtree-split: 0a57e6d99abadc3257c6b1fdf5880b993e0d0fcb
2024-12-28 11:01:12 +01:00

37 lines
793 B
CMake

cmake_minimum_required(VERSION 3.13) # CMake version check
Project(ControlCoreTest)
set(CMAKE_CXX_STANDARD 11) # Enable c++11 standard
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_compile_definitions(GTEST)
include(FetchContent)
FetchContent_Declare(
googletest
DOWNLOAD_EXTRACT_TIMESTAMP ON
URL https://github.com/google/googletest/archive/refs/heads/main.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
include_directories(
.
..
)
enable_testing()
add_executable(
ControlCoreTest
"dummy_test.cc"
)
target_link_libraries(
ControlCoreTest
gtest_main
)
include(GoogleTest)
gtest_discover_tests(ControlCoreTest)