36 lines
1.3 KiB
CMake
36 lines
1.3 KiB
CMake
cmake_minimum_required(VERSION 3.31)
|
|
project(atm_admin_program)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
add_executable(${CMAKE_PROJECT_NAME}
|
|
src/main.cpp
|
|
src/AtmAdmin.cpp
|
|
src/XMLStorage.cpp
|
|
)
|
|
|
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/data
|
|
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
|
|
)
|
|
|
|
find_package(pugixml CONFIG REQUIRED)
|
|
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE libs)
|
|
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE pugixml::static pugixml::pugixml)
|
|
|
|
target_compile_options(${PROJECT_NAME} PRIVATE
|
|
# Make all warnings into errors
|
|
-Werror
|
|
|
|
# Basic warning flags
|
|
-Wall # Enable all common warnings
|
|
-Wextra # Enable extra warnings not covered by -Wall
|
|
-Wpedantic # Issue warnings demanded by strict ISO C and ISO C++
|
|
-pedantic-errors # Like -Wpedantic but errors instead of warnings
|
|
|
|
# Specific warning categories
|
|
-Wshadow # Warn when a variable declaration shadows another
|
|
-Wcast-align # Warn for potential performance problems from memory alignment
|
|
-Wconversion # Warn on type conversions that may lose data
|
|
-Wsign-conversion # Warn on sign conversions
|
|
-Wnull-dereference # Warn about null pointer dereference
|
|
) |