aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-05-17 20:05:41 +0200
committerEgor Tensin <egor@tensin.name>2026-05-17 20:08:18 +0200
commit077d833049022ea9aee86ade93a20c8d05879fe6 (patch)
treef1d7a43c7300c84a23f912a9228b87a7488127c8
parentworkflows/ci: do Docker builds on PRs (diff)
downloadmath-server-077d833049022ea9aee86ade93a20c8d05879fe6.tar.gz
math-server-077d833049022ea9aee86ade93a20c8d05879fe6.zip
upgrade cmake-common
-rw-r--r--.github/workflows/ci.yml2
-rw-r--r--CMakeLists.txt2
-rw-r--r--Makefile8
-rw-r--r--client/CMakeLists.txt4
-rw-r--r--client/Dockerfile2
m---------cmake0
-rw-r--r--server/Dockerfile2
-rw-r--r--server/main/CMakeLists.txt4
-rw-r--r--test/benchmarks/CMakeLists.txt4
-rw-r--r--test/unit_tests/CMakeLists.txt4
10 files changed, 19 insertions, 13 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3ea3a4c..75aa3b0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -36,7 +36,7 @@ jobs:
PLATFORM: '${{ matrix.platform }}'
CONFIGURATION: '${{ matrix.configuration }}'
BOOST_VERSION: 1.81.0
- CMAKE_FLAGS: -D MATH_SERVER_TESTS=ON
+ CMAKE_FLAGS: --cmake-arg=-DMATH_SERVER_TESTS=ON
defaults:
run:
shell: pwsh
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84c4552..3fb358a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,8 +3,6 @@ cmake_minimum_required(VERSION 3.8)
project(math_server CXX)
enable_testing()
-include(cmake/common.cmake)
-
# AppVeyor builds w/ Visual Studio 2017 bombard me with stupid warnings otherwise:
if(MSVC_VERSION GREATER_EQUAL "1910" AND MSVC_VERSION LESS "1920")
add_definitions(/D_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING)
diff --git a/Makefile b/Makefile
index f420a9e..0796d97 100644
--- a/Makefile
+++ b/Makefile
@@ -12,8 +12,8 @@ TOOLSET ?= auto
PLATFORM ?= auto
CONFIGURATION ?= Debug
BOOST_VERSION ?= 1.72.0
-BOOST_LIBRARIES := --with-filesystem --with-program_options --with-regex --with-test
-CMAKE_FLAGS ?= -D MATH_SERVER_TESTS=ON
+BOOST_LIBRARIES := filesystem program_options regex test
+CMAKE_FLAGS ?= --cmake-arg=-DMATH_SERVER_TESTS=ON
INSTALL_PREFIX ?= $(install_dir)
# Target platforms (used by buildx):
@@ -66,10 +66,10 @@ build:
--configuration '$(call escape,$(CONFIGURATION))' \
--install '$(call escape,$(INSTALL_PREFIX))' \
--boost '$(call escape,$(boost_dir))' \
+ $(CMAKE_FLAGS) \
-- \
'$(call escape,$(src_dir))' \
- '$(call escape,$(cmake_dir))' \
- $(CMAKE_FLAGS)
+ '$(call escape,$(cmake_dir))'
.PHONY: install
install: build
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 1891e90..ea62308 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -12,4 +12,6 @@ target_link_libraries(client PRIVATE
Boost::filesystem
Boost::program_options)
install(TARGETS client RUNTIME DESTINATION bin)
-install_pdbs(TARGETS client DESTINATION bin)
+if(MSVC)
+ install(FILES $<TARGET_PDB_FILE:client> DESTINATION bin OPTIONAL)
+endif()
diff --git a/client/Dockerfile b/client/Dockerfile
index e135b83..b2830c7 100644
--- a/client/Dockerfile
+++ b/client/Dockerfile
@@ -13,7 +13,7 @@ COPY [".", "$src_dir"]
RUN build_deps='bash boost-dev cmake g++ make python3' && \
apk add -q --no-cache $build_deps && \
cd -- "$src_dir" && \
- make install CONFIGURATION=Release CMAKE_FLAGS='-D MATH_SERVER_TESTS=ON -D Boost_USE_STATIC_LIBS=OFF'
+ make install CONFIGURATION=Release CMAKE_FLAGS='--cmake-arg=-DMATH_SERVER_TESTS=ON --cmake-arg=-DBoost_USE_STATIC_LIBS=OFF'
FROM base
diff --git a/cmake b/cmake
-Subproject 9e7304af2fe5a4f89da64ac76768697aac4f858
+Subproject 899a49f46c62aaebdc2f0988496c493f0963248
diff --git a/server/Dockerfile b/server/Dockerfile
index f0278e6..ae9fbc5 100644
--- a/server/Dockerfile
+++ b/server/Dockerfile
@@ -13,7 +13,7 @@ COPY [".", "$src_dir"]
RUN build_deps='bash boost-dev cmake g++ make python3' && \
apk add -q --no-cache $build_deps && \
cd -- "$src_dir" && \
- make install CONFIGURATION=Release CMAKE_FLAGS='-D MATH_SERVER_TESTS=ON -D Boost_USE_STATIC_LIBS=OFF'
+ make install CONFIGURATION=Release CMAKE_FLAGS='--cmake-arg=-DMATH_SERVER_TESTS=ON --cmake-arg=-DBoost_USE_STATIC_LIBS=OFF'
FROM base
diff --git a/server/main/CMakeLists.txt b/server/main/CMakeLists.txt
index da5d8b9..6260275 100644
--- a/server/main/CMakeLists.txt
+++ b/server/main/CMakeLists.txt
@@ -18,4 +18,6 @@ target_link_libraries(server PRIVATE
Boost::filesystem
Boost::program_options)
install(TARGETS server RUNTIME DESTINATION bin)
-install_pdbs(TARGETS server DESTINATION bin)
+if(MSVC)
+ install(FILES $<TARGET_PDB_FILE:server> DESTINATION bin OPTIONAL)
+endif()
diff --git a/test/benchmarks/CMakeLists.txt b/test/benchmarks/CMakeLists.txt
index ea419a6..8a55d41 100644
--- a/test/benchmarks/CMakeLists.txt
+++ b/test/benchmarks/CMakeLists.txt
@@ -4,6 +4,8 @@ set_target_properties(benchmarks PROPERTIES OUTPUT_NAME math-server-benchmarks)
target_link_libraries(benchmarks PRIVATE lexer)
target_link_libraries(benchmarks PRIVATE benchmark benchmark_main)
install(TARGETS benchmarks RUNTIME DESTINATION bin)
-install_pdbs(TARGETS benchmarks DESTINATION bin)
+if(MSVC)
+ install(FILES $<TARGET_PDB_FILE:benchmarks> DESTINATION bin OPTIONAL)
+endif()
add_test(NAME benchmarks COMMAND benchmarks --benchmark_color=false)
diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt
index 499ed20..a71d4f6 100644
--- a/test/unit_tests/CMakeLists.txt
+++ b/test/unit_tests/CMakeLists.txt
@@ -10,7 +10,9 @@ target_link_libraries(unit_tests PRIVATE
Boost::disable_autolinking
Boost::unit_test_framework)
install(TARGETS unit_tests RUNTIME DESTINATION bin)
-install_pdbs(TARGETS unit_tests DESTINATION bin)
+if(MSVC)
+ install(FILES $<TARGET_PDB_FILE:unit_tests> DESTINATION bin OPTIONAL)
+endif()
find_package(Python3 REQUIRED COMPONENTS Interpreter)