From c6ed09566e600d9fd54e871b7f407f80d2573062 Mon Sep 17 00:00:00 2001 From: "Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)" Date: Wed, 9 Oct 2019 17:51:59 +0100 Subject: Add C++ 20 testing to CI for GCC, clang and MSVC. --- .ci.cmake | 5 +++-- CMakeLists.txt | 7 +++++-- cmake/QuickCppLibBootstrap.cmake | 5 ++--- include/llfio/revision.hpp | 6 +++--- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.ci.cmake b/.ci.cmake index 1cfef639..61c91b76 100644 --- a/.ci.cmake +++ b/.ci.cmake @@ -13,15 +13,16 @@ set(CTEST_GIT_COMMAND "${GIT_EXECUTABLE}") ctest_start("Experimental") ctest_update() ctest_configure(OPTIONS "${CTEST_CONFIGURE_OPTIONS}") +ctest_build(TARGET _hl) ctest_build(TARGET _dl) ctest_build(TARGET _sl) set(retval 0) if(NOT CTEST_DISABLE_TESTING) if(WIN32) # Appveyor's Windows version doesn't permit unprivileged creation of symbolic links - ctest_test(RETURN_VALUE retval EXCLUDE "llfio_hl|shared_fs_mutex|symlink") + ctest_test(RETURN_VALUE retval EXCLUDE "shared_fs_mutex|symlink") else() - ctest_test(RETURN_VALUE retval EXCLUDE "llfio_hl|shared_fs_mutex") + ctest_test(RETURN_VALUE retval EXCLUDE "shared_fs_mutex") endif() endif() if(WIN32) diff --git a/CMakeLists.txt b/CMakeLists.txt index f45d9d7b..dc8bfef9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,6 +198,7 @@ endif() if(WIN32) all_compile_definitions(PRIVATE _WIN32_WINNT=0x600) ## Target WinVista if(NOT LLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE) + target_link_libraries(llfio_hl INTERFACE ntkernel-error-category::hl) target_link_libraries(llfio_dl PUBLIC ntkernel-error-category::dl) target_link_libraries(llfio_sl PUBLIC ntkernel-error-category::sl) endif() @@ -275,8 +276,10 @@ if(NOT PROJECT_IS_DEPENDENCY) if(NOT LATEST_CXX_FEATURE) foreach(feature ${CMAKE_CXX_COMPILE_FEATURES}) if(feature STREQUAL "cxx_std_17") - set(LATEST_CXX_FEATURE "cxx_std_17") - indented_message(STATUS "NOTE: This compiler claims to support C++ 17, enabling for header-only unit test suite") + if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "8.0") + set(LATEST_CXX_FEATURE "cxx_std_17") + indented_message(STATUS "NOTE: This compiler claims to support C++ 17, enabling for header-only unit test suite") + endif() endif() endforeach() endif() diff --git a/cmake/QuickCppLibBootstrap.cmake b/cmake/QuickCppLibBootstrap.cmake index fafc182c..9635a11f 100644 --- a/cmake/QuickCppLibBootstrap.cmake +++ b/cmake/QuickCppLibBootstrap.cmake @@ -37,6 +37,8 @@ if(NOT quickcpplib_done) if(EXISTS "${CMAKE_SOURCE_DIR}/../.quickcpplib_use_siblings" AND NOT QUICKCPPLIB_DISABLE_SIBLINGS) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../quickcpplib/cmakelib") set(CTEST_QUICKCPPLIB_SCRIPTS "${CMAKE_SOURCE_DIR}/../quickcpplib/scripts") + # Copy latest version of myself into end user + file(COPY "${CTEST_QUICKCPPLIB_SCRIPTS}/../cmake/QuickCppLibBootstrap.cmake" DESTINATION "${CMAKE_SOURCE_DIR}/cmake/") elseif(CMAKE_BINARY_DIR) # Place into root binary directory, same place as where find_quickcpplib_library() puts dependencies. set(CTEST_QUICKCPPLIB_CLONE_DIR "${CMAKE_BINARY_DIR}/quickcpplib") @@ -63,7 +65,4 @@ if(NOT quickcpplib_done) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CTEST_QUICKCPPLIB_CLONE_DIR}/repo/cmakelib") set(CTEST_QUICKCPPLIB_SCRIPTS "${CTEST_QUICKCPPLIB_CLONE_DIR}/repo/scripts") endif() - - # Copy latest version of myself into end user - file(COPY "${CTEST_QUICKCPPLIB_SCRIPTS}/../cmake/QuickCppLibBootstrap.cmake" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") endif() diff --git a/include/llfio/revision.hpp b/include/llfio/revision.hpp index 4c17f712..1521e7bb 100644 --- a/include/llfio/revision.hpp +++ b/include/llfio/revision.hpp @@ -1,4 +1,4 @@ // Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time -#define LLFIO_PREVIOUS_COMMIT_REF 8613f89fd6249cac815c7c1f1bdf3056c8478c3e -#define LLFIO_PREVIOUS_COMMIT_DATE "2019-10-08 21:00:32 +00:00" -#define LLFIO_PREVIOUS_COMMIT_UNIQUE 8613f89f +#define LLFIO_PREVIOUS_COMMIT_REF 9740ba82970f959840c982372f3abf4a026a10fd +#define LLFIO_PREVIOUS_COMMIT_DATE "2019-10-09 12:30:46 +00:00" +#define LLFIO_PREVIOUS_COMMIT_UNIQUE 9740ba82 -- cgit v1.2.3