old_and_new_signature_tests.cmake 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.
  5. #
  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
  8. # examples.
  9. run_cmake(CopyFileErrorNoCopyFile)
  10. run_cmake(NoCopyFile)
  11. run_cmake(NoCopyFile2)
  12. run_cmake(NoCopyFileError)
  13. run_cmake(NoCStandard)
  14. run_cmake(NoLogDescription)
  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)
  22. run_cmake(TryRunArgs)
  23. run_cmake(BuildType)
  24. run_cmake(BuildTypeAsFlag)
  25. run_cmake(OutputDirAsFlag)
  26. run_cmake(CopyFileConfig)
  27. run_cmake(EnvConfig)
  28. run_cmake(TargetTypeExe)
  29. run_cmake(TargetTypeInvalid)
  30. run_cmake(TargetTypeStatic)
  31. if(CMAKE_C_STANDARD_DEFAULT)
  32. run_cmake(CStandard)
  33. elseif(DEFINED CMAKE_C_STANDARD_DEFAULT)
  34. run_cmake(CStandardNoDefault)
  35. endif()
  36. if(CMAKE_OBJC_STANDARD_DEFAULT)
  37. run_cmake(ObjCStandard)
  38. endif()
  39. if(CMAKE_CXX_STANDARD_DEFAULT)
  40. run_cmake(CxxStandard)
  41. elseif(DEFINED CMAKE_CXX_STANDARD_DEFAULT)
  42. run_cmake(CxxStandardNoDefault)
  43. endif()
  44. if(CMAKE_OBJCXX_STANDARD_DEFAULT)
  45. run_cmake(ObjCxxStandard)
  46. endif()
  47. if(CMake_TEST_CUDA)
  48. run_cmake(CudaStandard)
  49. endif()
  50. if(CMake_TEST_ISPC)
  51. run_cmake(ISPCTargets)
  52. run_cmake(ISPCInvalidTarget)
  53. set(ninja "")
  54. if(RunCMake_GENERATOR MATCHES "Ninja")
  55. set(ninja "Ninja")
  56. endif()
  57. run_cmake(ISPCDuplicateTarget${ninja})
  58. endif()
  59. if((CMAKE_C_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) OR CMAKE_C_COMPILER_ID MATCHES "LCC")
  60. run_cmake(CStandardGNU)
  61. endif()
  62. if((CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) OR CMAKE_C_COMPILER_ID MATCHES "LCC")
  63. run_cmake(CxxStandardGNU)
  64. endif()