summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
blob: f083751c2218bdf2b399fad352d15c8f7858571b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
include(RunCMake)

run_cmake(NotAFeature)
run_cmake(NotAFeatureGenex)
run_cmake(NotAFeatureTransitive)
run_cmake(NotAFeature_OriginDebug)
run_cmake(NotAFeature_OriginDebugGenex)
run_cmake(NotAFeature_OriginDebugTransitive)
run_cmake(NotAFeature_OriginDebug_target_compile_features)

run_cmake(generate_feature_list)
file(READ
  "${RunCMake_BINARY_DIR}/generate_feature_list-build/features.txt"
  FEATURES
)

if (NOT FEATURES)
  run_cmake(NoSupportedCxxFeatures)
  run_cmake(NoSupportedCxxFeaturesGenex)
endif()

foreach(standard 98 11)
  file(READ
    "${RunCMake_BINARY_DIR}/generate_feature_list-build/cxx${standard}_flag.txt"
    CXX${standard}_FLAG
  )
  if (CXX${standard}_FLAG STREQUAL NOTFOUND)
    run_cmake(RequireCXX${standard})
    run_cmake(RequireCXX${standard}Variable)
  endif()
  if (CXX${standard}EXT_FLAG STREQUAL NOTFOUND)
    run_cmake(RequireCXX${standard}Ext)
    run_cmake(RequireCXX${standard}ExtVariable)
  endif()
endforeach()