-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modernized and cleaned up CMake files / explicitly check for CMake 3.…
…13 with Visual Studio [skip ci]
- Loading branch information
Showing
10 changed files
with
26 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
macro(use_cxx11) | ||
if (CMAKE_VERSION VERSION_LESS "3.1") | ||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") | ||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
endif () | ||
# some GitHub Action Windows runners randomly fail with a complaint that Qt6 requires a C++17 compiler | ||
if (MSVC AND USE_QT6) | ||
# CMAKE_CXX_STANDARD 17 was added in CMake 3.8 | ||
set (CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use") | ||
else () | ||
# some GitHub Action windows runners randomly fail with a complaint that Qt6 requires a C++17 compiler | ||
if (MSVC) | ||
set (CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use") | ||
else () | ||
set (CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to use") | ||
endif() | ||
set (CMAKE_CXX_STANDARD_REQUIRED ON) | ||
if (POLICY CMP0025) | ||
cmake_policy(SET CMP0025 NEW) | ||
endif () | ||
endif () | ||
set (CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to use") | ||
endif() | ||
endmacro(use_cxx11) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters