]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
build: Remove “_lib” suffix from ccache_lib and third_party_lib
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 28 Jul 2021 18:15:10 +0000 (20:15 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 28 Jul 2021 18:33:25 +0000 (20:33 +0200)
This means that libthird_party_lib.a will become libthird_party.a which
removes repetition of “lib”. ccache_lib can’t be renamed to just ccache
since that’s the name of the main binary, so that’s renamed to
ccache_framework.

CMakeLists.txt
src/CMakeLists.txt
src/compression/CMakeLists.txt
src/core/CMakeLists.txt
src/storage/CMakeLists.txt
src/storage/primary/CMakeLists.txt
src/storage/secondary/CMakeLists.txt
src/third_party/CMakeLists.txt
src/util/CMakeLists.txt
unittest/CMakeLists.txt

index 0673a4a3ec17c800096830150f3611af659b903f..caed58756cefd876fe66092cc1dcaf2a892e8036 100644 (file)
@@ -127,7 +127,7 @@ add_subdirectory(src)
 # ccache executable
 #
 add_executable(ccache src/main.cpp)
-target_link_libraries(ccache PRIVATE standard_settings standard_warnings ccache_lib)
+target_link_libraries(ccache PRIVATE standard_settings standard_warnings ccache_framework)
 
 #
 # Documentation
index 3ace0cb5cd3d03545f78a12f66fbba01690587f5..867aebadaf5a8e369fec32c764ecc22704b86c70 100644 (file)
@@ -44,40 +44,40 @@ if(WIN32)
   list(APPEND source_files Win32Util.cpp)
 endif()
 
-add_library(ccache_lib STATIC ${source_files})
+add_library(ccache_framework STATIC ${source_files})
 target_compile_definitions(
-  ccache_lib PUBLIC -Dnssv_CONFIG_SELECT_STRING_VIEW=nssv_STRING_VIEW_NONSTD
+  ccache_framework PUBLIC -Dnssv_CONFIG_SELECT_STRING_VIEW=nssv_STRING_VIEW_NONSTD
 )
 
 if(WIN32)
-  target_link_libraries(ccache_lib PRIVATE ws2_32 "psapi")
+  target_link_libraries(ccache_framework PRIVATE ws2_32 "psapi")
 
   if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
     if(STATIC_LINK)
-      target_link_libraries(ccache_lib PRIVATE -static-libgcc -static-libstdc++ -static winpthread -dynamic)
+      target_link_libraries(ccache_framework PRIVATE -static-libgcc -static-libstdc++ -static winpthread -dynamic)
     else()
-      target_link_libraries(ccache_lib PRIVATE winpthread)
+      target_link_libraries(ccache_framework PRIVATE winpthread)
     endif()
   elseif(STATIC_LINK AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    target_link_libraries(ccache_lib PRIVATE -static c++ -dynamic)
+    target_link_libraries(ccache_framework PRIVATE -static c++ -dynamic)
   endif()
 endif()
 
 set(THREADS_PREFER_PTHREAD_FLAG ON)
 find_package(Threads REQUIRED)
 target_link_libraries(
-  ccache_lib
-  PRIVATE standard_settings standard_warnings ZSTD::ZSTD
-          Threads::Threads third_party_lib)
+  ccache_framework
+  PRIVATE standard_settings standard_warnings ZSTD::ZSTD Threads::Threads third_party
+)
 
-target_include_directories(ccache_lib PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories(ccache_framework PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
 
 if(REDIS_STORAGE_BACKEND)
-  target_compile_definitions(ccache_lib PRIVATE -DHAVE_REDIS_STORAGE_BACKEND)
+  target_compile_definitions(ccache_framework PRIVATE -DHAVE_REDIS_STORAGE_BACKEND)
   target_link_libraries(
-    ccache_lib
-    PUBLIC standard_settings standard_warnings HIREDIS::HIREDIS
-           third_party_lib)
+    ccache_framework
+    PUBLIC standard_settings standard_warnings HIREDIS::HIREDIS third_party
+  )
 endif()
 
 add_subdirectory(compression)
index 50ceb2c00633093a282fec02f3c97c87c0edca3c..042a0b44286232692c5d20a1d4915dedd7a87bf2 100644 (file)
@@ -9,4 +9,4 @@ set(
   ${CMAKE_CURRENT_SOURCE_DIR}/types.cpp
 )
 
-target_sources(ccache_lib PRIVATE ${sources})
+target_sources(ccache_framework PRIVATE ${sources})
index a00797514488de4eb523f7495d4bcf84c6bb8da1..60d42973b7138de90bb25e114b2bead6861b20eb 100644 (file)
@@ -6,4 +6,4 @@ set(
   ${CMAKE_CURRENT_SOURCE_DIR}/mainoptions.cpp
 )
 
-target_sources(ccache_lib PRIVATE ${sources})
+target_sources(ccache_framework PRIVATE ${sources})
index 65f7d898ea84889d81387efc6b6c270fc0631702..c107e8e18cf79526009bc3f59765ce2b8b0eed5b 100644 (file)
@@ -6,4 +6,4 @@ set(
   ${CMAKE_CURRENT_SOURCE_DIR}/Storage.cpp
 )
 
-target_sources(ccache_lib PRIVATE ${sources})
+target_sources(ccache_framework PRIVATE ${sources})
index 04a565e386daa88f109766f43c9fa017358d1431..ab6ee4a6d30781d8694738c534fb6dbb297fada1 100644 (file)
@@ -9,4 +9,4 @@ set(
   ${CMAKE_CURRENT_SOURCE_DIR}/util.cpp
 )
 
-target_sources(ccache_lib PRIVATE ${sources})
+target_sources(ccache_framework PRIVATE ${sources})
index c5f57985a7c57c2d516bf6a54aba76a9328a8d57..0ea75515cde90cf7e663337a41084f1d7b5af31a 100644 (file)
@@ -9,4 +9,4 @@ if(REDIS_STORAGE_BACKEND)
   list(APPEND sources ${CMAKE_CURRENT_SOURCE_DIR}/RedisStorage.cpp)
 endif()
 
-target_sources(ccache_lib PRIVATE ${sources})
+target_sources(ccache_framework PRIVATE ${sources})
index 3a06ee276240d0889e03d02a95d2e050c043f23c..b20fb4ccd99ed10132f5834b0c81f027efb52109 100644 (file)
@@ -1,17 +1,17 @@
-add_library(third_party_lib STATIC base32hex.c format.cpp url.cpp xxhash.c)
+add_library(third_party STATIC base32hex.c format.cpp url.cpp xxhash.c)
 if(NOT MSVC)
-  target_sources(third_party_lib PRIVATE getopt_long.c)
+  target_sources(third_party PRIVATE getopt_long.c)
 else()
-  target_sources(third_party_lib PRIVATE win32/getopt.c)
-  target_compile_definitions(third_party_lib PUBLIC -DSTATIC_GETOPT)
+  target_sources(third_party PRIVATE win32/getopt.c)
+  target_compile_definitions(third_party PUBLIC -DSTATIC_GETOPT)
 endif()
 
 if(WIN32)
-  target_sources(third_party_lib PRIVATE win32/mktemp.c)
+  target_sources(third_party PRIVATE win32/mktemp.c)
 endif ()
 
 if(ENABLE_TRACING)
-  target_sources(third_party_lib PRIVATE minitrace.c)
+  target_sources(third_party PRIVATE minitrace.c)
 endif()
 
 set(xxhdispatchtest [=[
@@ -31,25 +31,24 @@ try_compile(USE_XXH_DISPATCH ${CMAKE_CURRENT_BINARY_DIR}
   CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${CMAKE_CURRENT_SOURCE_DIR}"
   COMPILE_DEFINITIONS "-DXXH_STATIC_LINKING_ONLY")
 
-target_compile_definitions(third_party_lib INTERFACE "-DXXH_STATIC_LINKING_ONLY")
+target_compile_definitions(third_party INTERFACE "-DXXH_STATIC_LINKING_ONLY")
 if(USE_XXH_DISPATCH)
-  target_sources(third_party_lib PRIVATE xxh_x86dispatch.c)
-  target_compile_definitions(third_party_lib INTERFACE "-DUSE_XXH_DISPATCH")
+  target_sources(third_party PRIVATE xxh_x86dispatch.c)
+  target_compile_definitions(third_party INTERFACE "-DUSE_XXH_DISPATCH")
 endif()
 
 # Treat third party headers as system files (no warning for those headers).
 target_include_directories(
-  third_party_lib
-  PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} SYSTEM)
+  third_party
+  PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} SYSTEM
+)
 
-target_link_libraries(third_party_lib PRIVATE standard_settings)
-target_link_libraries(third_party_lib INTERFACE blake3)
+target_link_libraries(third_party PRIVATE standard_settings)
+target_link_libraries(third_party INTERFACE blake3)
 
 # Silence warning from winbase.h due to /Zc:preprocessor.
 if(MSVC)
-  target_compile_options(
-    third_party_lib
-    PRIVATE /wd5105)
+  target_compile_options(third_party PRIVATE /wd5105)
 endif()
 
 add_subdirectory(blake3)
index 48e96ae629fa5b3077e229b5842a626d002639d0..0685ad992974b280acc58fc60f2dfa2b922b0ed4 100644 (file)
@@ -7,4 +7,4 @@ set(
   ${CMAKE_CURRENT_SOURCE_DIR}/string.cpp
 )
 
-target_sources(ccache_lib PRIVATE ${sources})
+target_sources(ccache_framework PRIVATE ${sources})
index d30902084a6f9bec4f78d1647d925a23fbea6b61..f8711a102bf586f9c1c2cac3eb4140b1f845fc48 100644 (file)
@@ -43,7 +43,7 @@ add_executable(unittest ${source_files})
 
 target_link_libraries(
   unittest
-  PRIVATE standard_settings standard_warnings ccache_lib third_party_lib)
+  PRIVATE standard_settings standard_warnings ccache_framework third_party)
 
 target_include_directories(unittest PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${ccache_SOURCE_DIR}/src)