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>2016-07-08 11:33:30 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2016-07-08 11:33:30 +0300
commite87a0e29976d5bb7fde6df93951a87a23323ce50 (patch)
treef568e507be67715205f3bcce51a44fe5e1705c33 /CMakeLists.txt
parentab81a76cc6fbfb2ff551bd6fed9ecd6e26047238 (diff)
Now actually generating proper precompiled headers thanks to some undocumented cmake support for precompiled headers. Woohoo.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 9 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 81f9fa75..5549dde3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,24 +13,18 @@ set(PROJECT_NAMESPACE boost::)
# Update this header file with the current git SHA and last timestamp
UpdateRevisionHppFromGit("${CMAKE_CURRENT_SOURCE_DIR}/include/boost/afio/revision.hpp")
-# Make an interface only library so dependent CMakeLists can bring in this header-only library
-include(BoostLiteMakeHeaderOnlyLibrary)
-# Anyone using the static or dynamic libraries is not using the header only variant
-set(afio_NON_HEADER_ONLY_COMPILE_DEFINITIONS INTERFACE BOOST_AFIO_HEADERS_ONLY=0)
# Make the standard static and shared libraries, and if supported by this compiler, C++ modules
# for both static and shared libraries as well. For the non-C++ module variants, makes the
# interface headers into precompiled headers. Only builds all of them if this is the topmost
# CMakeLists, else built only if something upstream is dependent on one of them.
include(BoostLiteMakeLibrary)
+# Make an interface only library so dependent CMakeLists can bring in this header-only library
+include(BoostLiteMakeHeaderOnlyLibrary)
+# Set the standard definitions for these libraries and bring in the all_* helper functions
+include(BoostLiteApplyDefaultDefinitions)
# Set the C++ features this library requires
-foreach(lib afio_sl afio_dl)
- if(${lib} STREQUAL afio_hl)
- set(PUBLIC INTERFACE)
- else()
- set(PUBLIC PUBLIC)
- endif()
- target_compile_features(${lib} ${PUBLIC}
+all_compile_features(PUBLIC
# cxx_exceptions ## Annoyingly not supported by cmake 3.4
cxx_alias_templates
cxx_variadic_templates
@@ -41,6 +35,9 @@ foreach(lib afio_sl afio_dl)
cxx_attributes
cxx_variable_templates
)
- unset(PUBLIC)
+
+# Anyone using the static or dynamic libraries is not using the header only variant
+foreach(lib afio_sl afio_dl)
+ target_compile_definitions(${lib} INTERFACE BOOST_AFIO_HEADERS_ONLY=0)
endforeach()