mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
feat(Core/Config): rework config and delete ACE inherited (#4608)
This commit is contained in:
@@ -8,6 +8,30 @@ target_compile_definitions(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-D_BUILD_DIRECTIVE="${CMAKE_BUILD_TYPE}")
|
||||
|
||||
# This tests for a bug in clang-7 that causes linkage to fail for 64-bit from_chars (in some configurations)
|
||||
# If the clang requirement is bumped to >= clang-8, you can remove this check, as well as
|
||||
# the associated ifdef block in src/common/Utilities/StringConvert.h
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
check_cxx_source_compiles("
|
||||
#include <charconv>
|
||||
#include <cstdint>
|
||||
int main()
|
||||
{
|
||||
uint64_t n;
|
||||
char const c[] = \"0\";
|
||||
std::from_chars(c, c+1, n);
|
||||
return static_cast<int>(n);
|
||||
}
|
||||
" CLANG_HAVE_PROPER_CHARCONV)
|
||||
|
||||
if (NOT CLANG_HAVE_PROPER_CHARCONV)
|
||||
message(STATUS "Clang: Detected from_chars bug for 64-bit integers, workaround enabled")
|
||||
target_compile_definitions(acore-compile-option-interface
|
||||
INTERFACE
|
||||
-DACORE_NEED_CHARCONV_WORKAROUND)
|
||||
endif()
|
||||
|
||||
if(WITH_WARNINGS)
|
||||
target_compile_options(acore-warning-interface
|
||||
INTERFACE
|
||||
|
||||
Reference in New Issue
Block a user