File: cxx11.cmake

package info (click to toggle)
cppcheck 2.17.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 25,384 kB
  • sloc: cpp: 263,341; python: 19,737; ansic: 7,953; sh: 1,018; makefile: 996; xml: 994; cs: 291
file content (12 lines) | stat: -rw-r--r-- 497 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
macro(use_cxx11)
  # 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")
  elseif(USE_BOOST AND USE_BOOST_INT128)
    # Boost.Math requires C++14
    set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to use")
  else()
    set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to use")
  endif()
endmacro()