2021-03-14 21:13:29 -04:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
project(main)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
|
|
|
2021-05-01 17:30:05 -04:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
|
2021-03-14 21:13:29 -04:00
|
|
|
|
|
|
|
include_directories(src)
|
|
|
|
add_definitions(-g)
|
2021-07-31 22:58:02 -04:00
|
|
|
add_definitions(-p)
|
|
|
|
# add_definitions(-s)
|
|
|
|
# add_definitions(-fsanitize=address)
|
2021-03-14 21:13:29 -04:00
|
|
|
|
|
|
|
file(GLOB SOURCES "src/*.cpp" "src/**/*.cpp")
|
|
|
|
|
|
|
|
add_executable(${CMAKE_PROJECT_NAME} ${SOURCES})
|
|
|
|
target_link_libraries(${CMAKE_PROJECT_NAME} X11 GL pthread png stdc++fs)
|
|
|
|
target_link_options(${CMAKE_PROJECT_NAME} PRIVATE -fsanitize=address)
|