diff options
author | Shauren <shauren.trinity@gmail.com> | 2022-11-05 01:08:17 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-02-26 12:23:57 +0100 |
commit | 66abca15933fcc6bfdd6dba71ee725da4e906af3 (patch) | |
tree | e86e19d83fbdf9e2f2f6a0a5797a0a2ce6201af2 | |
parent | f7a59ea7070f38591f90920e2f0a2c79dfc7f740 (diff) |
Build: Cleanup boost CMakeLists from pre-c++11 flag checks
(cherry picked from commit c9f1606b760d724851c12a6bc13405a3ec03cc0c)
-rw-r--r-- | dep/boost/CMakeLists.txt | 26 | ||||
-rw-r--r-- | src/common/Utilities/Regex.h | 8 |
2 files changed, 2 insertions, 32 deletions
diff --git a/dep/boost/CMakeLists.txt b/dep/boost/CMakeLists.txt index d445d48a938..d7606138c35 100644 --- a/dep/boost/CMakeLists.txt +++ b/dep/boost/CMakeLists.txt @@ -12,8 +12,6 @@ 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) @@ -38,20 +36,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 <boost/filesystem/path.hpp> - #include <boost/filesystem/operations.hpp> - 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 @@ -73,16 +57,6 @@ target_compile_definitions(boost -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 - -DTC_HAS_BROKEN_WSTRING_REGEX) - if (WITH_BOOST_STACKTRACE AND NOT WIN32) message("*** libbacktrace will be linked") diff --git a/src/common/Utilities/Regex.h b/src/common/Utilities/Regex.h index e5d71f59182..462487f41ed 100644 --- a/src/common/Utilities/Regex.h +++ b/src/common/Utilities/Regex.h @@ -18,15 +18,11 @@ #ifndef TrinityCore_Regex_h__ #define TrinityCore_Regex_h__ -#ifndef TC_HAS_BROKEN_WSTRING_REGEX -#include <regex> -#define TC_REGEX_NAMESPACE std -#else +// std::wregex doesn't work with patterns provided in db2 files +// so we have to use boost #include <boost/regex.hpp> #define TC_REGEX_NAMESPACE boost -#endif -// regex compatibility layer, required for clang building with libstdc++-4.9 namespace Trinity { using regex = TC_REGEX_NAMESPACE :: regex; |