RoboidControl-cpp/test/CMakeLists.txt
2024-01-16 17:10:51 +01:00

38 lines
814 B
CMake

cmake_minimum_required(VERSION 3.13) # CMake version check
Project(RoboidControlTestNew)
set(CMAKE_CXX_STANDARD 11) # Enable c++11 standard
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_compile_definitions(GTEST)
include(FetchContent)
FetchContent_Declare(
googletest
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(
RoboidControlTestNew
"BB2B_test.cc"
)
target_link_libraries(
RoboidControlTestNew
gtest_main
RoboidControl
VectorAlgebra
)
include(GoogleTest)
gtest_discover_tests(RoboidControlTestNew)