added compiler flags

This commit is contained in:
Pagwin 2024-07-16 20:35:49 -04:00
parent 0d3336f80c
commit f20bed8a52
No known key found for this signature in database
GPG key ID: 81137023740CA260

View file

@ -11,6 +11,11 @@ project(project_name_here
# setting this so compile_commands.json is generated for clangd
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
# allowances for debugging
set(CMAKE_CXX_FLAGS_DEBUG "-g")
# generally useful
set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wfloat-equal -Wundef -Wpointer-arith -Wcast-align -Wstrict-overflow=2 -Wunreachable-code")
# for convenience if they're needed
#find_package(Boost REQUIRED)
#find_package(fmt REQUIRED)