mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
chore(Deps/Boost): Cleanup pre-c++11 checks and silence CMake warning (#19450)
* cherry-pick commit (ad96f1fd78) * cherry-pick commit (66abca1593) Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
29
deps/boost/CMakeLists.txt
vendored
29
deps/boost/CMakeLists.txt
vendored
@@ -11,11 +11,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(BOOST_DEBUG ON)
|
|
||||||
if(DEFINED ENV{Boost_ROOT})
|
if(DEFINED ENV{Boost_ROOT})
|
||||||
set(Boost_ROOT $ENV{Boost_ROOT})
|
set(Boost_ROOT $ENV{Boost_ROOT})
|
||||||
list(APPEND BOOST_LIBRARYDIR
|
|
||||||
${Boost_ROOT}/lib${PLATFORM}-msvc-14.2)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(Boost_USE_STATIC_LIBS ON)
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
@@ -23,6 +20,8 @@ if(WIN32)
|
|||||||
set(Boost_USE_STATIC_RUNTIME OFF)
|
set(Boost_USE_STATIC_RUNTIME OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(Boost_NO_WARN_NEW_VERSIONS ON)
|
||||||
|
|
||||||
include (CheckCXXSourceCompiles)
|
include (CheckCXXSourceCompiles)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
@@ -40,20 +39,6 @@ if(NOT Boost_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
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)
|
add_library(boost INTERFACE)
|
||||||
|
|
||||||
target_link_libraries(boost
|
target_link_libraries(boost
|
||||||
@@ -74,13 +59,3 @@ target_compile_definitions(boost
|
|||||||
-DBOOST_ASIO_NO_DEPRECATED
|
-DBOOST_ASIO_NO_DEPRECATED
|
||||||
-DBOOST_SYSTEM_USE_UTF8
|
-DBOOST_SYSTEM_USE_UTF8
|
||||||
-DBOOST_BIND_NO_PLACEHOLDERS)
|
-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)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user