File: compiler_supports_cpp11.cmake

package info (click to toggle)
primecount 7.16%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,724 kB
  • sloc: cpp: 18,769; ansic: 102; makefile: 89; sh: 86
file content (11 lines) | stat: -rw-r--r-- 356 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
include(CheckCXXSourceCompiles)

# Check if compiler supports C++11 or later
check_cxx_source_compiles("
    #include <limits>
    #include <type_traits>
    int main() {
        static_assert(std::numeric_limits<unsigned int>::min() == 0, \"\");
        static_assert(std::is_integral<int>::value, \"\");
        return 0;
    }" compiler_supports_cpp11)