forked from catchorg/Clara
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
31 lines (23 loc) · 947 Bytes
/
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
cmake_minimum_required(VERSION 3.6.2)
project(Clara)
set(SOURCE_FILES src/main.cpp src/ClaraTests.cpp src/Surrogate.cpp include/clara.hpp)
include_directories( include third_party )
add_executable(ClaraTests ${SOURCE_FILES})
set_property(TARGET ClaraTests PROPERTY CXX_STANDARD 11)
set_property(TARGET ClaraTests PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ClaraTests PROPERTY CXX_EXTENSIONS OFF)
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" )
target_compile_options( ClaraTests PRIVATE -Wall -Wextra )
endif()
if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
target_compile_options( ClaraTests PRIVATE /W4 /WX )
endif()
if (ENABLE_COVERAGE)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake")
find_package(codecov)
add_coverage(ClaraTests)
list(APPEND LCOV_REMOVE_PATTERNS "/usr/")
coverage_evaluate()
endif()
include(CTest)
add_test(NAME RunTests COMMAND $<TARGET_FILE:ClaraTests>)