CMake/Tests
Brad King 3be0a7b4bf Merge topic 'FixImplicitDepends2'
05f162c AddCustomCommand: Handle multiple IMPLICIT_DEPENDS files (#10048)
c66f03a cmDepends: No dependency-vector erasure in CheckDependencies
e74ff7c cmDepends: allow multiple dependees per depender
ecc77d0 cmDependsC: fix indentation
3e7d97d cmDependsC: remove code duplication
b4e8f49 cmDependsC: remove unused member variable
2012-11-06 14:13:58 -05:00
..
Architecture
ArgumentExpansion Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Assembler Tests/Assembler: Use CMAKE_OSX_SYSROOT to generate .s file 2012-09-21 11:15:23 -04:00
BuildDepends AddCustomCommand: Handle multiple IMPLICIT_DEPENDS files (#10048) 2012-11-06 11:54:58 -05:00
BundleGeneratorTest Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
BundleTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
BundleUtilities Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CFBundleTest Fix XCode -> Xcode typos, notably in man page (#12231) 2011-05-31 09:13:00 -04:00
CMakeCommands/target_link_libraries Use generalized RunCMake test infrastrucure for build_command test 2012-03-12 09:33:21 -04:00
CMakeLib Avoid string.clear and string.push_back (#13319) 2012-06-19 14:21:34 -04:00
CMakeOnly FindQt: add to MajorVersionSelection test 2012-11-01 10:27:20 +01:00
CMakeTestAllGenerators Ensure libgmp-10.dll is in the PATH for CMakeTestAllGenerators 2011-07-29 11:13:33 -04:00
CMakeTestBadCommandLines
CMakeTestMultipleConfigures Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CMakeTests Add several get_property() tests 2012-11-02 17:10:07 +01: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 Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CPackTestAllGenerators
CTestConfig CTest: Add test to verify -D variable definitions work 2012-06-25 08:25:51 -04:00
CTestScriptMode Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CTestTest Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTest2 Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestBadExe Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestChecksum Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestConfigFileInBuildDir Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestCostSerial Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CTestTestCrash Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestCycle Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestDepends Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestFailedSubmits Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestFailure Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestMemcheck CTest: add a check with a quoted memory checker 2012-10-04 23:07:31 +02:00
CTestTestParallel Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestResourceLock Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestRunScript Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestScheduler Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CTestTestStopTime Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CTestTestSubdir Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestTimeout Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestUpload Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestZeroTimeout Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CheckCompilerRelatedVariables VS: Fix MSVC_IDE definition recently broken by refactoring 2012-08-30 16:18:05 -04:00
CommandLineTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CompileCommandOutput Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CompileDefinitions GenEx: Test the use of generator expressions to generate lists. 2012-10-17 16:21:12 -04:00
Complex Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
ComplexOneConfig Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Contracts Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CrossCompile Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CustComDepend Remove trailing whitespace from most CMake and C/C++ code 2012-08-13 14:18:39 -04:00
CustomCommand Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CustomCommandWorkingDirectory Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CxxOnly Fix CXX/Fortran MODULE flags when enabled before C (#12929) 2012-02-03 15:45:13 -05:00
Dependency Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
DocTest Remove trailing whitespace from most CMake and C/C++ code 2012-08-13 14:18:39 -04:00
DoubleProject Fix the case where cmake --build failed with two project cmds in one file. 2011-12-20 14:16:25 -05:00
EmptyLibrary
Environment
ExportImport exports: add a test for exporting dependent targets 2012-09-30 10:27:02 -04:00
ExternalOBJ Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
ExternalProject ExternalProject: Generalize URL_MD5 option to URL_HASH 2012-09-11 16:00:57 -04:00
FindModulesExecuteAll Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
FindPackageModeMakefileTest Fix FindPackageMode test Makefile (#13314) 2012-06-19 08:26:01 -04:00
FindPackageTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
ForceInclude
Fortran Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
FortranC
FortranOnly Fortran: Add support for free- and fixed-form flags 2011-08-31 10:24:43 -04:00
Framework Remove trailing whitespace from most CMake and C/C++ code 2012-08-13 14:18:39 -04:00
FunctionTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
GeneratorExpression Merge topic 'fix-genex-CONFIG' 2012-11-06 14:13:10 -05:00
IPO Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
IncludeDirectories GexEx: Validate Target names and property names differently. 2012-10-22 14:05:48 -04:00
JCTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Java Remove trailing whitespace from most CMake and C/C++ code 2012-08-13 14:18:39 -04:00
Jump Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
LibName Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
LinkDirectory
LinkFlags Intel-specific workaround for LinkFlags tests 2010-06-03 09:47:23 -04:00
LinkLanguage
LinkLine Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
LinkLineOrder Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
LinkStatic Test static linking with LINK_SEARCH_START_STATIC 2011-03-04 08:37:57 -05:00
LoadCommand Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
LoadCommandOneConfig Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
MFC Tests: Only really run MFC test if we can build MFC apps (#11213) 2011-12-16 16:30:10 -05:00
MacroTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
MakeClean Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
MathTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
MissingSourceFile Test that missing source mentions directory (#11677) 2011-01-15 08:16:50 -05:00
Module CheckTypeSize: add a test for size of struct members 2012-08-14 21:14:33 +02:00
ModuleDefinition Test generated module .def files 2012-04-02 10:54:25 -04:00
MumpsCoverage Update test data to match new coverage format. 2012-05-07 15:46:29 -04:00
NewlineArgs Remove trailing whitespace from most CMake and C/C++ code 2012-08-13 14:18:39 -04:00
ObjC++ Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
ObjectLibrary Tests/ObjectLibrary: Do not enable CXX in subdirectories 2012-08-20 14:47:33 -04:00
OutDir
OutOfBinary Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
OutOfSource Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
PDBDirectoryAndName Run PDBDirectoryAndName test on MSVC and Intel 2012-09-29 07:17:42 -04:00
PerConfig Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Plugin Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Policy0002
PolicyScope Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
PositionIndependentTargets Fix PositionIndependentTargets test with clang trunk. 2012-06-27 16:39:24 +02:00
PreOrder Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
PrecompiledHeader Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Preprocess Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Properties Remove CMake multiline block-end command arguments 2012-08-15 16:50:29 -04:00
Qt4Deploy Remove QtGui dependency in Qt4Deploy test and verify QtSql existance. 2012-02-29 07:55:31 -07:00
QtAutomoc automoc: add define to test which caused bug #13018 2012-03-26 22:11:46 +02:00
ReturnTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
RunCMake GenEx: Test early determination of AND and OR 2012-10-20 14:23:47 +02:00
RuntimePath Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SBCS Visual Studio: Allow setting Single Byte Character Set (#12189) 2012-02-17 11:30:23 -05:00
SameName Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
SetLang Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Simple Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SimpleCOnly Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SimpleExclude Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SimpleInstall Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SimpleInstallS2 Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SourceGroups Remove trailing whitespace from most CMake and C/C++ code 2012-08-13 14:18:39 -04:00
StringFileTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SubDir Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SubDirSpaces Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SubProject
SwigTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
SystemInformation Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
TarTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
TargetName Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
TestDriver Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
Testing Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
TestsWorkingDirectory Fix XCode -> Xcode typos, notably in man page (#12231) 2011-05-31 09:13:00 -04:00
TryCompile Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Tutorial Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Unset Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
VSExternalInclude Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
VSGNUFortran Tests/VSGNUFortran: Avoid C++ comment in C code (#13314) 2012-06-18 16:18:27 -04:00
VSMidl
VSResource Add support for Visual Studio project-specific globals (#8707) 2011-07-29 10:04:36 -04:00
VariableUnusedViaSet Add test for unused detection via setting it 2010-09-16 13:52:54 -04:00
VariableUnusedViaUnset
VariableUsage
Wrapping Fix casing of 'Qt' in docs, comments and user-visible strings. 2012-08-28 11:24:55 +02:00
X11 Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
iOSNavApp Xcode: Add test to demonstrate iOS project in Xcode 2011-09-12 15:46:24 -04:00
.NoDartCoverage
CMakeBuildTest.cmake.in Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CMakeInstall.cmake
CMakeLists.txt GenEx: Use case insensitive comparison for $<CONFIG:...> 2012-11-05 08:49:25 -05:00
CMakeWizardTest.cmake
CTestUpdateBZR.cmake.in Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CTestUpdateCVS.cmake.in Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CTestUpdateCommon.cmake Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CTestUpdateGIT.cmake.in Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CTestUpdateGIT.sh.in
CTestUpdateHG.cmake.in Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CTestUpdateSVN.cmake.in Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CheckFortran.cmake
EnforceConfig.cmake.in Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
README Add stronger infrastructure for CMake-only tests 2012-03-12 09:33:21 -04:00
TestInstall.sh.in
bootstrap.bat.in
test_clean.cmake.in Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00

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.