From 3669144099266f554a2143f9fe28a83fde5458d4 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 27 Jul 2024 13:17:48 +0200 Subject: [PATCH] chore(Deps/Boost): Cleanup pre-c++11 checks and silence CMake warning (#19450) * cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/ad96f1fd78f26a304e56c37495017d14aa34c9c0) * cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/66abca15933fcc6bfdd6dba71ee725da4e906af3) Co-authored-by: Shauren --- deps/boost/CMakeLists.txt | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/deps/boost/CMakeLists.txt b/deps/boost/CMakeLists.txt index cb44a0f7f..61334ee2e 100644 --- a/deps/boost/CMakeLists.txt +++ b/deps/boost/CMakeLists.txt @@ -11,11 +11,8 @@ # if(WIN32) - set(BOOST_DEBUG ON) if(DEFINED ENV{Boost_ROOT}) set(Boost_ROOT $ENV{Boost_ROOT}) - list(APPEND BOOST_LIBRARYDIR - ${Boost_ROOT}/lib${PLATFORM}-msvc-14.2) endif() set(Boost_USE_STATIC_LIBS ON) @@ -23,6 +20,8 @@ if(WIN32) set(Boost_USE_STATIC_RUNTIME OFF) endif() +set(Boost_NO_WARN_NEW_VERSIONS ON) + include (CheckCXXSourceCompiles) if (WIN32) @@ -40,20 +39,6 @@ if(NOT Boost_FOUND) endif() endif() -# Find if Boost was compiled in C++03 mode because it requires -DBOOST_NO_CXX11_SCOPED_ENUMS - -set(CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIR}) -set(CMAKE_REQUIRED_LIBRARIES ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_IOSTREAMS_LIBRARY}) -set(CMAKE_REQUIRED_FLAGS "-std=c++11") -check_cxx_source_compiles(" - #include - #include - int main() { boost::filesystem::copy_file(boost::filesystem::path(), boost::filesystem::path()); }" -boost_filesystem_copy_links_without_NO_SCOPED_ENUM) -unset(CMAKE_REQUIRED_INCLUDES) -unset(CMAKE_REQUIRED_LIBRARIES) -unset(CMAKE_REQUIRED_FLAGS) - add_library(boost INTERFACE) target_link_libraries(boost @@ -74,13 +59,3 @@ target_compile_definitions(boost -DBOOST_ASIO_NO_DEPRECATED -DBOOST_SYSTEM_USE_UTF8 -DBOOST_BIND_NO_PLACEHOLDERS) - -if (NOT boost_filesystem_copy_links_without_NO_SCOPED_ENUM) - target_compile_definitions(boost - INTERFACE - -DBOOST_NO_CXX11_SCOPED_ENUMS) -endif() - -target_compile_definitions(boost - INTERFACE - -DAC_HAS_BROKEN_WSTRING_REGEX)