Skip to content

Commit

Permalink
libformat.{a.so} -> libcppformat.{a.so}
Browse files Browse the repository at this point in the history
as suggested by Eugene V. Lyubimkin to make the name less generic
  • Loading branch information
vitaut committed Jun 23, 2015
1 parent abcc2d9 commit b88a17a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

Expand All @@ -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})
Expand Down Expand Up @@ -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)
Expand All @@ -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)
4 changes: 2 additions & 2 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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...)
Expand All @@ -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()
Expand Down

0 comments on commit b88a17a

Please sign in to comment.