Fix errors on compilation with c++17
This commit is contained in:
parent
db4963048d
commit
979ba59e41
@ -38,8 +38,8 @@ endif()
|
||||
# Using span from std
|
||||
if (NOT UUID_USING_CXX20_SPAN)
|
||||
target_include_directories(${PROJECT_NAME} INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/gsl>
|
||||
$<INSTALL_INTERFACE:include/gsl>)
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<INSTALL_INTERFACE:include>)
|
||||
install(DIRECTORY gsl DESTINATION include)
|
||||
endif ()
|
||||
|
||||
@ -70,4 +70,4 @@ export(EXPORT ${PROJECT_NAME}-targets
|
||||
if (UUID_BUILD_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@ -16,7 +16,21 @@
|
||||
#include <chrono>
|
||||
#include <numeric>
|
||||
#include <atomic>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
# if (__cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
|
||||
# define LIBUUID_CPP20_OR_GREATER
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef LIBUUID_CPP20_OR_GREATER
|
||||
#include <span>
|
||||
#else
|
||||
#include <gsl/gsl>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
@ -950,4 +964,4 @@ namespace std
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* STDUUID_H */
|
||||
#endif /* STDUUID_H */
|
||||
|
||||
@ -28,4 +28,4 @@ set_tests_properties("test_${PROJECT_NAME}"
|
||||
FAIL_REGULAR_EXPRESSION "Failed \\d+ test cases")
|
||||
set_tests_properties("test_${PROJECT_NAME}"
|
||||
PROPERTIES
|
||||
TIMEOUT 120)
|
||||
TIMEOUT 120)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user