summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Configure Tests/CMakeTests only with BUILD_TESTING ONBrad King2013-03-131-2/+2
| | | | | | | | | Since commit e03f83f3 (ProcessorCount test: fix path to cmsysTestsCxx executable, 2013-01-24) the directory references a target that is not built when BUILD_TESTING is OFF. It makes no sense to add tests without BUILD_TESTING anyway. While at it, use add_subdirectory instead of subdirs to add CMakeTests.
* Merge topic 'fix-automoc-no-qt'Brad King2013-03-131-0/+10
|\ | | | | | | | | | | a223a3b Automoc: Don't create automoc targets if Qt is not used (#13999) 65b5c1e Merge branch 'property-link-depends-no-crash' into fix-automoc-no-qt
| * Automoc: Don't create automoc targets if Qt is not used (#13999)Stephen Kelly2013-03-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 79568f95 (automoc: Add source file to target early to set the linker language, 2013-02-20) changed automoc initialization to a two step process. In the first step, the generated source file was added to the target, which allows the link language to be determined. However, this bypassed the check for the availability of Qt itself. At build-time the automoc file could not be generated because the moc tool was not available to create it. The solution is to only add the automoc file to the target if Qt is found.
* | GetPrerequisites: Enable test for BundleUtilities on MinGWMichael Tänzer2013-03-011-0/+1
| | | | | | | | Signed-off-by: Michael Tänzer <neo@nhng.de>
* | ExternalData: Test content link with a space in its nameBrad King2013-02-221-0/+1
| | | | | | | | | | | | Extend the Module.ExternalData test to cover a DATA{} reference whose name contains a space. Skip the case when the native build tool does not support spaces.
* | Tests: Generalize decision for 'make' tool supporting spacesBrad King2013-02-221-16/+22
| | | | | | | | | | | | Some make tools do not support spaces inside the source tree paths. Decide early whether to add tests that depend on support for spaces so we can use the result in a decision for any test.
* | Tests: Replace exec_program with execute_processBrad King2013-02-221-6/+5
|/ | | | | Drop use of the old exec_program command from CMake's own CMakeLists.txt files.
* Tests: Add generator toolset supportBrad King2013-02-071-0/+9
| | | | | Propagate CMAKE_GENERATOR_TOOLSET through the test hierarchy so that all tests can build with the selected generator toolset, if any.
* Tests: Consolidate ctest --build-and-test generator optionsBrad King2013-02-071-146/+78
| | | | | | | | | | | All ctest --build-and-test invocations require the options --build-generator ${CMAKE_GENERATOR} --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} to be passed and have consistent values, except for a few special cases. Collect the generator options in a variable instead of repeating the options everywhere explicitly.
* Merge topic 'add-ExternalData-module'Brad King2013-02-051-0/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5484c60 Merge branch 'vs6-rule-files' into add-ExternalData-module 1fd8d01 ExternalData: Attach download rules to content links in IDEs a6d3ffc Fix Module.ExternalData test on VS 6 aed590a Fix Module.ExternalData test on Cygwin 06e8ded Merge branch 'fix-atomic-rename-on-Windows' into add-ExternalData-module e2e0d2e ExternalData: Collapse ../ components in DATA{} paths ee2abfd ExternalData: Add support for SHA 1 and 2 hash algorithms aa8b228 ExternalData: Generalize hash algo/ext handling 9e518a8 ExternalData: Allow DATA{} syntax to reference directories 175ed02 ExternalData: Allow ()-groups in series match regex 4befecc ExternalData: Add tests covering interfaces and errors bcd2580 ExternalData: Improve series matching using an explicit syntax c0cebcb ExternalData: Remove unused private interface 5275993 ExternalData: Cleanup stray TODO and typo in comments 7bb8344 ExternalData: Do not match directory names when resolving DATA{} 00d801f ExternalData: Remove compatibility with CMake < 2.8.5 ...
| * Fix Module.ExternalData test on VS 6Brad King2013-02-041-0/+1
| | | | | | | | | | | | | | | | Run the test with the ctest --build-noclean option. The test CMakeLists.txt file already uses file(REMOVE_RECURSE) to clean out downloaded data anyway. Some file removed by "msdev ... /clean" causes CMake to re-run in the middle of the build step and file(REMOVE_RECURSE) wipes out already-generated files.
| * ExternalData: Add tests covering interfaces and errorsBrad King2013-01-301-0/+12
| | | | | | | | | | | | | | | | Add a Module.ExternalData test to verify data retrieval and test argument DATA{} references. Add a RunCMake.ExternalData test to verify error handling and automatic transformation of a raw data to a content link and staged object.
* | Tests: Avoid CTestLimitDashJ crash on Borland 5.8 buildsBrad King2013-01-311-0/+1
|/ | | | | | | | | | | | The test added by commit e378ba5f (Add CTestLimitDashJ test, 2012-12-26) crashes with CTest compiled by Borland 5.8. There seems to be interaction among the large number of internal ctest runs. It is probably related to the undiscovered underlying issue mentioned in commit 32478069 (CTest: Prevent creation of unbounded number of tests in ctest, 2012-12-18) when fixing the symptom covered by the CTestLimitDashJ test. Add --force-new-ctest-process to avoid the crash. Further investigation will still be needed to identify the true problem.
* Make INTERFACE determined properties readable in generator expressions.Stephen Kelly2013-01-201-0/+1
| | | | | The properties are evaluated as link-dependent interface properties when evaluating the generator expressions.
* Add the target_compile_definitions command.Stephen Kelly2013-01-101-0/+1
| | | | This is a convenience API to populate the corresponding properties.
* Add the target_include_directories command.Stephen Kelly2013-01-101-0/+1
| | | | This is a convenience API to populate the corresponding properties.
* Merge topic 'qt4-target-depends'Brad King2013-01-071-0/+15
|\ | | | | | | | | 57a67bf Qt4: Add module dependencies to the IMPORTED targets
| * Qt4: Add module dependencies to the IMPORTED targetsStephen Kelly2013-01-071-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This means for example, that consumers can use: target_link_libraries(foo ${QT_QTGUI_LIBRARIES}) instead of also needing to specify all 'public' dependencies: target_link_libraries(foo ${QT_QTGUI_LIBRARIES} ${QT_QTCORE_LIBRARIES} ) when using the IMPORTED targets. Also populate the IMPORTED_LINK_DEPENDENT_LIBRARIES property so CMake can help the linker find shared library dependencies.
* | Add CTestLimitDashJ test (#12904)David Cole2013-01-031-0/+3
|/ | | | | | | | | | | | | | | | | | | Add a test that verifies that when ctest -j 4 is called, at most, 4 tests are executed at any one time. The test works by running the same script as each of 100 tests. And then setting up test properties for DEPENDS, RUN_SERIAL, PROCESSORS and COST in order to get the tests to run in a semi-deterministic ordering, even in parallel. The script writes a file, sleeps for a bit, and then deletes the file. In the meantime, it counts files that currently exist, and emits output that triggers a test failure if the count of files is ever greater than 4. Prior to the commit that fixed bug #12904, this would result in a failed test because the output of some of the tests would indicate that more than 4 tests were running simultaneously. Now that this issue is resolved, this test will help guarantee that it stays resolved moving forward.
* Merge topic 'fix-11575-add-wix-support-to-cpack'David Cole2012-12-051-0/+23
|\ | | | | | | | | | | | | | | a74bd47 CPack: Fix dashboard errors and warnings (#11575) ad0f735 CPack: Fix dashboard warnings (#11575) 0729ad4 CPack: Fix dashboard errors (#11575) 85baac1 CPack: Add a WiX Generator (#11575)
| * CPack: Add a WiX Generator (#11575)Nils Gladitz2012-12-031-0/+23
| | | | | | | | | | | | | | | | | | | | This new CPack generator produces an *.msi installer file. Requires having the WiX Toolset installed in order to work properly. Download the WiX Toolset installer "WiX36.exe" here: http://wix.codeplex.com/releases/view/93929
* | Tests: Use the right path to CPack value for running CPack testsDavid Cole2012-11-291-3/+0
|/ | | | | | | | | These tests were not running properly on Visual Studio or Xcode dashboards before this commit because of the "Debug" or "Release" sub-directory. The scripts already have CMAKE_CPACK_COMMAND since the correct CMake executable is used to run the scripts, so just use that, rather than passing down an incorrect path to the CPack executable.
* NMake: Add a test to demonstrate EmptyDepends issue (#13392)David Cole2012-11-211-0/+2
|
* Merge topic 'per-config-EXCLUDE_FROM_DEFAULT_BUILD'Brad King2012-11-201-0/+29
|\ | | | | | | | | | | | | | | 739f166 Serialize tests for EXCLUDE_FROM_DEFAULT_BUILD e31d83b Define property EXCLUDE_FROM_DEFAULT_BUILD d1f8828 Add property EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG> b777272 Add tests for EXCLUDE_FROM_DEFAULT_BUILD
| * Serialize tests for EXCLUDE_FROM_DEFAULT_BUILDBrad King2012-11-131-0/+7
| | | | | | | | | | The tests share a single build directory and so should not run in parallel. While at it, add the build dir to the test_clean target.
| * Add tests for EXCLUDE_FROM_DEFAULT_BUILDPetr Kmoch2012-11-131-0/+22
| | | | | | | | | | Add tests for EXCLUDE_FROM_DEFAULT_BUILD and its per-configuration variants.
* | Merge topic 'only-git-fetch-when-necessary'Brad King2012-11-131-0/+30
|\ \ | |/ |/| | | | | | | | | | | | | | | | | a41d3a4 ExternalProjectUpdateTest: Only support Git 1.6.5 and greater. de760c1 ExternalProject: Verify when a fetch occurs during update test. 0a34433 ExternalProject: Make sure the ExternalProjectUpdate setup is available. 9b66c8f ExternalProject: Always do a git fetch for a remote ref. 2619f4d ExternalProject: Add tests for UPDATE_COMMAND. 378aa12 ExternalProject: Do smoke tests for Git Tutorial builds. d075829 ExternalProject: Only run 'git fetch' when required.
| * ExternalProject: Make sure the ExternalProjectUpdate setup is available.Matt McCormick2012-11-131-2/+18
| | | | | | | | | | This prepares the numberous tests that occur in the ExternalProjectUpdate test. The tests were passing previously because a fresh build was not performed.
| * ExternalProject: Add tests for UPDATE_COMMAND.Matt McCormick2012-11-131-0/+14
| | | | | | | | | | | | Tests are added for UPDATE_COMMAND to ensure it is working properly. Testing infrastructure is added along with tests for Git, but tests for other version control systems could easily be added in the future.
* | GenEx: Use case insensitive comparison for $<CONFIG:...>Stephen Kelly2012-11-051-0/+1
|/ | | | | This fixes a regression introduced by commit f1eacf0e (cmGeneratorExpression: Re-write for multi-stage evaluation).
* Merge topic 'test-ctest-memcheck'David Cole2012-10-171-0/+2
|\ | | | | | | | | | | | | | | | | | | 995a35f CTest: add a check with a quoted memory checker de8bffc CTest: add a test for CTEST_CUSTOM_MEMCHECK_IGNORE d26c9b6 CTest: improve memory checker type detection fcae1da CTest: add tests that simulate memcheck runs 6187876 CTest: fix pre and post test commands with spaces 95bc8aa CTest: fix usage of memory checker with spaces in path
| * CTest: add tests that simulate memcheck runsRolf Eike Beer2012-10-041-0/+2
| |
* | Run PDBDirectoryAndName test on MSVC and IntelBrad King2012-09-291-1/+1
| | | | | | | | | | | | | | Move it out of the condition that also accepts MinGW/MSYS. Teach the test to allow the Intel for Windows compiler but do not verify the results because the compiler does not seem to write PDB output in all cases.
* | Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)Yuchen Deng2012-09-251-0/+1
|/ | | | | | | This enables changing the name and output folder of the debug symbol files produced by MS compilers. Inspired-by: Thomas Bernard <thomas.bernard@ipetronik.com>
* Merge topic 'compile-definitions-unique'David Cole2012-08-241-0/+1
|\ | | | | | | | | | | | | | | f0a1065 Rename files from main.cpp to more meaningful names. ca7fb14 Fix the test setting COMPILE_DEFINITIONS target property 733deb6 Fix CompileDefinitions test on Visual Studio. 3dae652 Don't duplicate -D defines sent to the compiler.
| * Don't duplicate -D defines sent to the compiler.Stephen Kelly2012-08-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | There is no need to do so. Be consistent with include directories and ensure uniqueness. This requires changing the API of the cmLocalGenerator::AppendDefines method, and changing the generators to match. The test unfortunately can't test for uniqueness, but it at least verifies that nothing gets lost.
* | Merge topic 'RemoveNonworkingKDE4Test'David Cole2012-08-201-42/+0
|\ \ | | | | | | | | | | | | 11f23fe remove non-working KDE4 test
| * | remove non-working KDE4 testAlex Neundorf2012-08-161-42/+0
| |/ | | | | | | Alex
* | Merge topic 'more-endif-closing-style-cleanups'David Cole2012-08-201-6/+2
|\ \ | | | | | | | | | | | | 84b49be Remove CMake multiline block-end command arguments
| * | Remove CMake multiline block-end command argumentsMarcin Wojdyr2012-08-151-6/+2
| |/ | | | | | | removing arguments omitted in 9db3116226cb99fcf54e936c833953abcde9b729
* | Add boolean generator expressionsBrad King2012-08-151-0/+10
|/ | | | | | | | | | | | | Add generator expressions that combine and use boolean test results: $<0:...> = empty string (ignores "...") $<1:...> = content of "..." $<AND:?[,?]...> = '1' if all '?' are '1', else '0' $<OR:?[,?]...> = '0' if all '?' are '0', else '1' $<NOT:?> = '0' if '?' is '1', else '1' These will be useful to evaluate (future) boolean query expressions and condition content on the results. Include tests and documentation.
* Fix WarnUnusedUnusedViaUnset test pass/fail regexBrad King2012-08-141-2/+2
| | | | | | | After conversion of Modules .cmake files to lower case the FAIL_REGULAR_EXPRESSION for this test matched warnings in modules other than the test line itself. Make the pass and fail regular expressions specific to the file containing the lines they are testing.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-122/+122
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-710/+710
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Merge topic 'ninja-fix-macosx'David Cole2012-07-241-32/+34
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1fc8df9 Add missing this->. 7a3ecf5 Fix memory leak in Makefile generator. 9f7dc83 Ninja: also bootstrap ninja files 5d365b2 Ninja: enable ninja support everywhere d569f3e Ninja: void function can't return a value 52160bf Ninja: enable ninja on Mac so all Mac CDash-builds are tested, cleanup later 56aeac6 Ninja: fixes for bcc 7a6bc9e Ninja: remove 'this' from member initializer list 44ba4cf Ninja: remove warnings 7751966 Ninja: remove 'friend' in ninja code c3988ee Re-factor OS X content generator start up. f8e0a51 Re-factor framework directory computation. f36c7b0 Re-factor Mac OS X content directory computation. 5d885db Re-factor bundle content copying rules generation. 3b2a01e Ninja: Use same echo message as makefiles. 7bb56c5 Re-factor CFBundle generation. ...
| * Enable BundleTest with CLang too.Nicolas Despres2012-07-171-32/+34
| |
* | Merge topic 'DoNotInvokeCPackAtCMakeTime-forCMakeTests'David Cole2012-07-241-23/+13
|\ \ | |/ |/| | | | | | | | | b47cffa CPack: Use bin subdir when looking for dpkg and rpmbuild a8c659c Find dpkg and rpmbuild in usual Fink and MacPort paths 848f220 Do not run cpack at CMake time it is not available.
| * Do not run cpack at CMake time it is not available.Eric NOULARD2012-06-281-23/+13
| | | | | | | | | | | | | | | | | | | | | | cpack was used to get the list of available i.e. ACTIVE CPack generators in the CMake tests suite. This was done in order to get dynamically available CPack generators like DEB or RPM that may or may not be available on some platform like MacOSX depending on the fact that some command are installed or not. We may do that but not during initial configuration. The current patch fixes the problem and we may do better in the future like configuring CPack tests later.
* | CTest: Add test to verify -D variable definitions workDavid Cole2012-06-251-0/+13
|/
* Merge topic 'position-independent-targets'David Cole2012-06-121-0/+18
|\ | | | | | | | | | | | | bd34963 Refactor generation of shared library flags 55d7aa4 Add platform variable for flags specific to shared libraries 31d7a0f Add platform variables for position independent code flags