Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Deps/FmtLib): update fmtlib to 7.1.3 #5950

Merged
merged 2 commits into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion deps/PackageList.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AzerothCore uses (parts of or in whole) the following opensource software :
AzerothCore uses (parts of or in whole) the following opensource software:

ACE (ADAPTIVE Communication Environment)
http://www.cs.wustl.edu/~schmidt/ACE.html
Expand Down Expand Up @@ -55,3 +55,7 @@ gSOAP (a portable development toolkit for C and C++ XML Web services and XML dat
recastnavigation (Recast is state of the art navigation mesh construction toolset for games)
https://github.com/memononen/recastnavigation
Version: 64385e9ed0822427bca5814d03a3f4c4d7a6db9f

{fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.
https://github.com/fmtlib/fmt
Version: 7.1.3
63 changes: 28 additions & 35 deletions deps/fmt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,63 +9,56 @@
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# User has manually chosen to ignore the git-tests, so throw them a warning.
# This is done EACH compile so they can be alerted about the consequences.
#

include(CheckSymbolExists)

set(strtod_l_headers stdlib.h)

if (APPLE)
set(strtod_l_headers ${strtod_l_headers} xlocale.h)
endif ()

if(WIN32)
check_symbol_exists(open io.h HAVE_OPEN)
check_symbol_exists(_strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
else()
check_symbol_exists(open fcntl.h HAVE_OPEN)
check_symbol_exists(strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
endif()

function(add_headers VAR)
set(headers ${${VAR}})
foreach (header ${ARGN})
set(headers ${headers} fmt/${header})
endforeach()
set(${VAR} ${headers} PARENT_SCOPE)
endfunction()

# Define the fmt library, its includes and the needed defines.
add_headers(FMT_HEADERS
chrono.h
color.h
compile.h
core.h
format.h
format-inl.h
locale.h
ostream.h
printf.h
ranges.h
safe-duration-cast.h)
set(FMT_HEADERS
include/fmt/args.h
include/fmt/chrono.h
include/fmt/color.h
include/fmt/compile.h
include/fmt/core.h
include/fmt/format.h
include/fmt/format-inl.h
include/fmt/locale.h
include/fmt/os.h
include/fmt/ostream.h
include/fmt/printf.h
include/fmt/ranges.h)

set(FMT_SOURCES fmt/format.cc)
set(FMT_SOURCES
src/format.cc
src/os.cc)

if(HAVE_OPEN)
add_headers(FMT_HEADERS posix.h)
set(FMT_SOURCES ${FMT_SOURCES} fmt/posix.cc)
endif()

add_library(fmt STATIC
add_library(fmt STATIC
${FMT_SOURCES}
${FMT_HEADERS})

GroupSources(${CMAKE_CURRENT_SOURCE_DIR})

if (HAVE_STRTOD_L)
target_compile_definitions(fmt
PUBLIC
target_compile_definitions(fmt
PUBLIC
FMT_LOCALE)
endif()

target_include_directories(fmt
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
${CMAKE_CURRENT_SOURCE_DIR}/include)

target_link_libraries(fmt
PRIVATE
Expand Down
3 changes: 3 additions & 0 deletions deps/fmt/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ exceptions:
* snake_case should be used instead of UpperCamelCase for function and type
names

All documentation must adhere to the [Google Developer Documentation Style
Guide](https://developers.google.com/style).

Thanks for contributing!
Loading