Browse Source

CMake: Enable C++17 mode

coverity_scan
Daniel Scharrer 8 years ago
parent
commit
51e034f936
  1. 1
      CHANGELOG
  2. 9
      cmake/CXX11Check.cmake

1
CHANGELOG

@ -6,6 +6,7 @@ innoextract 1.7 (TDB)
- Fixed case-sensitivity in parent directory when creating subdirectories
- Fixed .bin slice file names used with Inno Setup versions older than 4.1.7
- Made loading of .bin slice files case-insensitive
- Now compiles in C++17 mode if supported
innoextract 1.6 (2016-03-24)
- Added support for Inno Setup 5.5.7 (and 5.5.8) installers

9
cmake/CXX11Check.cmake

@ -26,7 +26,9 @@ set(CXX11_CHECK_DIR "${CMAKE_CURRENT_LIST_DIR}/check")
function(enable_cxx11)
if(MSVC)
if(NOT MSVC_VERSION LESS 1600)
if(NOT MSVC_VERSION LESS 2000)
if(NOT MSVC_VERSION LESS 1911)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
elseif(NOT MSVC_VERSION LESS 1910)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++14")
elseif(NOT MSVC_VERSION LESS 1900)
# Only introduced with update 3 of MSVC 2015
@ -35,7 +37,10 @@ function(enable_cxx11)
set(_HAS_CXX11 1 PARENT_SCOPE)
endif()
else()
add_cxxflag("-std=c++14")
add_cxxflag("-std=c++17")
if(NOT FLAG_FOUND)
add_cxxflag("-std=c++14")
endif()
if(NOT FLAG_FOUND)
add_cxxflag("-std=c++11")
endif()

Loading…
Cancel
Save