CMake/Tests
Brad King 0ac18d40c8 Remove `//------...` horizontal separator comments
Modern editors provide plenty of ways to visually separate functions.
Drop the explicit comments that previously served this purpose.
Use the following command to automate the change:

    $ git ls-files -z -- \
        "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" |
      egrep -z -v "^Source/cmCommandArgumentLexer\." |
      egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" |
      egrep -z -v "^Source/cmDependsJavaLexer\." |
      egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" |
      egrep -z -v "^Source/cmExprLexer\." |
      egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" |
      egrep -z -v "^Source/cmFortranLexer\." |
      egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" |
      egrep -z -v "^Source/cmListFileLexer\." |
      egrep -z -v "^Source/cm_sha2" |
      egrep -z -v "^Source/(kwsys|CursesDialog/form)/" |
      egrep -z -v "^Utilities/(KW|cm).*/" |
      xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}'

This avoids modifying third-party sources and generated sources.
2016-05-09 09:41:43 -04:00
..
AliasTarget Merge topic 'fix-target-alias-in-subdir' 2016-04-05 09:37:59 -04:00
Architecture
ArgumentExpansion
Assembler
BuildDepends Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
BundleGeneratorTest
BundleTest Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
BundleUtilities Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
CFBundleTest FindBoost: Define Boost::boost for all boost versions 2016-04-19 22:07:45 +01:00
CMakeCommands Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
CMakeLib Remove `//------...` horizontal separator comments 2016-05-09 09:41:43 -04:00
CMakeOnly Merge topic 'FindProtobuf-variable-case' 2016-03-11 08:30:46 -05:00
CMakeTestAllGenerators
CMakeTestMultipleConfigures
CMakeTests PushCheckStateTest: Update test to check CMAKE_EXTRA_INCLUDE_FILES 2016-03-31 11:11:32 -04:00
COnly
CPackComponents Replace http://www.cmake.org URLs with https://cmake.org 2015-09-25 15:47:39 -04:00
CPackComponentsDEB Merge topic 'cpack-deb-config-file-source-field' 2015-11-06 14:58:11 -05:00
CPackComponentsForAll CPack/RPM external symlink handling 2016-04-01 09:52:04 -04:00
CPackComponentsPrefix CPack: Enable DEB and RPM tests more reliably 2015-05-12 08:56:34 -04:00
CPackTestAllGenerators
CPackWiXGenerator Replace http://www.cmake.org URLs with https://cmake.org 2015-09-25 15:47:39 -04:00
CTestBuildCommandProjectInSubdir
CTestConfig
CTestCoverageCollectGCOV CTestCoverageCollectGCOV: Honor CTEST_EXTRA_COVERAGE_GLOB 2016-04-07 08:53:30 -04:00
CTestLimitDashJ
CTestScriptMode
CTestTest
CTestTest2 Tests: In CTestTest2 skip the kwsys.testProcess-10 test that leaks 2015-07-31 09:27:08 -04:00
CTestTestBadExe
CTestTestBadGenerator
CTestTestChecksum
CTestTestCostSerial
CTestTestCrash
CTestTestCycle
CTestTestDepends
CTestTestEmptyBinaryDirectory
CTestTestFailure
CTestTestFdSetSize
CTestTestLabelRegExp
CTestTestLaunchers
CTestTestMissingDependsExe
CTestTestParallel
CTestTestResourceLock
CTestTestRunScript
CTestTestScheduler
CTestTestSerialInDepends
CTestTestSerialOrder
CTestTestSkipReturnCode
CTestTestStopTime
CTestTestSubdir
CTestTestTimeout
CTestTestUpload
CTestTestVerboseOutput CTest: Output test-specific env vars in verbose mode (#15446) 2015-03-17 10:11:33 -04:00
CTestTestZeroTimeout
CheckCompilerRelatedVariables
CoberturaCoverage
CommandLineTest
CompatibleInterface
CompileCommandOutput
CompileDefinitions Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
CompileFeatures Features: Record standards and features for Intel C on UNIX 2016-04-28 09:16:35 -04:00
CompileOptions Embarcadero: Check code using CMAKE_CXX_COMPILER_ID and CMAKE_C_COMPILER_ID. 2015-12-03 21:37:06 +00:00
Complex Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
ComplexOneConfig Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
ConfigSources
Contracts Replace http://www.cmake.org URLs with https://cmake.org 2015-09-25 15:47:39 -04:00
CrossCompile
CustComDepend
CustomCommand Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
CustomCommandByproducts ExternalProject: Replace placeholder tokens in BYPRODUCTS 2015-03-09 10:04:44 -04:00
CustomCommandWorkingDirectory
CxxDialect
CxxOnly
CxxSubdirC
DelphiCoverage Tests: Fix DelphiCoverage test file selection 2015-10-20 11:13:25 -04:00
Dependency
DoubleProject
EmptyDepends
EmptyLibrary
EmptyProperty
Environment
ExportImport Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
ExternalOBJ
ExternalProject ExternalProject: Add option to perform a shallow Git clone (#15291) 2016-04-27 10:58:07 -04:00
ExternalProjectLocal Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
ExternalProjectSubdir Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
ExternalProjectUpdate Fix spelling typos in comments and documentation (#16037) 2016-03-29 14:31:02 -04:00
FindBoost FindBoost: Define Boost::boost for all boost versions 2016-04-19 22:07:45 +01:00
FindGSL Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindGTK2 Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindGTest Tests: Add tests for FindGTest 2015-12-10 23:09:16 +00:00
FindJsonCpp FindJsonCpp: Drop new module due to upstream jsoncpp providing package 2015-02-20 08:22:02 -05:00
FindLTTngUST Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindMatlab Tests: Increasing the stability of the FindMatlab.basic_checks test 2015-04-13 09:36:13 -04:00
FindModulesExecuteAll
FindOpenSSL FindOpenSSL: Provide imported targets OpenSSL::{SSL,Crypto} 2015-08-13 10:58:40 -04:00
FindPNG Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindPackageModeMakefileTest Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindPackageTest Tests: Fix failures when running under the default install prefix (#15566) 2015-05-14 10:07:37 -04:00
FindTIFF FindTIFF: Add imported targets and update documentation 2015-12-07 09:20:08 -05:00
FindThreads FindThreads: officially announce it works with only C++ enabled 2015-09-25 10:08:35 -04:00
FindXalanC Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindXercesC FindXercesC: Add imported targets and unit test 2015-11-23 14:28:05 -05:00
ForceInclude
Fortran Merge topic 'test-FortranCInterface-again' 2016-02-08 10:33:07 -05:00
FortranC Tests: Fix CMAKE_MAKE_PROGRAM selection in FortranC.Flags test 2015-08-11 10:18:05 -04:00
FortranOnly
Framework
FunctionTest
GeneratorExpression Genex: Add a SHELL_PATH expression 2015-09-28 10:37:33 -04:00
GhsMulti Add a 'Green Hills MULTI' generator on Windows 2015-04-20 13:55:40 -04:00
GhsMultiDuplicateSourceFilenames GHS: Fix handling of duplicate source filenames (#16046) 2016-04-25 10:46:09 -04:00
IPO
IncludeDirectories Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
InterfaceLibrary Allow add_dependencies() on INTERFACE libraries (#15414) 2015-03-27 16:25:09 -04:00
InterfaceLinkLibraries
JCTest
JacocoCoverage CTest: Fix Jacoco Coverage 2015-03-06 11:18:19 -05:00
Java UseJava: Teach add_jar to support file syntax for sources 2015-08-04 11:19:43 -04:00
JavaJavah UseJava: Fix create_javah CLASSPATH handling on Windows 2016-01-19 10:36:11 -05:00
JavascriptCoverage
Jump
LibName
LinkDirectory
LinkFlags
LinkLanguage
LinkLine
LinkLineOrder
LinkStatic
LoadCommand Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
LoadCommandOneConfig Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
MFC Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
MSManifest MSVC: Fix linking with /MANIFEST:NO option 2015-11-18 09:31:56 -05:00
MacRuntimePath
MacroTest
MakeClean
MathTest
MissingInstall
MissingSourceFile
Module WCDH: Add Intel to list of supported compilers 2016-04-28 09:16:36 -04:00
ModuleDefinition
MumpsCoverage
NewlineArgs
ObjC++
ObjectLibrary Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
OutDir
OutOfBinary Ninja: Centralize path conversion in global generator (#15757) 2015-09-25 14:36:30 -04:00
OutOfSource Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
PDBDirectoryAndName Merge topic 'remove-vs6-generator' 2016-03-10 09:16:23 -05:00
PerConfig
Plugin Tests: Fix Plugin test include order 2016-05-03 10:08:41 -04:00
Policy0002
PolicyScope
PositionIndependentTargets
PreOrder
PrecompiledHeader Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
Preprocess Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
Properties
PythonCoverage
Qt4And5Automoc
Qt4Deploy Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
Qt4Targets
QtAutoUicInterface
QtAutogen Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
QtAutomocNoQt
ReturnTest
RunCMake CustomCommandGenerator: Add support for CROSSCOMPILING_EMULATOR 2016-05-09 08:56:27 -04:00
RuntimePath
SBCS
SameName
SetLang
Simple
SimpleCOnly
SimpleExclude
SimpleInstall install: Allow generator expressions in DIRECTORY 2016-01-13 09:02:06 -05:00
SimpleInstallS2 install: Allow generator expressions in DIRECTORY 2016-01-13 09:02:06 -05:00
SourceFileProperty
SourceGroups
SourcesProperty
StagingPrefix Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
StringFileTest Tests: Stabilize include order in StringFileTest 2016-04-29 10:56:58 -04:00
SubDir Subdirs: Initialize from parent before configuring. 2015-10-14 00:34:11 +02:00
SubDirSpaces
SubProject
SwiftMix Swift: Make SwiftMix compatible with Swift 2 2015-09-03 20:30:32 +02:00
SwiftOnly Swift: Use dump instead of println 2015-09-01 20:32:38 +02:00
SwigTest
SystemInformation
TargetName
TestDriver
Testing
TestsWorkingDirectory Tests: Sort includes of sys/types.h as clang-format would 2016-05-03 10:08:41 -04:00
TryCompile Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
Tutorial Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
Unset
VSExcludeFromDefaultBuild VS: Add option to put INSTALL target in .sln default build 2015-05-06 10:31:39 -04:00
VSExternalInclude Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
VSGNUFortran Tests: Simplify VSGNUFortran Oracle-specific link lines 2015-10-01 10:48:38 -04:00
VSMASM
VSMidl Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
VSNsightTegra VS: Add more Nsight Tegra generator Android property settings 2015-07-14 14:24:05 -04:00
VSProjectInSubdir
VSResource Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
VSWinStorePhone Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
VSWindowsFormsResx VS: Add support for XAML source files 2015-04-03 13:40:35 -04:00
VSXaml Tests: Stabilize include order in MFC, VSXaml, and VSWinStorePhone 2016-04-29 10:56:59 -04:00
VariableUnusedViaSet
VariableUnusedViaUnset
VariableUsage
Visibility Honor visibility properties for all target types (#15556) 2015-05-26 09:03:16 -04:00
WarnUnusedCliUnused
Wrapping Merge topic 'test-watcom-workaround' 2016-05-02 09:24:23 -04:00
X11 Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
XCTest Tests: Add XCTest example to test Frameworks and Cocoa App Bundles 2015-03-23 09:12:20 -04:00
iOSNavApp Replace CMAKE_XCODE_EFFECTIVE_PLATFORMS with call to PlatformIsAppleIos 2015-08-25 21:53:51 +02:00
.NoDartCoverage
BootstrapTest.cmake
CMakeBuildTest.cmake.in
CMakeCopyright.cmake
CMakeInstall.cmake
CMakeLists.txt GHS: Fix handling of duplicate source filenames (#16046) 2016-04-25 10:46:09 -04:00
CTestUpdateBZR.cmake.in
CTestUpdateCVS.cmake.in ctest_update: Fix RETURN_VALUE on VCS tool failure (#15610) 2015-06-11 11:00:48 -04:00
CTestUpdateCommon.cmake ctest_update: Fix RETURN_VALUE on VCS tool failure (#15610) 2015-06-11 11:00:48 -04:00
CTestUpdateGIT.cmake.in Tests: Simplify CTest.UpdateGIT repo path construction 2015-12-10 13:54:54 -05:00
CTestUpdateGIT.sh.in
CTestUpdateHG.cmake.in ctest_update: Fix RETURN_VALUE on VCS tool failure (#15610) 2015-06-11 11:00:48 -04:00
CTestUpdateP4.cmake.in
CTestUpdateSVN.cmake.in ctest_update: Fix RETURN_VALUE on VCS tool failure (#15610) 2015-06-11 11:00:48 -04:00
CheckFortran.cmake
EnforceConfig.cmake.in
README
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.