diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2019-10-10 12:38:40 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2019-10-10 12:38:40 +0300 |
commit | aad9e4b0a0aa3826c78400664c250e3aa3fab696 (patch) | |
tree | 8077f650d626a4f76030e1d0cd1541c6d7c4fcf0 | |
parent | 087e0c50299a222be979b59053b1b29d4beb7c63 (diff) | |
parent | f7fd2da19f425f4fef4ade76bc4c81223d343536 (diff) |
Merge branch 'develop' into path_view_refactor
-rw-r--r-- | .ci.cmake | 9 | ||||
-rw-r--r-- | .travis.yml | 14 | ||||
-rw-r--r-- | CMakeLists.txt | 7 | ||||
-rw-r--r-- | cmake/QuickCppLibBootstrap.cmake | 5 | ||||
-rw-r--r-- | include/llfio/revision.hpp | 6 | ||||
-rw-r--r-- | include/llfio/v2.0/detail/impl/path_discovery.ipp | 4 | ||||
-rw-r--r-- | include/llfio/v2.0/handle.hpp | 4 |
7 files changed, 27 insertions, 22 deletions
@@ -4,24 +4,25 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR) include(cmake/QuickCppLibBootstrap.cmake) include(QuickCppLibUtils) - CONFIGURE_CTEST_SCRIPT_FOR_CDASH("llfio" "prebuilt") +list(APPEND CTEST_CONFIGURE_OPTIONS -DCMAKE_BUILD_TYPE=${CTEST_CONFIGURATION_TYPE}) ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) include(FindGit) set(CTEST_GIT_COMMAND "${GIT_EXECUTABLE}") ctest_start("Experimental") ctest_update() -ctest_configure(OPTIONS -DCMAKE_BUILD_TYPE=${CTEST_CONFIGURATION_TYPE};${CTEST_CONFIGURE_OPTIONS}) +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/.travis.yml b/.travis.yml index 1a34211b..785ccefd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,17 +79,19 @@ before_install: - git submodule update --init --recursive - mount - # ctest -S .ci.cmake -V --timeout 300 -DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS ; +# mkdir build; +# cd build; +# cmake .. $CMAKE_CONFIGURE_OPTIONS -DCMAKE_BUILD_TYPE=Release; +# cmake --build . -- _sl; +# cmake --build . -- _dl; +# ctest -C Release -E llfio_hl|shared_fs_mutex; +# cd ..; script: - if [ "$__" = "cmake tests" ] || [ "$__" = "x64 cmake tests (error_code)" ] || [ "$__" = "x64 cmake tests (status_code)" ]; then export ASAN_OPTIONS=detect_leaks=0; - mkdir build; - cd build; - cmake .. $CMAKE_CONFIGURE_OPTIONS -DCMAKE_BUILD_TYPE=Release; - cmake --build .; - ctest -C Release; + ctest -S .ci.cmake -V --timeout 300 -DCTEST_CONFIGURE_OPTIONS=$CMAKE_CONFIGURE_OPTIONS ; fi - if [ "$__" = "ARM32 cmake tests (error_code)" ] || [ "$__" = "ARM32 cmake tests (status_code)" ]; then 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 eae76c0d..625a88ac 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 88dbc653b835f290075ba2be182e4f00c6f926a3 -#define LLFIO_PREVIOUS_COMMIT_DATE "2019-10-09 08:14:17 +00:00" -#define LLFIO_PREVIOUS_COMMIT_UNIQUE 88dbc653 +#define LLFIO_PREVIOUS_COMMIT_REF 087e0c50299a222be979b59053b1b29d4beb7c63 +#define LLFIO_PREVIOUS_COMMIT_DATE "2019-10-09 10:54:14 +00:00" +#define LLFIO_PREVIOUS_COMMIT_UNIQUE 087e0c50 diff --git a/include/llfio/v2.0/detail/impl/path_discovery.ipp b/include/llfio/v2.0/detail/impl/path_discovery.ipp index 318bad07..fed19c71 100644 --- a/include/llfio/v2.0/detail/impl/path_discovery.ipp +++ b/include/llfio/v2.0/detail/impl/path_discovery.ipp @@ -159,7 +159,7 @@ namespace path_discovery { #if LLFIO_LOGGING_LEVEL >= 3 std::string msg("path_discovery::verified_temporary_directories() failed to create a file in "); - msg.append(ps._all[n].path.u8string()); + msg.append(ps._all[n].path.string()); msg.append(" due to "); msg.append(_fh.error().message().c_str()); LLFIO_LOG_WARN(nullptr, msg.c_str()); @@ -185,7 +185,7 @@ namespace path_discovery { #if LLFIO_LOGGING_LEVEL >= 3 std::string msg("path_discovery::verified_temporary_directories() failed to statfs the temp directory "); - msg.append(ps._all[n].path.u8string()); + msg.append(ps._all[n].path.string()); msg.append(" due to "); msg.append(statfsres.error().message().c_str()); LLFIO_LOG_WARN(nullptr, msg.c_str()); diff --git a/include/llfio/v2.0/handle.hpp b/include/llfio/v2.0/handle.hpp index a99887b0..27c7a613 100644 --- a/include/llfio/v2.0/handle.hpp +++ b/include/llfio/v2.0/handle.hpp @@ -341,7 +341,7 @@ inline std::ostream &operator<<(std::ostream &s, const handle &v) if(v.is_valid()) { auto _currentpath = v.current_path(); - std::string currentpath = !_currentpath ? std::string(_currentpath.error().message().c_str()) : _currentpath.value().u8string(); + std::string currentpath = !_currentpath ? std::string(_currentpath.error().message().c_str()) : _currentpath.value().string(); return s << "llfio::handle(" << v._v._init << ", " << currentpath << ")"; } return s << "llfio::handle(closed)"; @@ -470,7 +470,7 @@ namespace detail tls.reentering_self = false; if(currentpath_) { - auto currentpath = currentpath_.value().u8string(); + auto currentpath = currentpath_.value().string(); dest._thread_id = tls.this_thread_id; #ifdef _MSC_VER #pragma warning(push) |