From c5365a5fa0eba682a8e2ce04a5d0bad5daec9945 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Wed, 5 Feb 2025 10:38:22 +0800 Subject: [PATCH] update --- .gitignore | 1 + 2/day1.md | 0 CMakeLists.txt | 27 +++++++++++++++++++++++++++ src/2/day1.md | 1 + 4 files changed, 29 insertions(+) create mode 100644 .gitignore delete mode 100644 2/day1.md create mode 100644 CMakeLists.txt create mode 100644 src/2/day1.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/2/day1.md b/2/day1.md deleted file mode 100644 index e69de29..0000000 diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3439ab4 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.15) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +add_compile_options(-Wall) + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Debug) +endif() + +message("Build type is [${CMAKE_BUILD_TYPE}]") + + +project(alg2025) + +include_directories(${CMAKE_CURRENT_LIST_DIR}/src/include) + +file(GLOB_RECURSE SRC_LIST CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp) + +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() diff --git a/src/2/day1.md b/src/2/day1.md new file mode 100644 index 0000000..284a0a5 --- /dev/null +++ b/src/2/day1.md @@ -0,0 +1 @@ +GCD CRT \ No newline at end of file