diff options
author | LC <mathew1800@gmail.com> | 2020-07-12 12:25:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-12 12:25:10 -0400 |
commit | ed89bcc767a6c187d834b6b9bb6134190598fc53 (patch) | |
tree | b17d4aaf8b4550d6433ff28a820046957b7a4172 /CMakeLists.txt | |
parent | f1aabc21eebd8c88a4b03578e3f04cc416312195 (diff) | |
parent | fb0fefc75c3cb9e060d59f3b10fe3ae66626aeb8 (diff) |
Merge pull request #4290 from lioncash/latest
CMakeLists: Make use of /std:c++latest on MSVC
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 88ea04c08..12c0a4284 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,8 +118,15 @@ message(STATUS "Target architecture: ${ARCHITECTURE}") # Configure C++ standard # =========================== -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) +if (MSVC) + add_compile_options(/std:c++latest) + + # cubeb and boost still make use of deprecated result_of. + add_definitions(-D_HAS_DEPRECATED_RESULT_OF) +else() + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) +endif() # Output binaries to bin/ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) |