mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-09 21:00:06 +00:00
libformat.{a.so} -> libcppformat.{a.so}
as suggested by Eugene V. Lyubimkin to make the name less generic
This commit is contained in:
parent
abcc2d96f0
commit
b88a17ad9e
@ -89,9 +89,9 @@ if (BIICODE)
|
||||
return()
|
||||
endif ()
|
||||
|
||||
add_library(format ${FMT_SOURCES})
|
||||
add_library(cppformat ${FMT_SOURCES})
|
||||
if (FMT_PEDANTIC AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
set_target_properties(format PROPERTIES COMPILE_FLAGS
|
||||
set_target_properties(cppformat PROPERTIES COMPILE_FLAGS
|
||||
"-Wall -Wextra -Wshadow -pedantic")
|
||||
endif ()
|
||||
|
||||
@ -100,7 +100,7 @@ endif ()
|
||||
# The library is distributed in the source form and users have full control
|
||||
# over compile options, so the options used here only matter for testing.
|
||||
if (CPP11_FLAG AND FMT_PEDANTIC)
|
||||
set_target_properties(format PROPERTIES COMPILE_FLAGS ${CPP11_FLAG})
|
||||
set_target_properties(cppformat PROPERTIES COMPILE_FLAGS ${CPP11_FLAG})
|
||||
# Test compilation with default flags.
|
||||
file(GLOB src RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/*.cc test/*.h)
|
||||
add_library(testformat STATIC ${FMT_SOURCE_FILES} ${src})
|
||||
@ -182,7 +182,7 @@ set(CPACK_PACKAGE_VERSION_MINOR 2)
|
||||
set(CPACK_PACKAGE_VERSION_PATCH 0)
|
||||
set(CPPFORMAT_VERSION
|
||||
${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
set_target_properties(format PROPERTIES
|
||||
set_target_properties(cppformat PROPERTIES
|
||||
VERSION ${CPPFORMAT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR})
|
||||
|
||||
if (EXISTS .gitignore)
|
||||
@ -206,5 +206,5 @@ endif ()
|
||||
# Install targets.
|
||||
set(FMT_LIB_DIR lib CACHE STRING
|
||||
"Installation directory for libraries, relative to ${CMAKE_INSTALL_PREFIX}.")
|
||||
install(TARGETS format DESTINATION ${FMT_LIB_DIR})
|
||||
install(TARGETS cppformat DESTINATION ${FMT_LIB_DIR})
|
||||
install(FILES format.h DESTINATION include)
|
||||
|
@ -1,6 +1,6 @@
|
||||
set(TEST_MAIN_SRC test-main.cc gtest-extra.cc gtest-extra.h util.cc)
|
||||
add_library(test-main STATIC ${TEST_MAIN_SRC})
|
||||
target_link_libraries(test-main format gmock)
|
||||
target_link_libraries(test-main cppformat gmock)
|
||||
|
||||
# Adds a test.
|
||||
# Usage: add_fmt_test(name [CUSTOM_LINK] srcs...)
|
||||
@ -9,7 +9,7 @@ function(add_fmt_test name)
|
||||
add_executable(${name} ${name}.cc ${add_fmt_test_UNPARSED_ARGUMENTS})
|
||||
target_link_libraries(${name} test-main)
|
||||
if (NOT add_fmt_test_CUSTOM_LINK)
|
||||
target_link_libraries(${name} format)
|
||||
target_link_libraries(${name} cppformat)
|
||||
endif ()
|
||||
add_test(NAME ${name} COMMAND ${name})
|
||||
endfunction()
|
||||
|
Loading…
Reference in New Issue
Block a user