diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-04-30 17:01:17 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-04-30 17:01:17 +0300 |
commit | 62985a1f7d25b84ce58f47dccdcd260d7d3041ae (patch) | |
tree | aab5da60091b9fc991bd5e9e1ce58e1a90252ae4 /CMakeLists.txt | |
parent | fd2b70021f7dc9a02e943732ba33547ba3f67266 (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.txt | 8 |
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}) |