mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-03-30 23:57:58 +08:00
34 lines
789 B
CMake
34 lines
789 B
CMake
cmake_minimum_required(VERSION 3.16)
|
|
project(ON_Test)
|
|
|
|
# GoogleTest requires at least C++14
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
#set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
|
#set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
|
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
googletest
|
|
URL https://github.com/google/googletest/archive/b10fad38c4026a29ea6561ab15fc4818170d1c10.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(
|
|
hello_test
|
|
hello_test.cpp
|
|
)
|
|
|
|
target_link_libraries(
|
|
hello_test
|
|
GTest::gtest_main
|
|
OpenNURBS
|
|
)
|
|
|
|
include(GoogleTest)
|
|
gtest_discover_tests(hello_test) |