Commit Graph

83 Commits

Author SHA1 Message Date
Brad King fe3f878f15 Detect object files in implicit link information
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.
2010-12-09 17:07:34 -05:00
David Partyka 48e80eb724 Fixes to GetPrerequisites for cygwin
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.
2010-10-27 17:23:00 -04:00
David Partyka be94c494ed Fixed appending PATH to dumpbin tool from growing without bounds.
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.
2010-10-25 13:40:35 -04:00
Alex Neundorf 41e4f1a210 Add automatic variable CMAKE_CURRENT_LIST_DIR(dir of CMAKE_CURRENT_LIST_FILE)
Comes with a simple test and docs.

Alex
2010-09-28 22:10:47 +02:00
Brad King c088e7a341 ModuleNoticesTest: Do not require "Kitware" copyright
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.
2010-08-17 09:23:35 -04:00
Todd Gamblin 2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King 7739d786a4 Merge CPackRPM changes into doc-spelling
Conflicts:
	Modules/CPackRPM.cmake
2010-07-13 09:46:52 -04:00
Kai Wasserbäch 9203e9187e Fix spelling errors reported by Lintian.
During a Lintian run on the binary packages of CMake in Debian I was
notified of many spelling mistakes.
2010-07-13 09:41:37 -04:00
David Cole a77aa7065e CheckSourceTree test: read UpdateCommand from Update.xml.
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!
2010-06-27 08:29:15 -04:00
David Cole 4ee426b057 Look in the ctest ini file for GitCommand.
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.
2010-06-21 14:46:30 -04:00
Brad King d868ec9406 Merge branch 'add-git-to-CheckSourceTreeTest' 2010-06-07 14:28:45 -04:00
David Cole c943ccdbfa Allow return value of 1 from git status. 2010-05-28 10:16:44 -04:00
David Cole 806eaa290c Further refinements to the CheckSourceTree test.
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.
2010-05-27 16:43:28 -04:00
David Cole 1dd316563a Add git support to the CMake.CheckSourceTree test.
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.
2010-05-27 15:44:57 -04:00
David Cole f67139ae6f Improve FILE(DOWNLOAD) and ExternalProject.
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.
2010-05-27 12:21:56 -04:00
David Cole 10750bff1c Fix configure time error that occurs when there is a backslash in the HOME environment variable. 2010-02-10 11:23:07 -05:00
Brad King 3c2ecbe74e Add alternate per-vendor compiler id detection
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.
2010-02-01 09:03:05 -05:00
Brad King d4ada9d0d5 Clean up CMake build tree 'bin' directory
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.
2009-12-08 11:44:28 -05:00
David Cole 1e04804e84 Force CheckSourceTree test to pass if the source tree is not a CVS checkout. 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. 2009-12-07 11:54:23 -05:00
David Cole 8d28ce8029 Fix cvs password problems during the CMake.CheckSourceTree test. Make sure cvs has access to the original value of the HOME environment variable and not the 'CMake testing' value of it so that any cvs passwords set up on the machine work to get the list of local modifications using 'cvs up'... 2009-12-04 14:50:37 -05:00
Brad King 5fbefd66dc Fix get_filename_component(... REALPATH) work dir
The commit "Fix get_filename_component ABSOLUTE mode" broke REALPATH
treatment of relative paths because it stopped storing the absolute path
in local variable 'filename'.  This commit fixes the call to GetRealPath
to use the proper local variable and adds a test.
2009-11-18 10:56:40 -05:00
David Cole d6fe0438c1 Fix issue #9851 - only seed the random number generator on the first call to STRING(RANDOM or if given the new RANDOM_SEED argument. Add test and documentation of new argument. 2009-11-06 10:07:10 -05:00
Brad King dc577fb8b1 Check Mac linker lines in ImplicitLinkInfo test
We add sample linker invocation lines for the GNU compiler on Mac.
2009-11-05 12:17:21 -05:00
Brad King 56d4619984 Remove non-language implicit link dependencies
Some compilers use implicit link options of the form

  -lcrt*.o
  -lgcc*
  -lSystem      (on Mac)
  -lSystemStubs (on Mac)

that provide system-wide symbols not specific to any language.
These need not be listed explicitly for mixed-language linking.

We teach CMake to remove the above items from the implicit library list
of each language.  This change makes it possible to mix GNU compiler
versions in some cases.
2009-11-05 12:17:08 -05:00
Brad King 23bdb28cad Create CMake.ELF test to cover cmELF further
This commit adds a CMake.ELF test to exercise cmELF and file(RPATH_*).
We test all combinations of 32/64-bit and LSB/MSB binaries.
2009-10-27 14:01:31 -04:00
Brad King 6bf98dba01 Test if() boolean coersion and CMP0012 behaviors
We introduce the "CMake.If" test to try out conversion of constants and
variables to boolean values in the if() command.  We cover both OLD and
NEW behavior for policy CMP0012.
2009-10-27 09:08:12 -04:00
David Cole ac170b1df6 Remove the rpath_remove_file_is_not_executable test case. It fails on Windows, but passes on Linux. Put back later after addressing inconsistency. 2009-10-17 12:12:07 -04:00
David Cole 16d995d728 Fixed issues with message text in FILE command error situations. Added many new test cases to increase the coverage of the FILE command even further. 2009-10-17 11:43:15 -04:00
David Cole a65b1cc3b0 Add more testing coverage of the FILE command. 2009-10-16 15:07:41 -04:00
Brad King fff1c6d275 More robust implicit link line detection regex
The regex used by CMAKE_PARSE_IMPLICIT_LINK_INFO to detect link lines
should not match lines that happen to have ".../ld.../..." in them.  A
linker name should match only as the last component of a path.

