Skip to content

Commit

Permalink
Update fmtlib to version 3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dean0x7d committed Jun 15, 2017
1 parent be7b450 commit 974aeb3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions cppcore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ download_dependency(simdpp 2.0-rc2
/v\${VERSION}.tar.gz */simdpp)
target_include_directories(cppcore SYSTEM PUBLIC ${SIMDPP_INCLUDE_DIR})

include(cppformat)
target_link_libraries(cppcore PUBLIC cppformat)
include(fmt)
target_link_libraries(cppcore PUBLIC fmt)

if(PB_NATIVE_SIMD AND NOT MSVC) # MSVC does not have anything like a /arch:native flag
target_compile_options(cppcore PUBLIC -march=native)
Expand Down
10 changes: 0 additions & 10 deletions cppcore/cmake/cppformat.cmake

This file was deleted.

11 changes: 11 additions & 0 deletions cppcore/cmake/fmt.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
download_dependency(fmt 3.0.2 https://raw.githubusercontent.com/fmtlib/fmt/\${VERSION}
fmt/format.h fmt/format.cc fmt/ostream.h fmt/ostream.cc)

add_library(fmt STATIC EXCLUDE_FROM_ALL
${FMT_INCLUDE_DIR}/fmt/format.cc
${FMT_INCLUDE_DIR}/fmt/ostream.cc)
target_include_directories(fmt SYSTEM PUBLIC ${FMT_INCLUDE_DIR})
if(NOT WIN32)
target_compile_options(fmt PUBLIC ${PB_CPP_STANDARD})
endif()
set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
3 changes: 2 additions & 1 deletion cppcore/include/support/format.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#include <format.h>
#include <fmt/format.h>
#include <fmt/ostream.h>

namespace fmt {

Expand Down

0 comments on commit 974aeb3

Please # to comment.