2023-11-09 10:31:50 +01:00
|
|
|
cmake_minimum_required(VERSION 3.12)
|
|
|
|
project(dc)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2024-03-11 16:37:55 +01:00
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE Debug)
|
|
|
|
endif()
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} \
|
|
|
|
-Wall -Wextra -pedantic -Werror \
|
2023-11-09 10:31:50 +01:00
|
|
|
-fstack-protector-strong -D_FORTIFY_SOURCE=2 \
|
|
|
|
-Wformat-security -fsanitize=address -fsanitize=undefined \
|
|
|
|
-fstack-clash-protection -Wundef -Wshadow -Wpointer-arith \
|
2024-03-11 16:37:55 +01:00
|
|
|
-Wcast-align -Wwrite-strings -ftrapv -std=c++20 -g -O2")
|
|
|
|
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -std=c++20")
|
2023-11-09 10:31:50 +01:00
|
|
|
|
|
|
|
add_executable(dc main.cpp)
|
|
|
|
include_directories(src)
|
2024-03-11 16:37:55 +01:00
|
|
|
|
2023-11-09 10:31:50 +01:00
|
|
|
add_subdirectory(src)
|
|
|
|
|
2024-03-11 16:37:55 +01:00
|
|
|
target_link_libraries(dc src)
|