-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (29 loc) · 1.33 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
cmake_minimum_required(VERSION 3.10)
project(BCH_code)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ..)
set(BCH_SOURCE
main.cpp
bch_simulator.cpp
bch_utils.cpp
bch_math.cpp
bch_logger.hpp)
add_executable(bch_simulator ${BCH_SOURCE})
# Set warning level and warning flags
target_compile_options(bch_simulator PRIVATE
-Wall # Enable all commonly used warnings
-Wextra # Enable extra warnings
-Wpedantic # Enable strict ISO C++ compliance
-Werror # Treat all warnings as errors
-Wconversion # Warn on implicit type conversions
-Wsign-conversion # Warn on sign conversion
-Wformat=2 # Check format string arguments
-Wshadow # Warn when a local variable shadows another
-Wundef # Warn if a preprocessor directive evaluates to undefined
-Wnull-dereference # Warn on potential null pointer dereference
-Wdouble-promotion # Warn on implicit float/double promotion
-Wformat-signedness # Warn on format string mismatches for signed/unsigned types
-Wcast-align # Warn on pointer casting that may result in incorrect alignment
)