summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests
Commit message (Collapse)AuthorAgeFilesLines
* CMake: Stylistic changes and documentation tweaksDavid Cole2012-12-051-2/+0
| | | | ...for the contributed file and string TIMESTAMP sub-commands.
* CMake: Add TIMESTAMP subcommand to string and file commandsNils Gladitz2012-12-0517-0/+99
|
* Add several get_property() testsPetr Kmoch2012-11-021-0/+17
| | | | Add tests for some get_property() uses not covered by existing tests.
* GetProperty test: move doc property tests into main processRolf Eike Beer2012-11-022-16/+11
| | | | | They will not raise an error in the normal case so we do not need to run them in their own process.
* list: add tests for CMP0007 behaviorRolf Eike Beer2012-11-022-0/+20
|
* Add test to secure the file(GLOB empty) behavior.Amine Chadly2012-11-021-0/+5
|
* file: remove dead codeAmine Chadly2012-11-023-0/+9
| | | | | | The file command requires at least two arguments, so guarding the GLOB and MAKE_DIRECTORY command is not necessary. Changed it for an assert to keep the protection.
* Consolidate list() argument count testingPetr Kmoch2012-11-022-12/+20
| | | | Move test for list() argument count >= 2 to InitialPass().
* Add tests for list() invalid argumentsPetr Kmoch2012-11-0210-0/+39
| | | | Add tests for error reporting when list() arguments are invalid.
* Add tests for list() argument countPetr Kmoch2012-11-026-0/+49
| | | | | Add test for error reporting when list() subcommands have wrong number of arguments.
* CMakeTests: allow to call the check_cmake_test macro with a given fileRolf Eike Beer2012-11-021-24/+29
| | | | | This allows to generate a lot of simple files directly in the test tree instead of having them all checked in.
* file(DOWNLOAD): Change EXPECTED_HASH to take ALGO=valueBrad King2012-09-191-6/+6
| | | | | | Make the EXPECTED_HASH option take only a single value instead of two to avoid handling sub-keyword arguments. This is also consistent with URL_HASH in ExternalProject.
* Merge topic 'if-version-depth'David Cole2012-09-181-0/+7
|\ | | | | | | | | dfa0ebd if: Compare up to 8 components in VERSION tests
| * if: Compare up to 8 components in VERSION testsBrad King2012-09-111-0/+7
| | | | | | | | | | | | | | | | | | | | Extend the number of components tested by if(... VERSION_LESS ...) if(... VERSION_EQUAL ...) if(... VERSION_GREATER ...) from 4 to 8. The latter is a more extreme maximum.
* | file(DOWNLOAD): Generalize EXPECTED_MD5 to EXPECTED_HASHBill Hoffman2012-09-111-0/+53
|/ | | | Add support for SHA algorithms.
* Merge topic 'cmake-platform-info-version'Brad King2012-08-301-1/+1
|\ | | | | | | | | | | | | e5fee8a Store ABI detection results in compiler information files 3df81b4 Move CMAKE_<LANG>_COMPILER_WORKS to compiler information files 7195aca Make platform information files specific to the CMake version
| * Make platform information files specific to the CMake versionBrad King2012-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the top of a build tree we configure inside the CMakeFiles directory files such as "CMakeSystem.cmake" and "CMake<lang>Compiler.cmake" to save information detected about the system and compilers in use. The method of detection and the exact results store varies across CMake versions as things improve. This leads to problems when loading files configured by a different version of CMake. Previously we ignored such existing files only if the major.minor part of the CMake version component changed, and depended on the CMakeCache.txt to tell us the last version of CMake that wrote the files. This led to problems if the user deletes the CMakeCache.txt or we add required information to the files in a patch-level release of CMake (still a "feature point" release by modern CMake versioning convention). Ensure that we always have version-consistent platform information files by storing them in a subdirectory named with the CMake version. Every version of CMake will do its own system and compiler identification checks even when a build tree has already been configured by another version of CMake. Stored results will not clobber those from other versions of CMake which may be run again on the same tree in the future. Loaded results will match what the system and language modules expect. Rename the undocumented variable CMAKE_PLATFORM_ROOT_BIN to CMAKE_PLATFORM_INFO_DIR to clarify its purpose. The new variable points at the version-specific directory while the old variable did not.
* | CMake.List test: explicitely test with lists containing only an empty stringRolf Eike Beer2012-08-151-0/+11
|/
* 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.