mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Make C++11 mandatory.
This commit is contained in:
@@ -32,7 +32,6 @@ include(CheckCXXSourceCompiles)
|
||||
option(WITH_TESTS "Enable building of unit tests" ON)
|
||||
option(WITH_GUI_TESTS "Enable building of GUI tests" OFF)
|
||||
option(WITH_LTO "Enable Link Time Optimization (LTO)" OFF)
|
||||
option(WITH_CXX11 "Build with the C++ 11 standard" ON)
|
||||
|
||||
set(KEEPASSX_VERSION "2.0 beta 2")
|
||||
set(KEEPASSX_VERSION_NUM "1.9.92")
|
||||
@@ -115,16 +114,24 @@ if(WITH_LTO)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (WITH_CXX11)
|
||||
add_gcc_compiler_cxxflags("-std=c++0x")
|
||||
add_gcc_compiler_cflags("-ansi")
|
||||
if(APPLE)
|
||||
add_gcc_compiler_cxxflags("-stdlib=libc++")
|
||||
endif()
|
||||
check_cxx_compiler_flag("-std=c++11" CXX11_AVAILABLE)
|
||||
if (CXX11_AVAILABLE)
|
||||
add_gcc_compiler_cxxflags("-std=c++11")
|
||||
else()
|
||||
add_gcc_compiler_flags("-ansi")
|
||||
check_cxx_compiler_flag("-std=c++0x" CXX0X_AVAILABLE)
|
||||
if(CXX0X_AVAILABLE)
|
||||
add_gcc_compiler_cxxflags("-std=c++0x")
|
||||
else()
|
||||
message(FATAL_ERROR "Compiler doesn't support C++11")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
add_gcc_compiler_cxxflags("-stdlib=libc++")
|
||||
endif()
|
||||
|
||||
add_gcc_compiler_cflags("-ansi")
|
||||
|
||||
if(MINGW)
|
||||
set(CMAKE_RC_COMPILER_INIT windres)
|
||||
enable_language(RC)
|
||||
|
||||
Reference in New Issue
Block a user