File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 2.8.12 )
22project (Cppcheck)
33
4+ include (cmake/cxx11.cmake )
5+ use_cxx11 ()
6+
47set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
58
69include (GNUInstallDirs )
@@ -13,13 +16,11 @@ include(cmake/findDependencies.cmake)
1316include (cmake/compileroptions.cmake )
1417include (cmake/compilerDefinitions.cmake )
1518include (cmake/buildFiles.cmake )
16- include (cmake/cxx11.cmake )
1719include (cmake/printInfo.cmake )
1820if (BUILD_GUI)
1921 include (cmake/qtCompat.cmake )
2022endif ()
2123
22- use_cxx11 ()
2324
2425file (GLOB addons "addons/*.py" )
2526file (GLOB cfgs "cfg/*.cfg" )
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ if (MSVC)
154154
155155 # C/C++ - Language
156156 add_compile_options (/Zc:rvalueCast ) # Enforce type conversion rules
157- add_compile_options (/std:c++14 ) # C++ Language Standard - ISO C++14 Standard
157+ # add_compile_options(/std:c++14) # C++ Language Standard - ISO C++14 Standard
158158
159159 # C/C++ - Browse Information
160160 # Enable Browse Information - No
Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ macro(use_cxx11)
66 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
77 endif ()
88 else ()
9- set (CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to use" )
9+ # some GitHub Action windows runners randomly fail with a complaint that Qt6 requires a C++17 compiler
10+ if (MSVC )
11+ set (CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use" )
12+ else ()
13+ set (CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to use" )
14+ endif ()
1015 set (CMAKE_CXX_STANDARD_REQUIRED ON )
1116 if (POLICY CMP0025)
1217 cmake_policy (SET CMP0025 NEW )
Original file line number Diff line number Diff line change 11message ( STATUS "------------------ General configuration for ${PROJECT_NAME} ${VERSION} -----------------" )
22message ( STATUS )
3+ message ( STATUS "CMake Version = ${CMAKE_VERSION} " )
34message ( STATUS "CMake Generator = ${CMAKE_GENERATOR} " )
45message ( STATUS "Compiler = ${CMAKE_CXX_COMPILER_ID} " )
56message ( STATUS "Compiler Version = ${CMAKE_CXX_COMPILER_VERSION} " )
67message ( STATUS "Build type = ${CMAKE_BUILD_TYPE} " )
8+ message ( STATUS "CMake C++ Standard = ${CMAKE_CXX_STANDARD} " )
79message ( STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX} " )
810message ( STATUS "CMAKE_DISABLE_PRECOMPILE_HEADERS = ${CMAKE_DISABLE_PRECOMPILE_HEADERS} " )
911message ( STATUS "C++ flags (General) = ${CMAKE_CXX_FLAGS} " )
@@ -12,10 +14,10 @@ message( STATUS "C++ flags (RelWithDebInfo) = ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
1214message ( STATUS "C++ flags (Debug) = ${CMAKE_CXX_FLAGS_DEBUG} " )
1315message ( STATUS "CMAKE_EXE_LINKER_FLAGS = ${CMAKE_EXE_LINKER_FLAGS} " )
1416message ( STATUS "CPPCHK_GLIBCXX_DEBUG = ${CPPCHK_GLIBCXX_DEBUG} " )
15- get_directory_property ( DirDefs DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
16- foreach ( d ${DirDefs} )
17- message ( STATUS "Found Define: " ${d} )
18- endforeach ( )
17+ get_directory_property ( DirCompileDefs DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
18+ message ( STATUS "COMPILE_DEFINITIONS (global) = ${DirCompileDefs} " )
19+ get_directory_property ( DirCompileOptions DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_OPTIONS )
20+ message ( STATUS "COMPILE_OPTIONS (global) = ${DirCompileOptions} " )
1921message ( STATUS )
2022message ( STATUS "---------------------------------------------------------" )
2123message ( STATUS "ANALYZE_MEMORY = ${ANALYZE_MEMORY} " )
You can’t perform that action at this time.
0 commit comments