Use C++17 (#579)
* Use C++17 * Replace std::random_shuffle with std::shuffle * Add random include
This commit is contained in:
@@ -29,12 +29,12 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
|
||||
set(OPENBSD ON)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
list(APPEND COMPILE_OPTIONS
|
||||
$<$<COMPILE_LANGUAGE:C>:--std=c99>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:--std=c++11>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:--std=c++17>
|
||||
-U__STRICT_ANSI__
|
||||
-Wall
|
||||
-Wextra
|
||||
@@ -375,7 +375,7 @@ endif(USE_BUNDLE AND NOT USE_BUNDLE_DIR)
|
||||
# Check that we have sqlite3 with FTS5
|
||||
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_REQUIRED_FLAGS "--std=c++11")
|
||||
set(CMAKE_REQUIRED_FLAGS "--std=c++17")
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${QtCore_LIBRARIES} ${QtSql_LIBRARIES})
|
||||
check_cxx_source_runs("
|
||||
#include <QSqlDatabase>
|
||||
|
||||
Reference in New Issue
Block a user