CMake/Tests
Brad King 487b6ccdcd Merge topic 'WriteCompilerDetectionHeader-compiler-versions'
ddec418a Features: Add compiler version support to WriteCompilerDetectionHeader.
b7029576 Project: Add configurable name for version computation macros.
78acaafe Project: Separate simulated compiler id from version detection.
567af1a5 WCDH: Issue a better message for version compatibility.
2014-06-10 09:17:43 -04:00
..
AliasTarget HP aCC: record compiler flag for Ansi C++98 support for version 3.80 onwards 2014-04-25 17:59:57 +02:00
Architecture Xcode: Fix test architecture selection for Xcode >= 5 2013-10-02 12:48:20 -04:00
ArgumentExpansion
Assembler Tests/Assembler: Drop -g when generating sample assembly source 2013-11-01 10:55:58 -04:00
BuildDepends Tests/BuildDepends: Make 3-second delay more robust 2014-05-19 10:51:16 -04:00
BundleGeneratorTest Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
BundleTest Tests/BundleTest: Drop use of ChangeLog.txt 2014-02-07 13:35:31 -05:00
BundleUtilities Tests: Don't read the LOCATION property from build targets. 2013-11-19 18:07:27 +01:00
CFBundleTest CFBundle test: Add isysroot argument when calling Rez. 2013-11-06 06:42:44 -07:00
CMakeCommands Features: Extend concept to C language. 2014-05-15 00:15:18 +02:00
CMakeLib Tests: Fix CMakeLib.testRST for relative __FILE__ 2014-06-06 10:39:45 -04:00
CMakeOnly Tests: Teach CMakeOnly.AllFindModules to tolerate a system KDE4 2014-03-19 13:33:00 -04:00
CMakeTestAllGenerators
CMakeTestBadCommandLines Add test CMakeTestBadCommandLines. Also add --graphviz arg to cmake invoked during the CPackComponents test. The purpose of each is to increase coverage of cmake.cxx. 2009-10-27 12:18:41 -04:00
CMakeTestMultipleConfigures
CMakeTests Replace string(REGEX REPLACE) with string(REPLACE) where possible 2014-04-14 18:17:05 +02:00
COnly Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CPackComponents Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CPackComponentsForAll cpack: For DragNDrop generator, add sysroot option when calling Rez. 2013-10-31 20:25:12 -06:00
CPackTestAllGenerators
CPackWiXGenerator CPackWiX: Fix test to build with expected config 2014-03-08 13:05:40 -05:00
CTestBuildCommandProjectInSubdir Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestConfig Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestLimitDashJ
CTestScriptMode
CTestTest Fix wording of "the the" typos throughout text 2014-01-03 11:35:32 -05:00
CTestTest2 CTestTest*: Update minimum required CMake to 2.4 2013-10-23 08:54:31 -04:00
CTestTestBadExe Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestBadGenerator ctest_build: Do not crash on bad generator name 2014-05-07 11:02:16 -04:00
CTestTestChecksum Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestConfigFileInBuildDir Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestCostSerial Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestCrash Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestCycle Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestDepends Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestEmptyBinaryDirectory Tests: added test for ctest_empty_binary_directory() 2013-11-01 21:32:16 +01:00
CTestTestFailedSubmits Tests: Add generator toolset support 2013-02-07 11:09:56 -05:00
CTestTestFailure Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestFdSetSize Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestLabelRegExp CTest: Fix combined inclusive/exclusive label regular expressions 2014-06-06 10:28:18 +02:00
CTestTestLaunchers Tests: Add test for CTEST_USE_LAUNCHERS capture of custom commands 2013-10-31 09:29:55 -04:00
CTestTestMemcheck Tests/CTestTestMemcheck: Help Xcode 2.x create output dirs 2014-03-26 15:09:56 -04:00
CTestTestMissingDependsExe CTest: fix regressions introduced by the ctest-fix-run-serial topic 2013-12-23 15:31:15 +01:00
CTestTestParallel Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestResourceLock Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestRunScript
CTestTestScheduler Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestSerialInDepends CTest: fix dashboard issues associated with the ctest-fix-run-serial topic 2013-10-25 21:39:58 +02:00
CTestTestSerialOrder CTest: fix regressions introduced by the ctest-fix-run-serial topic 2013-12-23 15:31:15 +01:00
CTestTestSkipReturnCode Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestStopTime Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestSubdir Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestTimeout Tests: Try to make CTestTestTimeout more robust 2014-05-23 10:30:39 -04:00
CTestTestUpload Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestTestZeroTimeout Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CheckCompilerRelatedVariables VS12: Add Visual Studio 12 generator (#14251) 2013-06-28 18:13:14 -04:00
CoberturaCoverage CTest: Generalize Cobertura coverage format handling 2014-06-04 14:26:19 +00:00
CommandLineTest
CompatibleInterface Genex: Add EQUAL expression. 2014-01-06 17:25:09 +01:00
CompileCommandOutput Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CompileDefinitions cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy. 2014-01-08 16:41:34 +01:00
CompileFeatures Features: Add support for C++14 features. 2014-05-22 18:01:23 +02:00
CompileOptions Add generator expressions for compiler versions. 2013-06-28 14:32:58 +02:00
Complex tests: allow RelWithDebInfo and MinSizeRel configs to work 2014-06-05 12:42:13 -04:00
ComplexOneConfig tests: allow RelWithDebInfo and MinSizeRel configs to work 2014-06-05 12:42:13 -04:00
ConfigSources cmTarget: Allow transitive evaluation of SOURCES property. 2014-04-02 23:14:02 +02:00
Contracts Tests/Contracts: Submit notes with VTK build 2013-12-19 10:01:14 -05:00
CrossCompile
CustComDepend
CustomCommand add_custom_command: Normalize OUTPUT and DEPENDS paths. 2014-05-28 21:05:41 +02:00
CustomCommandWorkingDirectory
CxxDialect Features: Enable compiler extensions by default. 2014-05-31 12:16:12 +02:00
CxxOnly
Dependency
DoubleProject
EmptyDepends
EmptyLibrary
EmptyProperty set_property: Do not remove a property when APPENDing nothing 2013-07-24 10:50:15 -04:00
Environment
ExportImport Features: Extend concept to C language. 2014-05-15 00:15:18 +02:00
ExternalOBJ
ExternalProject ExternalProject: Add option to disable download progress (#14807) 2014-03-17 11:28:05 -04:00
ExternalProjectUpdate Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
FindGTK2 FindGTK2: Add tests for components and targets in gtk and gtkmm modules 2013-10-08 10:47:06 -04:00
FindModulesExecuteAll
FindPackageModeMakefileTest Remove .* expressions from beginning and end of MATCHES regexs 2014-04-14 18:17:11 +02:00
FindPackageTest Allow the Package Registry to be disabled (#14849) 2014-05-12 09:50:01 -04:00
ForceInclude
Fortran CMP0022: Fix link language propagation in NEW behavior 2014-05-19 09:11:39 -04:00
FortranC Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
FortranOnly
Framework
FunctionTest
GeneratorExpression Genex: Only evaluate TARGET_OBJECTS to determine target sources. 2014-04-02 23:12:57 +02:00
IPO
IncludeDirectories cmTarget: Fix system include annotation propagation. 2014-01-06 17:25:10 +01:00
InterfaceLibrary InterfaceLibrary: Add test requiring MAP_IMPORTED_CONFIG whitelisting 2014-01-09 20:11:42 +01:00
InterfaceLinkLibraries Introduce the INTERFACE_LINK_LIBRARIES property. 2013-07-08 22:39:09 +02:00
JCTest
Java
Jump
LibName
LinkDirectory Test: Remove obsolete commented code. 2014-01-07 09:38:00 -05:00
LinkFlags Add additonal tests for the linker flags 2013-07-31 08:41:08 -04:00
LinkLanguage
LinkLine
LinkLineOrder
LinkStatic
LoadCommand
LoadCommandOneConfig Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
MFC
MacRuntimePath Tests: Rename CMAKE_TEST_MAKEPROGRAM uses for nested test projects 2014-03-03 15:26:48 -05:00
MacroTest
MakeClean Tests: Don't read the LOCATION property from build targets. 2013-11-19 18:07:27 +01:00
MathTest
MissingInstall InstallRules: added new variable to disable generation of install rules 2014-01-08 16:28:14 +01:00
MissingSourceFile
Module Features: Add compiler version support to WriteCompilerDetectionHeader. 2014-06-09 23:42:20 +02:00
ModuleDefinition Test generated module .def files 2012-04-02 10:54:25 -04:00
MumpsCoverage CTest: Fix MUMPS coverage parsing and test 2014-05-16 10:16:40 -04:00
NewlineArgs Remove trailing whitespace from most CMake and C/C++ code 2012-08-13 14:18:39 -04:00
ObjC++
ObjectLibrary Make ExportLanguages a subtest of the ObjectLibrary test 2013-10-24 19:05:34 +02:00
OutDir
OutOfBinary
OutOfSource
PDBDirectoryAndName MSVC: Add properties to configure compiler PDB files (#14762) 2014-02-26 09:34:38 -05:00
PerConfig Remove .* expressions from beginning and end of MATCHES regexs 2014-04-14 18:17:11 +02:00
Plugin HP aCC: record compiler flag for Ansi C++98 support for version 3.80 onwards 2014-04-25 17:59:57 +02:00
Policy0002
PolicyScope
PositionIndependentTargets Add the INTERFACE_LIBRARY target type. 2013-10-07 19:56:31 -04:00
PreOrder
PrecompiledHeader
Preprocess Test COMPILE_DEFINITIONS target property get/set/get round-trip 2013-07-24 13:25:47 -04:00
Properties cmSourceFileLocation: Collapse full path for directory comparisons. 2014-03-31 23:18:43 +02:00
PythonCoverage Adding support for the Python coverage.py tool. 2013-10-08 09:20:30 -04:00
Qt4And5Automoc FindQt4: Make AUTOMOC work regardless which order Qt 4/5 is found. 2014-01-29 17:02:43 +01:00
Qt4Deploy
Qt4Targets Qt4: Extend the Qt4Targets test to cover dir and target moc parameters. 2014-05-06 13:39:45 -04:00
QtAutoUicInterface QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property. 2013-11-27 19:06:12 +01:00
QtAutogen cmTarget: Make the source files depend on the config. 2014-04-02 23:14:02 +02:00
QtAutomocNoQt Automoc: Don't create automoc targets if Qt is not used (#13999) 2013-03-12 17:42:02 -04:00
ReturnTest Fix spelling and typos (affecting binary data / module messages) 2013-05-07 08:39:19 -04:00
RunCMake Merge topic 'WriteCompilerDetectionHeader-compiler-versions' 2014-06-10 09:17:43 -04:00
RuntimePath Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SBCS
SameName Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
SetLang
Simple
SimpleCOnly Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SimpleExclude
SimpleInstall Tests: Teach SimpleInstall to use "cmake --build" 2013-11-18 08:26:22 -05:00
SimpleInstallS2 Tests: Teach SimpleInstall to use "cmake --build" 2013-11-18 08:26:22 -05:00
SourceGroups Remove trailing whitespace from most CMake and C/C++ code 2012-08-13 14:18:39 -04:00
SourcesProperty Make the SOURCES target property writable. 2014-04-02 23:14:02 +02:00
StagingPrefix Introduce CMAKE_STAGING_PREFIX variable. 2013-11-21 11:48:03 +01:00
StringFileTest EVIS: Add tests for syntax corner cases and CMP0053 2014-05-08 13:24:49 -04:00
SubDir
SubDirSpaces Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient 2014-04-14 18:17:18 +02:00
SubProject
SwigTest
SystemInformation Features: Add support for C++14 features. 2014-05-22 18:01:23 +02:00
TarTest
TargetName
TestDriver
Testing Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
TestsWorkingDirectory
TryCompile Merge topic 'try_compile-COPY_FILE_ERROR' 2013-07-15 09:33:32 -04:00
Tutorial Tests: Don't read the LOCATION property from build targets. 2013-11-19 18:07:27 +01:00
Unset unset: Add PARENT_SCOPE option 2013-10-08 08:37:50 -04:00
VSExcludeFromDefaultBuild
VSExternalInclude VS12: Add Visual Studio 12 generator (#14251) 2013-06-28 18:13:14 -04:00
VSGNUFortran
VSMidl
VSProjectInSubdir VS: Add test for building MSBuild project in subdir 2013-04-12 11:35:36 -04:00
VSResource Add support for Visual Studio project-specific globals (#8707) 2011-07-29 10:04:36 -04:00
VSWindowsFormsResx VS: Add Resx configuration to the vcxproj file 2013-06-28 09:23:41 -04:00
VariableUnusedViaSet
VariableUnusedViaUnset
VariableUsage
VisibilityInlinesHidden VisibilityInlinesHidden: only apply -fvisibility-inlines-hidden to C++ sources 2014-02-01 09:55:24 +01:00
WarnUnusedCliUnused CLI: Suppress the unused warning if the key value pair is cached. 2013-06-04 12:38:56 +02:00
Wrapping Tests: Don't read the LOCATION property from build targets. 2013-11-19 18:07:27 +01:00
X11
iOSNavApp Xcode: Add test to demonstrate iOS project in Xcode 2011-09-12 15:46:24 -04:00
.NoDartCoverage
BootstrapTest.cmake Tests: Launch BootstrapTest through cmake instead of ctest 2013-11-18 08:26:22 -05:00
CMakeBuildTest.cmake.in Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CMakeCopyright.cmake Copyright.txt: Add test to check year range 2013-11-12 16:35:26 -05:00
CMakeInstall.cmake Tests: Launch CMake.Install test through 'cmake --build' 2013-11-18 08:26:22 -05:00
CMakeLists.txt Merge topic 'dev/backtrace-performance' 2014-06-09 10:28:44 -04:00
CTestUpdateBZR.cmake.in
CTestUpdateCVS.cmake.in
CTestUpdateCommon.cmake Replace string(REGEX REPLACE) with string(REPLACE) where possible 2014-04-14 18:17:05 +02:00
CTestUpdateGIT.cmake.in CTest: Fix ctest_update with 'HEAD' file in source tree 2013-02-28 11:52:30 -05:00
CTestUpdateGIT.sh.in
CTestUpdateHG.cmake.in
CTestUpdateP4.cmake.in ctest_update: Do not remove the p4 depot name 2013-11-01 08:52:26 -04:00
CTestUpdateSVN.cmake.in
CheckFortran.cmake
EnforceConfig.cmake.in
README
RegexEscapeString.cmake Fix test failures caused by regexp-sensitive characters in the build paths 2013-06-03 16:51:21 +02:00
bootstrap.bat.in
test_clean.cmake.in

README

If you think about adding a new testcase then here is a small checklist you
can run through to find a proper place for it. Go through the list from the
beginning and stop once you find something that matches your tests needs,
i.e. if you will test a module and only need the configure mode use the
instructions from section 2, not 3.

1. Your testcase can run in CMake script mode, i.e. "cmake -P something"

Put your test in Tests/CMakeTests/ directory as a .cmake.in file. It will be
put into the test binary directory by configure_file(... @ONLY) and run from
there. Use the AddCMakeTest() macro in Tests/CMakeTests/CMakeLists.txt to add
your test to the test runs.

2. Your test needs CMake to run in configure mode, but will not build anything

This includes tests that will build something using try_compile() and friends,
but nothing that expects add_executable(), add_library(), or add_test() to run.

If the test configures the project only once and it must succeed then put it
into the Tests/CMakeOnly/ directory.  Create a subdirectory named like your
test and write the CMakeLists.txt you need into that subdirectory. Use the
add_CMakeOnly_test() macro from Tests/CMakeOnly/CMakeLists.txt to add your
test to the test runs.

If the test configures the project with multiple variations and verifies
success or failure each time then put it into the Tests/RunCMake/ directory.
Read the instructions in Tests/RunCMake/CMakeLists.txt to add a test.

3. If you are testing something from the Modules directory

Put your test in the Tests/Modules/ directory. Create a subdirectory there
named after your test. Use the ADD_TEST_MACRO macro from Tests/CMakeLists.txt
to add your test to the test run. If you have put your stuff in
Tests/Modules/Foo then you call it using ADD_TEST_MACRO(Module.Foo Foo).

4. You are doing other stuff.

Find a good place ;) In doubt mail to cmake-developers@cmake.org and ask for
advise.