-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (28 loc) · 1.03 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.0)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
project("CppProject")
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
set( APP_TARGET "macosx" )
set( APP_MACOSX TRUE )
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux" )
set( APP_TARGET "linux" )
set( APP_LINUX TRUE )
elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" )
set( APP_TARGET "msw" )
set( APP_MSW TRUE )
else()
message( FATAL_ERROR "APP_TARGET not defined, and no default for platform '${CMAKE_SYSTEM_NAME}.'" )
endif()
message("-- App is set to ${APP_TARGET}.")
if(NOT APP_MSW)
enable_testing()
endif()
set(CATCH_INCLUDE_DIR dependencies/catch/single_include CACHE INTERNAL "Path to include folder for Catch")
#setup Catch cpp testing framework
add_library(Catch INTERFACE)
target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR})
#setup docs
#doc targets are the projectname prefixed with "doc", this is autmatically generated
add_custom_target(doc DEPENDS docAProject)
#include all projects
add_subdirectory(AProject)