-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
37 lines (30 loc) · 954 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
32
33
34
35
36
37
cmake_minimum_required(VERSION 3.14)
project(ChessNGin
VERSION 0.1
LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
if(CMAKE_BUILD_TYPE MATCHES Debug)
if(MSVC)
#/WX
add_compile_options(/W4)
else()
# Flags to be added once refactor is done
#-Werror
add_compile_options(-Wno-unused-parameter)
# Code Coverage - download and append compiler flags
file(DOWNLOAD
https://raw.githubusercontent.com/bilke/cmake-modules/master/CodeCoverage.cmake
${CMAKE_SOURCE_DIR}/cmake/CodeCoverage.cmake
SHOW_PROGRESS
)
include(CodeCoverage)
append_coverage_compiler_flags()
endif()
endif()
if(CMAKE_PROJECT_NAME STREQUAL ChessNGin AND BUILD_TESTING)
message(STATUS "Testing enabled")
enable_testing()
add_subdirectory(tests)
endif()
add_subdirectory(src)