-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (31 loc) · 970 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
cmake_minimum_required(VERSION 3.29.0)
project(AsChip8 VERSION 0.5 LANGUAGES CXX)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
option(USE_CLANG_TIDY OFF)
if(USE_CLANG_TIDY)
find_program(FOUND_CLANG_TIDY clang-tidy)
if(FOUND_CLANG_TIDY)
message(STATUS "Enabling clang-tidy")
set (CMAKE_CXX_CLANG_TIDY clang-tidy;
-checks=-*,cppcoreguidelines-*;
-warnings-as-errors=*;
)
else()
message(STATUS "Didn't find clang-tidy")
endif()
endif()
option(USE_CPPCHECK OFF)
if(USE_CPPCHECK)
find_program(FOUND_CPPCHECK cppcheck)
if(FOUND_CPPCHECK)
message(STATUS "Enabling cppcheck")
set (CMAKE_CXX_CPPCHECK "${FOUND_CPPCHECK};--enable=all;--force;--std=c++20;--suppress=missingIncludeSystem")
else()
message(STATUS "Didn't find cppcheck")
endif()
endif()
add_subdirectory(code)