diff options
| author | Egor Tensin <egor@tensin.name> | 2026-05-19 18:23:41 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-05-19 18:28:10 +0200 |
| commit | 42fa68551ed52823bacaeedc8dd85fec66c49d75 (patch) | |
| tree | b87e13fcdb9c81d34ec51326df18e996603187dd | |
| parent | Makefile: synchronize Boost version with workflows/ci (diff) | |
| download | math-server-42fa68551ed52823bacaeedc8dd85fec66c49d75.tar.gz math-server-42fa68551ed52823bacaeedc8dd85fec66c49d75.zip | |
cmake: upgrade minimum version
| -rw-r--r-- | CMakeLists.txt | 5 | ||||
| -rw-r--r-- | client/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | client/Dockerfile | 2 | ||||
| -rw-r--r-- | server/Dockerfile | 2 | ||||
| -rw-r--r-- | server/lexer/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | server/main/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | test/benchmarks/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | test/unit_tests/CMakeLists.txt | 2 |
8 files changed, 11 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3fb358a..a7a7e02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,7 @@ -cmake_minimum_required(VERSION 3.8) +# oldstable as of May '26. +# Plus, I'm pretty sure it's required for things like CONFIGURE_DEPENDS and +# CMAKE_MSVC_RUNTIME_LIBRARY and stuff. +cmake_minimum_required(VERSION 3.25) project(math_server CXX) enable_testing() diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index ea62308..da9c804 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -3,7 +3,7 @@ set(CMAKE_THREAD_PREFER_PTHREAD ON) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) -file(GLOB client_src "*.cpp" "*.hpp") +file(GLOB client_src CONFIGURE_DEPENDS "*.cpp" "*.hpp") add_executable(client ${client_src}) set_target_properties(client PROPERTIES OUTPUT_NAME math-client) target_link_libraries(client PRIVATE Threads::Threads) diff --git a/client/Dockerfile b/client/Dockerfile index b2830c7..41c0419 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,7 +1,7 @@ # To build, run from the top-level directory: # docker build -f client/Dockerfile -t egortensin/math-client . -FROM alpine:3.17 AS base +FROM alpine:3.18 AS base ARG src_dir=/usr/src/math-server diff --git a/server/Dockerfile b/server/Dockerfile index ae9fbc5..376cd76 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,7 +1,7 @@ # To build, run from the top-level directory: # docker build -f server/Dockerfile -t egortensin/math-server . -FROM alpine:3.17 AS base +FROM alpine:3.18 AS base ARG src_dir=/usr/src/math-server diff --git a/server/lexer/CMakeLists.txt b/server/lexer/CMakeLists.txt index 1f053a6..9ac332c 100644 --- a/server/lexer/CMakeLists.txt +++ b/server/lexer/CMakeLists.txt @@ -1,6 +1,6 @@ find_package(Boost REQUIRED COMPONENTS regex) -file(GLOB_RECURSE lexer_src "*.cpp" "*.hpp") +file(GLOB_RECURSE lexer_src CONFIGURE_DEPENDS "*.cpp" "*.hpp") add_library(lexer ${lexer_src}) target_include_directories(lexer PUBLIC ..) target_link_libraries(lexer PUBLIC common) diff --git a/server/main/CMakeLists.txt b/server/main/CMakeLists.txt index 6260275..3a23acf 100644 --- a/server/main/CMakeLists.txt +++ b/server/main/CMakeLists.txt @@ -5,7 +5,7 @@ find_package(Threads REQUIRED) option(DEBUG_ASIO "enable debug output for Boost.Asio" OFF) -file(GLOB server_src "*.cpp" "*.hpp") +file(GLOB server_src CONFIGURE_DEPENDS "*.cpp" "*.hpp") add_executable(server ${server_src}) set_target_properties(server PROPERTIES OUTPUT_NAME math-server) if(DEBUG_ASIO) diff --git a/test/benchmarks/CMakeLists.txt b/test/benchmarks/CMakeLists.txt index 8a55d41..37b96d7 100644 --- a/test/benchmarks/CMakeLists.txt +++ b/test/benchmarks/CMakeLists.txt @@ -1,4 +1,4 @@ -file(GLOB benchmarks_src "*.cpp") +file(GLOB benchmarks_src CONFIGURE_DEPENDS "*.cpp") add_executable(benchmarks ${benchmarks_src}) set_target_properties(benchmarks PROPERTIES OUTPUT_NAME math-server-benchmarks) target_link_libraries(benchmarks PRIVATE lexer) diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt index a71d4f6..a6bf105 100644 --- a/test/unit_tests/CMakeLists.txt +++ b/test/unit_tests/CMakeLists.txt @@ -2,7 +2,7 @@ find_package(Boost 1.67.0 REQUIRED COMPONENTS unit_test_framework) # It would be Boost 1.66 in a perfect world, but the tests fail to compile with # that: https://lists.boost.org/boost-bugs/2018/01/49711.php. -file(GLOB unit_tests_src "*.cpp") +file(GLOB unit_tests_src CONFIGURE_DEPENDS "*.cpp") add_executable(unit_tests ${unit_tests_src}) set_target_properties(unit_tests PROPERTIES OUTPUT_NAME math-server-unit-tests) target_link_libraries(unit_tests PRIVATE lexer parser) |
