From bdcfbddc0ed312a8aa8c07f62749e253657b1270 Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Thu, 19 Dec 2024 10:16:49 -0500 Subject: [PATCH] Remove requirement to link against acquire-logger. (#31) --- benchmarks/CMakeLists.txt | 1 - src/logger/CMakeLists.txt | 17 ++++++----------- src/streaming/CMakeLists.txt | 2 +- tests/integration/CMakeLists.txt | 1 - tests/unit-tests/CMakeLists.txt | 1 - 5 files changed, 7 insertions(+), 15 deletions(-) diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index 80fda26..4586a82 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -11,7 +11,6 @@ target_include_directories(${tgt} PRIVATE ${PROJECT_SOURCE_DIR}/src/logger ) target_link_libraries(${tgt} PRIVATE - acquire-logger acquire-zarr nlohmann_json::nlohmann_json miniocpp::miniocpp diff --git a/src/logger/CMakeLists.txt b/src/logger/CMakeLists.txt index 1a84375..f287508 100644 --- a/src/logger/CMakeLists.txt +++ b/src/logger/CMakeLists.txt @@ -1,19 +1,14 @@ -set(CMAKE_POSITION_INDEPENDENT_CODE ON) - -add_library(acquire-logger +add_library(acquire-logger-obj OBJECT logger.hh logger.cpp ) -target_include_directories(acquire-logger - INTERFACE - $ -) - -set_target_properties(acquire-logger PROPERTIES +set_target_properties(acquire-logger-obj PROPERTIES + POSITION_INDEPENDENT_CODE ON MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>" ) -install(TARGETS acquire-logger - LIBRARY DESTINATION lib +target_include_directories(acquire-logger-obj + PUBLIC + $ ) \ No newline at end of file diff --git a/src/streaming/CMakeLists.txt b/src/streaming/CMakeLists.txt index c9b5fef..3fed4a3 100644 --- a/src/streaming/CMakeLists.txt +++ b/src/streaming/CMakeLists.txt @@ -31,6 +31,7 @@ add_library(${tgt} zarrv3.array.writer.cpp vectorized.file.writer.hh vectorized.file.writer.cpp + $ ) target_include_directories(${tgt} @@ -42,7 +43,6 @@ target_include_directories(${tgt} ) target_link_libraries(${tgt} PRIVATE - acquire-logger blosc_static miniocpp::miniocpp ) diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt index 006c490..4295711 100644 --- a/tests/integration/CMakeLists.txt +++ b/tests/integration/CMakeLists.txt @@ -23,7 +23,6 @@ foreach (name ${tests}) ${PROJECT_SOURCE_DIR}/src/logger ) target_link_libraries(${tgt} PRIVATE - acquire-logger acquire-zarr nlohmann_json::nlohmann_json miniocpp::miniocpp diff --git a/tests/unit-tests/CMakeLists.txt b/tests/unit-tests/CMakeLists.txt index fba62cc..fef3ecf 100644 --- a/tests/unit-tests/CMakeLists.txt +++ b/tests/unit-tests/CMakeLists.txt @@ -41,7 +41,6 @@ foreach (name ${tests}) ${PROJECT_SOURCE_DIR}/src/streaming ) target_link_libraries(${tgt} PRIVATE - acquire-logger acquire-zarr miniocpp::miniocpp )