2024-10-01 03:00:53 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
2024-10-01 03:11:04 +00:00
|
|
|
add_compile_options(-Wall)
|
|
|
|
|
2024-10-01 09:35:03 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2024-10-01 03:14:42 +00:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
2024-10-01 13:08:27 +00:00
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
2024-10-01 03:14:42 +00:00
|
|
|
|
2024-10-01 13:08:27 +00:00
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
2024-10-03 15:29:49 +00:00
|
|
|
set(CMAKE_BUILD_TYPE Debug)
|
2024-10-01 03:11:04 +00:00
|
|
|
endif()
|
2024-10-03 15:29:49 +00:00
|
|
|
|
2024-10-01 13:08:27 +00:00
|
|
|
message("Build type is [${CMAKE_BUILD_TYPE}]")
|
2024-10-01 03:11:04 +00:00
|
|
|
|
2024-10-01 03:00:53 +00:00
|
|
|
|
2024-10-02 04:38:05 +00:00
|
|
|
project(algorithm_2024)
|
2024-10-01 03:00:53 +00:00
|
|
|
|
2024-10-08 01:51:15 +00:00
|
|
|
include_directories(${CMAKE_CURRENT_LIST_DIR}/src/include)
|
|
|
|
|
2024-10-05 05:24:08 +00:00
|
|
|
file(GLOB_RECURSE SRC_LIST CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp)
|
2024-10-01 09:35:03 +00:00
|
|
|
|
2024-10-05 05:24:08 +00:00
|
|
|
foreach(SRC IN LISTS SRC_LIST)
|
|
|
|
get_filename_component(SRC_NAME_WE ${SRC} NAME_WE)
|
|
|
|
message("[${SRC}] will be build to [${SRC_NAME_WE}]")
|
|
|
|
add_executable(${SRC_NAME_WE} ${SRC})
|
|
|
|
endforeach()
|