See issue #9666.
2009-10-07 08:43:51 -04:00
Brad King b9850a614e Log implicit link information parsing actions
This commit teaches the CMAKE_PARSE_IMPLICIT_LINK_INFO function to log
its actions.  We store the log in CMakeFiles/CMakeOutput.log at the top
of the project build tree.  This will make diagnosis of implicit link
information parsing problems easier.
2009-10-06 15:16:12 -04:00
David Cole 5b74d031db Increase coverage. Intentionally trigger error conditions. Call all the else*/end* functions without proper opening or containing code structure: else, elseif, endforeach, endfunction, endif, endmacro, endwhile. 2009-10-06 14:45:19 -04:00
David Cole b3611f70ae Add tests for uncovered bits of the math and cmake_minimum_required cmake functions. 2009-10-05 16:50:21 -04:00
David Cole 517e1e3c0f Add a few more cases to the new StringTest for even better coverage. Re-factor the scripts to make it easier to add new cases to this test. Re-factoring also enables the test driver in ExecuteScriptTests to be re-used when adding new tests in the future. 2009-10-03 12:01:10 -04:00
David Cole 837364cb04 Correct some typos in error messages in the string command. Add a test that covers more of the code implemented in cmStringCommand.cxx, especially the error handlers. 2009-10-02 14:51:43 -04:00
Brad King 62edb7b943 Better CMake.ModulesNotice test regex
This commit updates the copyright notice regex to enforce a more strict
format for contributor copyrights.
2009-10-01 14:22:58 -04:00
Brad King 26efeadd22 New CMake.ModulesNotice test for copyright notices
This new test checks Modules/*.cmake for the required copyright notice.
2009-10-01 14:12:19 -04:00
Brad King 229b67a249 Create CMake.ConfigureFile test for configure_file
This test checks that configure_file() handles input and output file
arguments as documented.
2009-09-16 15:09:58 -04:00
Brad King d23d268e39 Factor out CMake.File test result check for re-use
The CMake.File test runs several scripts through "cmake -P" and checks
the output and result against known good values.  This commit factors
out the checking code into a separate CMakeCheckTest module.  The module
may be used by new tests.
2009-09-16 15:09:10 -04:00
Brad King 2537a72f8e Check PGI linker lines in ImplicitLinkInfo test
This adds sample linker invocation lines for the PGI compiler on Linux.
2009-07-29 16:38:12 -04:00
Brad King f47ae0599d Check Intel linker lines in ImplicitLinkInfo test
This adds sample linker invocation lines for the Intel compiler on
Linux.  In particular, this exercises the case when "ld" appears without
a full path.
2009-07-29 16:07:33 -04:00
Brad King 836447663e BUG: Parse implicit link editor -z*extract options
The Sun Fortran compiler passes -zallextract and -zdefaultextract to the
linker so that all objects from one of its archives are included in the
link.  This teaches the implicit options parser to recognize the flags.
We need to pass them explicitly on C++ link lines when Fortran code is
linked.
2009-07-28 08:36:11 -04:00
David Cole 7ae028eb33 ENH: Make the CheckSourceTree test emit a warning (but pass instead of fail) when there is an in-source build on a dashboard machine. 2009-07-27 12:04:03 -04:00
David Cole 32be77df8c ENH: Improvements to the new CheckSourceTree test: ignore Thumbs.db and .DS_Store files. Force all output to stderr by not using STATUS with message. Better error text. 2009-07-25 13:32:07 -04:00
Brad King 55718eb869 BUG: Further avoid ImplicitLinkInfo case change
The commit "Avoid case change in ImplicitLinkInfo test" did not change
all of the paths to mingw, so some case change still occurs.  This
changes more of them.
2009-07-25 08:11:57 -04:00
David Cole 6414fa21fe BUG: Close endif statements with same string as if so that it still configures with CMake 2.4. One more time. Encore, encore. 2009-07-24 17:28:54 -04:00
David Cole 6237c6ead4 BUG: Improve CheckSourceTree test so that it ignores 'U ' output from cvs update. Also: improve failure logic for dashboard runs and developer runs. 2009-07-24 17:12:37 -04:00
Brad King d958105afb BUG: Teach VariableWatch test to check results
Previously this test was only a smoke test for manual verification.
This teaches the test to actually check that the variable watch
succeeds.
2009-07-24 16:57:38 -04:00
David Cole 5bea9620dc BUG: Additional fix necessary for issue #8481 so that Xcode builds do not write files into the source tree. Also add a test that runs last to check for local modifications in CMake_SOURCE_DIR based on whether 'cvs -q -n up -dP' output is empty. Test fails on dashboard runs when there are local modifications. Test passes on non-dashboard runs with local modifications so that CMake developers may have mods when running the test locally. 2009-07-24 15:58:23 -04:00
Brad King e981dc99f5 BUG: Avoid case change in ImplicitLinkInfo test
Since "get_filename_component(... ABSOLUTE)" retrieves the actual case
for existing paths on windows, we need to use an obscure path for mingw.
Otherwise the test can fail just because the case of the paths changes.
2009-07-24 07:34:03 -04:00