mirror of
https://github.com/fmtlib/fmt.git
synced 2025-04-02 13:20:15 +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()
|
return()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
add_library(format ${FMT_SOURCES})
|
add_library(cppformat ${FMT_SOURCES})
|
||||||
if (FMT_PEDANTIC AND CMAKE_COMPILER_IS_GNUCXX)
|
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")
|
"-Wall -Wextra -Wshadow -pedantic")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ endif ()
|
|||||||
# The library is distributed in the source form and users have full control
|
# 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.
|
# over compile options, so the options used here only matter for testing.
|
||||||
if (CPP11_FLAG AND FMT_PEDANTIC)
|
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.
|
# Test compilation with default flags.
|
||||||
file(GLOB src RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/*.cc test/*.h)
|
file(GLOB src RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/*.cc test/*.h)
|
||||||
add_library(testformat STATIC ${FMT_SOURCE_FILES} ${src})
|
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(CPACK_PACKAGE_VERSION_PATCH 0)
|
||||||
set(CPPFORMAT_VERSION
|
set(CPPFORMAT_VERSION
|
||||||
${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
${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})
|
VERSION ${CPPFORMAT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR})
|
||||||
|
|
||||||
if (EXISTS .gitignore)
|
if (EXISTS .gitignore)
|
||||||
@ -206,5 +206,5 @@ endif ()
|
|||||||
# Install targets.
|
# Install targets.
|
||||||
set(FMT_LIB_DIR lib CACHE STRING
|
set(FMT_LIB_DIR lib CACHE STRING
|
||||||
"Installation directory for libraries, relative to ${CMAKE_INSTALL_PREFIX}.")
|
"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)
|
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)
|
set(TEST_MAIN_SRC test-main.cc gtest-extra.cc gtest-extra.h util.cc)
|
||||||
add_library(test-main STATIC ${TEST_MAIN_SRC})
|
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.
|
# Adds a test.
|
||||||
# Usage: add_fmt_test(name [CUSTOM_LINK] srcs...)
|
# 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})
|
add_executable(${name} ${name}.cc ${add_fmt_test_UNPARSED_ARGUMENTS})
|
||||||
target_link_libraries(${name} test-main)
|
target_link_libraries(${name} test-main)
|
||||||
if (NOT add_fmt_test_CUSTOM_LINK)
|
if (NOT add_fmt_test_CUSTOM_LINK)
|
||||||
target_link_libraries(${name} format)
|
target_link_libraries(${name} cppformat)
|
||||||
endif ()
|
endif ()
|
||||||
add_test(NAME ${name} COMMAND ${name})
|
add_test(NAME ${name} COMMAND ${name})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user