Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-04-30 17:01:17 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-04-30 17:01:17 +0300
commit62985a1f7d25b84ce58f47dccdcd260d7d3041ae (patch)
treeaab5da60091b9fc991bd5e9e1ce58e1a90252ae4 /CMakeLists.txt
parentfd2b70021f7dc9a02e943732ba33547ba3f67266 (diff)
Freshen how shared libraries are produced by cmake, and work around a GCC bug causing a link failure for the shared library in release builds on POSIX only.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67ff41ba..48f199a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -307,10 +307,10 @@ if(WIN32)
endif()
endif()
# Anyone using the static or dynamic libraries is not using the header only variant
-foreach(lib llfio_sl llfio_dl)
- target_compile_definitions(${lib} INTERFACE LLFIO_HEADERS_ONLY=0)
- target_compile_definitions(${lib} PRIVATE LLFIO_SOURCE=1)
-endforeach()
+target_compile_definitions(llfio_sl INTERFACE LLFIO_HEADERS_ONLY=0)
+target_compile_definitions(llfio_dl INTERFACE LLFIO_HEADERS_ONLY=0)
+target_compile_definitions(llfio_sl PRIVATE LLFIO_SOURCE=1 LLFIO_STATIC_LINK=1)
+target_compile_definitions(llfio_dl PRIVATE LLFIO_SOURCE=1 LLFIO_DYN_LINK=1)
if(TARGET llfio-example_single-header)
set(compiler_has_cxx_17 0)
foreach(feature ${CMAKE_CXX_COMPILE_FEATURES})