1 # These tests are performed using both the historic and the newer SOURCES
2 # signatures of try_compile. It is critical that they behave the same and
3 # produce comparable output for both signatures. Tests that cannot do this
4 # belong in RunCMakeTests.txt, not here.
6 # Tests here MUST include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS}) and
7 # use the variables defined therein appropriately. Refer to existing tests for
10 run_cmake(CopyFileErrorNoCopyFile)
12 run_cmake(NoCopyFile2)
13 run_cmake(NoCopyFileError)
14 run_cmake(NoCStandard)
15 run_cmake(NoOutputVariable)
16 run_cmake(NoOutputVariable2)
17 run_cmake(BadLinkLibraries)
18 run_cmake(BadSources1)
19 run_cmake(BadSources2)
20 run_cmake(EmptyValueArgs)
21 run_cmake(EmptyListArgs)
24 run_cmake(BuildTypeAsFlag)
25 run_cmake(OutputDirAsFlag)
29 run_cmake(TargetTypeExe)
30 run_cmake(TargetTypeInvalid)
31 run_cmake(TargetTypeStatic)
33 if(CMAKE_C_STANDARD_DEFAULT)
35 elseif(DEFINED CMAKE_C_STANDARD_DEFAULT)
36 run_cmake(CStandardNoDefault)
38 if(CMAKE_OBJC_STANDARD_DEFAULT)
39 run_cmake(ObjCStandard)
41 if(CMAKE_CXX_STANDARD_DEFAULT)
42 run_cmake(CxxStandard)
43 elseif(DEFINED CMAKE_CXX_STANDARD_DEFAULT)
44 run_cmake(CxxStandardNoDefault)
46 if(CMAKE_OBJCXX_STANDARD_DEFAULT)
47 run_cmake(ObjCxxStandard)
50 run_cmake(CudaStandard)
53 run_cmake(ISPCTargets)
54 run_cmake(ISPCInvalidTarget)
56 if(RunCMake_GENERATOR MATCHES "Ninja")
59 run_cmake(ISPCDuplicateTarget${ninja})
61 if((CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) OR CMAKE_C_COMPILER_ID MATCHES "LCC")
62 run_cmake(CStandardGNU)
64 if((CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) OR CMAKE_C_COMPILER_ID MATCHES "LCC")
65 run_cmake(CxxStandardGNU)