diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2016-07-06 11:34:14 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2016-07-06 11:34:14 +0300 |
commit | ab81a76cc6fbfb2ff551bd6fed9ecd6e26047238 (patch) | |
tree | df89fe485f32ed3f77f75df9c4bd6f4586a9f377 | |
parent | 8f2b0db372fdf0b43592120197dc6d9192b20e45 (diff) |
wip precompiled headers cmake support
-rw-r--r-- | CMakeLists.txt | 28 | ||||
-rw-r--r-- | Readme.md | 8 | ||||
m--------- | include/boost/afio/boost-lite | 0 | ||||
-rw-r--r-- | include/boost/afio/revision.hpp | 4 |
4 files changed, 28 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 04986976..81f9fa75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,10 +13,34 @@ 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 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} + # cxx_exceptions ## Annoyingly not supported by cmake 3.4 + cxx_alias_templates + cxx_variadic_templates + cxx_noexcept + cxx_constexpr + cxx_thread_local + #cxx_init_captures ## Not supported yet by cmake 3.4 + cxx_attributes + cxx_variable_templates + ) + unset(PUBLIC) +endforeach() + @@ -4,14 +4,6 @@ v2 rewrite. You can view its documentation at https://ned14.github.io/boost.afio <b>master branch test status</b> Linux: platform support currently lagging Windows: [![Build status](https://ci.appveyor.com/api/projects/status/ox59o2r276xbmef7/branch/master?svg=true)](https://ci.appveyor.com/project/ned14/boost-afio/branch/master) Coverage: Boost.KernelTest support for coveralls.io still todo CMake todos: -- revision.hpp needs to be updated from .git/HEAD (ref: refs/heads/master) - - .git/HEAD/refs/heads/master contains the SHA - - timestamp of that file is the timestamp - - if a submodule, read the .git file and append /HEAD -- target_compile_features(afio - PUBLIC cxx_auto_type - PRIVATE cxx_variadic_templates -) - Precompiled headers generation - C++ Modules support - Each dependent library also needs to use this cmake infrastructure and then diff --git a/include/boost/afio/boost-lite b/include/boost/afio/boost-lite -Subproject 57fa411667b93bdec660ad823f7ab592e01f9b3 +Subproject 31c359c82434cd514442c682094324c0e04b9c3 diff --git a/include/boost/afio/revision.hpp b/include/boost/afio/revision.hpp index d9e10108..29385efb 100644 --- a/include/boost/afio/revision.hpp +++ b/include/boost/afio/revision.hpp @@ -1,3 +1,3 @@ // Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time -#define BOOST_AFIO_PREVIOUS_COMMIT_REF 5496ce656f09a15ad280ef10af10202508648259 -#define BOOST_AFIO_PREVIOUS_COMMIT_DATE "2016-07-05T09:14:46" +#define BOOST_AFIO_PREVIOUS_COMMIT_REF 8f2b0db372fdf0b43592120197dc6d9192b20e45 +#define BOOST_AFIO_PREVIOUS_COMMIT_DATE "2016-07-06 06:12:06 +00:00" |