summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/try_compile/old_and_new_signature_tests.cmake
blob: ac07ad32e52f26f70e90c62475c879533bc4f1e6 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# These tests are performed using both the historic and the newer SOURCES
# signatures of try_compile. It is critical that they behave the same and
# produce comparable output for both signatures. Tests that cannot do this
# belong in RunCMakeTests.txt, not here.
#
# Tests here MUST include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS}) and
# use the variables defined therein appropriately. Refer to existing tests for
# examples.

run_cmake(CopyFileErrorNoCopyFile)
run_cmake(NoCopyFile)
run_cmake(NoCopyFile2)
run_cmake(NoCopyFileError)
run_cmake(NoCStandard)
run_cmake(NoOutputVariable)
run_cmake(NoOutputVariable2)
run_cmake(BadLinkLibraries)
run_cmake(BadSources1)
run_cmake(BadSources2)
run_cmake(EmptyValueArgs)
run_cmake(EmptyListArgs)
run_cmake(TryRunArgs)
run_cmake(BuildType)
run_cmake(BuildTypeAsFlag)
run_cmake(OutputDirAsFlag)

run_cmake(EnvConfig)

run_cmake(TargetTypeExe)
run_cmake(TargetTypeInvalid)
run_cmake(TargetTypeStatic)

if(CMAKE_C_STANDARD_DEFAULT)
  run_cmake(CStandard)
elseif(DEFINED CMAKE_C_STANDARD_DEFAULT)
  run_cmake(CStandardNoDefault)
endif()
if(CMAKE_OBJC_STANDARD_DEFAULT)
  run_cmake(ObjCStandard)
endif()
if(CMAKE_CXX_STANDARD_DEFAULT)
  run_cmake(CxxStandard)
elseif(DEFINED CMAKE_CXX_STANDARD_DEFAULT)
  run_cmake(CxxStandardNoDefault)
endif()
if(CMAKE_OBJCXX_STANDARD_DEFAULT)
  run_cmake(ObjCxxStandard)
endif()
if(CMake_TEST_CUDA)
  run_cmake(CudaStandard)
endif()
if(CMake_TEST_ISPC)
  run_cmake(ISPCTargets)
  run_cmake(ISPCInvalidTarget)
  set(ninja "")
  if(RunCMake_GENERATOR MATCHES "Ninja")
    set(ninja "Ninja")
  endif()
  run_cmake(ISPCDuplicateTarget${ninja})
endif()
if((CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) OR CMAKE_C_COMPILER_ID MATCHES "LCC")
  run_cmake(CStandardGNU)
endif()
if((CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) OR CMAKE_C_COMPILER_ID MATCHES "LCC")
  run_cmake(CxxStandardGNU)
endif()