summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests
Commit message (Collapse)AuthorAgeFilesLines
* Remove CMake-language block-end command argumentsKitware Robot2012-08-1310-49/+49
| | | | | | | | | | | | | | | | | 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-134-59/+59
| | | | | | | | | | | | | | | | | 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
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Merge topic 'test-getpropery'David Cole2012-03-0616-0/+122
|\ | | | | | | | | b43cd12 add test for get_property() errors
| * add test for get_property() errorsRolf Eike Beer2012-03-0416-0/+122
| |
* | Merge topic 'remove-CheckSourceTree-cvs-support'David Cole2012-03-062-85/+7
|\ \ | |/ |/| | | | | 9012be2 CheckSourceTree: Remove CVS checkout support (#13001)
| * CheckSourceTree: Remove CVS checkout support (#13001)Brad King2012-03-022-85/+7
| | | | | | | | | | | | | | We no longer support CVS checkouts from the Git repository. Drop the case from the CheckSourceTree test. This will also prevent the test from running and failing when CVS is found but Git is not.
* | add testcases for while()/endwhile() errorsRolf Eike Beer2012-03-017-0/+60
|/
* fix uninitialized var in if(NOT foo bar STREQUAL "foo bar")Rolf Eike Beer2012-01-222-0/+10
| | | | Also adds test to verify this.
* Merge topic 'newline-style'David Cole2011-12-015-0/+38
|\ | | | | | | | | | | | | | | | | ac2e45d Provide std::ios_base typedef on GCC < 3 28c46ca cmNewLineStyle: Use cmStandardIncludes.h 75e83e9 cmNewLineStyle: Remove trailing comma in enum be6502c bootstrap: Include cmNewLineStyle in build a087490 Add NEWLINE_STYLE option to configure_file (#3957)
| * Add NEWLINE_STYLE option to configure_file (#3957)Peter Kuemmel2011-11-285-0/+38
| |
* | Fix CMake.File hash test for CRLF checkoutsBrad King2011-11-1611-14/+16
| | | | | | | | | | Use a dedicated test input file for the file() hash API tests. Set attribute crlf=input so it is always checked out correctly.
* | Add string(MD5) and string(SHA*) commands to compute hashesBrad King2011-11-1610-0/+47
| | | | | | | | | | Provide a CMake-language binding to these cryptographic hashes. Add a string() command API for MD5, SHA1, SHA224, SHA256, SHA384, and SHA512.
* | Add file(SHA*) commands to compute cryptographic hashesBrad King2011-11-166-0/+25
| | | | | | | | Add a file() command API for SHA1, SHA224, SHA256, SHA384, and SHA512.
* | Add file(MD5) command to compute cryptographic hashBrad King2011-11-167-1/+22
|/ | | | | Provide a CMake-language binding to the md5sum function previously available only by "cmake -E md5sum".
* Add macros cmake_push/pop_check_state() as discussed on the list.Alex Neundorf2011-07-072-0/+31
| | | | | | | | This patch adds two macros cmake_push_check_state() and cmake_pop_check_state(), which can be used to save and restore the contents of the CMAKE_REQUIRED_xxx variables. Alex
* Merge topic 'absoft-fortran-compiler'Brad King2011-05-241-0/+15
|\ | | | | | | | | | | | | 8bd3e51 Absoft: Enable FortranCInterface check in Fortran test d7b376b Absoft: Detect implicit link libraries on Linux and Mac ac5b999 Add Absoft Fortran compiler id and basic flags
| * Absoft: Detect implicit link libraries on Linux and MacBrad King2011-05-201-0/+15
| | | | | | | | | | | | | | | | Use the "-X -v" flag to the Absoft front-end to pass "-v" to the gcc it invokes under the hood. Teach CMakeParseImplicitLinkInfo to exclude linker version lines from consideration as link lines. Fix parsing of Sun's linker search path option "-Y..." to avoid conflict with the Mac linker option "-Y<num>".
* | ProcessorCount: Use ERROR_QUIET with execute_process (#11302)David Cole2011-03-181-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, comment out all "debugging" calls to message() that helped us interpret the output on other platforms when running on the dashboard clients. Using ERROR_QUIET avoids unnecessary stderr output while calling external tools to determine the processor count. If there's an error parsing the output, we set the count to 0 anyhow. Also, the test will fail on a CMake dashboard run if the count comes back equal to 0. Now that the code is "done"-ish, remove the debugging output. Expect no output on stdout or stderr when calling the ProcessorCount function from now on.
* | ProcessorCount: Test fails if count is 0 (#11302)David Cole2011-03-151-4/+5
| | | | | | | | It also fails if count is not a decimal integer.
* | ProcessorCount test: more output, do not fail. (#11302)David Cole2011-03-151-1/+18
| | | | | | | | | | | | More dev work remains to be done here. Removing test failure condition until that dev work is complete, so it does not mask or hide other, more important failures, on the dashboard.
* | Compare ProcessorCount to SystemInformation count. (#11302)David Cole2011-03-151-3/+37
| | | | | | | | | | | | Maximize output to gather data on the dashboards. Only FATAL_ERROR out once at the bottom if an error occurred earlier.
* | Add ProcessorCount support for QNX via pidin. (#11302)David Cole2011-03-151-1/+5
| | | | | | | | | | Thanks to Rolf Eike Beer <eike@sf-mail.de> for the code snippet parsing the pidin output.
* | Add module ProcessorCount.cmake (#11302)Michael Wild2011-03-152-0/+10
| | | | | | | | | | | | | | | | Credit goes to David Cole ( http://www.kitware.com/blog/home/post/63 ). Also add a script-based test of the new module. Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
* | Implement file(UPLOAD (#11286)David Cole2011-02-254-1/+72
| | | | | | | | Including documentation and testing, of course.
* | Merge topic ↵Brad King2011-02-222-1/+78
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 'resolve/add-STRING-subcommand-FIND-issue-11795/fix-2828-more-info-in-script-mode' 1a8eed1 Merge branch 'add-STRING-subcommand-FIND-issue-11795' into fix-2828-more-info-in-script-mode 006124b Avoid direct use of std::stringstream 8a8da36 Merge branch 'fix-2828-more-info-in-script-mode' into add-STRING-subcommand-FIND-issue-11795 1462561 Add a string(FIND) sub-command (#11795)
| * \ Merge branch 'fix-2828-more-info-in-script-mode' into ↵Brad King2011-02-151-0/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | add-STRING-subcommand-FIND-issue-11795 Conflicts: Tests/CMakeTests/StringTestScript.cmake
| * | | Add a string(FIND) sub-command (#11795)Tim Hütz2011-02-152-1/+78
| | |/ | |/|
* | | Merge topic 'fix-2828-more-info-in-script-mode'Brad King2011-02-221-0/+2
|\ \ \ | | |/ | |/| | | | | | | | | | | | | a58ace6 Fix KWStyle line-too-long complaint (#2828) 106958c Add CMAKE_ARGC and CMAKE_ARGV0..N-1 variables (#2828) 94d1684 Add CMAKE_SCRIPT_MODE_FILE variable (#2828)
| * | Add CMAKE_SCRIPT_MODE_FILE variable (#2828)David Cole2011-02-021-0/+2
| |/ | | | | | | | | New CMake variable is set when processing a -P script file, but not when configuring a project.
* | Make file DOWNLOAD less noisy (#11761)David Cole2011-02-091-0/+2
|/ | | | Thanks to Daniel Nelson for the suggestion and the patch.
* Detect object files in implicit link informationBrad King2010-12-091-1/+8
| | | | | | The NAG Fortran compiler implicitly passes object files by full path to the linker. Teach CMakeParseImplicitLinkInfo to parse object files that match some tool-specific regular expression.
* Fixes to GetPrerequisites for cygwinDavid Partyka2010-10-271-4/+4
| | | | Fix IF(WIN32) guards check for cygwin. Fix checking if the depenency is in a system location to use cygwin style paths on cygwin. Also change GetPrerequisites to switch gp_tool to tools that are very unlikely to be found, ie. dumpbin on Apple and otool on Windows/Unix.
* Fixed appending PATH to dumpbin tool from growing without bounds.David Partyka2010-10-251-0/+14
| | | | IF(... MATCHES ...) used for comparing directories chokes especially in the case of C:\Program Files (x86)\<blah> because of regex pattern matching. Switched this to use STREQUAL in a loop instead.
* Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)Alex Neundorf2010-09-281-0/+4
| | | | | | Comes with a simple test and docs. Alex
* ModuleNoticesTest: Do not require "Kitware" copyrightBrad King2010-08-171-1/+1
| | | | | | When a module is first contributed Kitware has made no modifications on which to place a copyright. Require the contributor to have a copyright notice, but not specifically by Kitware.
* Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
|
* Merge CPackRPM changes into doc-spellingBrad King2010-07-131-6/+57
|\ | | | | | | | | Conflicts: Modules/CPackRPM.cmake
| * CheckSourceTree test: read UpdateCommand from Update.xml.David Cole2010-06-271-6/+57
| | | | | | | | | | | | | | | | | | | | | | | | If GIT_EXECUTABLE is not passed in, and is not available from DartConfiguration.tcl or CTestConfiguration.ini, then make one more last ditch attempt to get it from Update.xml, if there is an Update.xml. For dashboards that have successfully done a ctest_update call, there should be an Update.xml in the Testing subdir of the binary tree. Parse that file for the git executable recorded in the <UpdateCommand> element. And make this test pass on those RogueResearch dashboard machines!
* | Fix spelling errors reported by Lintian.Kai Wasserbäch2010-07-131-1/+1
|/ | | | | During a Lintian run on the binary packages of CMake in Debian I was notified of many spelling mistakes.
* Look in the ctest ini file for GitCommand.David Cole2010-06-211-0/+54
| | | | | | | | If GIT_EXECUTABLE is not passed into the test, but the source tree is a git checkout, then use GitCommand or UpdateCommand from the ctest ini file to set its value. Presumably, a dashboard running the test suite had to have set this properly in order to do the ctest_update step.
* Merge branch 'add-git-to-CheckSourceTreeTest'Brad King2010-06-072-53/+176
|\
| * Allow return value of 1 from git status.David Cole2010-05-281-3/+3
| |
| * Further refinements to the CheckSourceTree test.David Cole2010-05-271-4/+27
| | | | | | | | | | | | | | | | | | Echo results of calling git status before exiting with an error. Add one special case so that the test may pass on the dashmacmini2 continuous dashboard, despite a 'git status' non-zero return code. More logic like this may be required. I will re-evaluate based on tomorrow's nightly dashboard runs.
| * Add git support to the CMake.CheckSourceTree test.David Cole2010-05-272-53/+153
| | | | | | | | | | | | | | | | | | | | Additionally, output some more information in both cvs and git cases. When it is a cvs checkout, echo the contents of CVS/Root and CVS/Repository to the test output. When it is a git checkout, echo the output of 'git branch -a'. This will allow us to see more details about any given CMake source tree right in the CDash results for this test.
* | Improve FILE(DOWNLOAD) and ExternalProject.David Cole2010-05-273-0/+46
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve FILE(DOWNLOAD ...): - Add percent complete progress output to the FILE DOWNLOAD command. This progress output is off by default to preserve existing behavior. To turn it on, pass SHOW_PROGRESS as an argument. - Add EXPECTED_MD5 argument. Verify that the downloaded file has the expected md5 sum after download is complete. - Add documentation for SHOW_PROGRESS and EXPECTED_MD5. When the destination file exists already and has the expected md5 sum, then do not bother re-downloading the file. ("Short circuit" return.) Also, add a test that checks for the status output indicating that the short circuit behavior is actually occurring. Use a binary file for the test so that the md5 sum is guaranteed to be the same on all platforms regardless of "shifting text file line ending" issues. Improve ExternalProject: - Add argument URL_MD5. - Add verify step that compares md5 sum of .tar.gz file before extracting it. - Add md5 check to download step, too, to prevent unnecessary downloads. - Emit a warning message when a file is not verified. Indicate that the file may be corrupt or that no checksum was specified.
* Fix configure time error that occurs when there is a backslash in the HOME ↵David Cole2010-02-101-1/+2
| | | | environment variable.
* Add alternate per-vendor compiler id detectionBrad King2010-02-012-0/+32
| | | | | | | At least one Fortran compiler does not provide a preprocessor symbol to identify itself. Instead we try running unknown compilers with version query flags known for each vendor and look for known output. Future commits will add vendor-specific flags/output table entries.
* Clean up CMake build tree 'bin' directoryBrad King2009-12-081-1/+1
| | | | | | | | We re-arrange EXECUTABLE_OUTPUT_PATH settings to avoid putting utility and test executables in the 'bin' directory of the build tree. This makes the directory look like that in the installation tree, except that on multi-configuration generators we still use a per-config subdirectory.
* Force CheckSourceTree test to pass if the source tree is not a CVS checkout. ↵David Cole2009-12-071-0/+11
| | | | The test can only do its checking if cvs is available and the source tree is a cvs checkout. Also, allow for the possibility that backslash characters exist in the HOME environment variable, because they may when built in a cygwin environment on Windows.