-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (42 loc) · 1.02 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
cmake_minimum_required(VERSION 3.20.0)
project(lorem-gen VERSION 0.1.0 LANGUAGES CXX)
message("Test: ${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(NOT CMAKE_CXX_EXTENSIONS)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
add_compile_options(
-std=c++20
-Werror
-pedantic-errors
-Wall
-Wextra
-Wpedantic
-Wcast-align
-Wcast-qual
-Wconversion
-Wctor-dtor-privacy
-Wduplicated-branches
-Wduplicated-cond
-Wextra-semi
-Wfloat-equal
-Wlogical-op
-Wnon-virtual-dtor
-Wold-style-cast
-Woverloaded-virtual
-Wredundant-decls
-Wsign-conversion
-Wsign-promo
-Wshadow
-Wformat=2
-Wundef
-Wswitch-default
-Wswitch-enum
)
file(GLOB source_folder CONFIGURE_DEPENDS "source/*.cpp")
add_executable(lorem-gen main.cpp ${source_folder})
target_include_directories(lorem-gen PUBLIC "${PROJECT_SOURCE_DIR}/include")
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)