generated from aselimov/cpp_project_template
Guard testing code to avoid problems when including using FetchContent.MakeAvailable
This commit is contained in:
parent
6775d995d7
commit
85bbc2e1dd
@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.9)
|
||||
set(NAME "Vec3")
|
||||
project(${NAME})
|
||||
|
||||
enable_testing()
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
add_compile_options(-Wall -Wextra -Wpedantic)
|
||||
@ -11,6 +10,9 @@ set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
include_directories(include)
|
||||
add_subdirectory(include)
|
||||
|
||||
if (PROJECT_IS_TOP_LEVEL)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
|
||||
# Doxygen Build
|
||||
@ -36,3 +38,4 @@ if(DOXYGEN_FOUND)
|
||||
else(DOXYGEN_FOUND)
|
||||
message("Doxygen needs to be installed to generate the documentation.")
|
||||
endif(DOXYGEN_FOUND)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user