From 5938c4a524354b6b7591b8d9beab3151cb009fe8 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 17 May 2026 18:21:19 +0200 Subject: upgrade dependencies --- 3rdparty/winapi/common | 2 +- CMakeLists.txt | 15 ++++++++++++--- Makefile | 6 +++--- cmake | 2 +- test/CMakeLists.txt | 8 ++++++-- test/unit_tests/CMakeLists.txt | 4 +++- utils/CMakeLists.txt | 4 +++- 7 files changed, 29 insertions(+), 12 deletions(-) diff --git a/3rdparty/winapi/common b/3rdparty/winapi/common index d40a594..c4b37a9 160000 --- a/3rdparty/winapi/common +++ b/3rdparty/winapi/common @@ -1 +1 @@ -Subproject commit d40a5944241178f29ac4753604ef89c393773844 +Subproject commit c4b37a997014609f7c32b9eae739818060266532 diff --git a/CMakeLists.txt b/CMakeLists.txt index 20b6a16..91011e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,19 @@ -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(winapi_debug CXX) enable_testing() +if (MSVC) + add_compile_options(/MP /W4) +else() + add_compile_options(-Wall -Wextra) +endif() + +add_compile_definitions(WIN32_LEAN_AND_MEAN NOMINMAX) + if(MSVC) # This is an ugly hack to make the tests work. # With incremental linking, the &func address does not point to the @@ -24,8 +35,6 @@ if(MSVC) "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}") endif() -include(cmake/common.cmake) - find_package(Boost REQUIRED) add_subdirectory(3rdparty/winapi/common EXCLUDE_FROM_ALL) diff --git a/Makefile b/Makefile index 7344216..31de54b 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ TOOLSET ?= mingw PLATFORM ?= auto CONFIGURATION ?= Debug BOOST_VERSION ?= 1.81.0 -BOOST_LIBRARIES := --with-filesystem --with-program_options --with-test +BOOST_LIBRARIES := filesystem program_options test CMAKE_FLAGS ?= INSTALL_PREFIX ?= $(install_dir) @@ -54,10 +54,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/cmake b/cmake index 9e7304a..899a49f 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 9e7304af2fe5a4f89da64ac76768697aac4f858e +Subproject commit 899a49f46c62aaebdc2f0988496c493f0963248b diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 17770c9..b77003c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,12 +3,16 @@ target_link_libraries(test_lib PRIVATE winapi_debug) target_include_directories(test_lib PUBLIC .) target_compile_definitions(test_lib PRIVATE TEST_LIB_EXPORTS) install(TARGETS test_lib RUNTIME DESTINATION bin/test) -install_pdbs(TARGETS test_lib DESTINATION bin/test) +if(MSVC) + install(FILES $ DESTINATION bin/test OPTIONAL) +endif() add_executable(call_stack call_stack.cpp) target_link_libraries(call_stack PRIVATE test_lib) install(TARGETS call_stack RUNTIME DESTINATION bin/test) -install_pdbs(TARGETS call_stack DESTINATION bin/test) +if(MSVC) + install(FILES $ DESTINATION bin/test OPTIONAL) +endif() find_package(Python3 REQUIRED COMPONENTS Interpreter) diff --git a/test/unit_tests/CMakeLists.txt b/test/unit_tests/CMakeLists.txt index 93b7b8b..958eb92 100644 --- a/test/unit_tests/CMakeLists.txt +++ b/test/unit_tests/CMakeLists.txt @@ -7,7 +7,9 @@ target_link_libraries(unit_tests PRIVATE Boost::filesystem Boost::unit_test_framework) install(TARGETS unit_tests RUNTIME DESTINATION bin/test) -install_pdbs(TARGETS unit_tests DESTINATION bin/test) +if(MSVC) + install(FILES $ DESTINATION bin/test OPTIONAL) +endif() if(MSVC) # Set the working directory so that the unit_tests binary can find the diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 3b7f865..62ca7fd 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -5,7 +5,9 @@ function(add_util name src) target_link_libraries("${name}" PRIVATE winapi_debug) target_link_libraries("${name}" PRIVATE Boost::disable_autolinking Boost::filesystem Boost::program_options) install(TARGETS "${name}" RUNTIME DESTINATION bin) - install_pdbs(TARGETS "${name}" DESTINATION bin) + if(MSVC) + install(FILES "$" DESTINATION bin OPTIONAL) + endif() endfunction() add_util(enum_symbols enum_symbols.cpp command_line.hpp pdb_descr.hpp) -- cgit v1.3