Commit Graph

1032 Commits

Author SHA1 Message Date
Brad King 1f7ef5bf7a BUG: Fix CMake.File test for deep dir name
This fixes the regex checking expected output of Copy-NoFile to account
for line wrapping when the input directory name is long.
2009-04-29 14:02:54 -04:00
Brad King e0d3339e65 ENH: Test file(COPY) failure cases
This tests some cases of bad arguments to the file(COPY) signature.
It checks that the proper error messages are produced.
2009-04-29 13:13:58 -04:00
Brad King c58ca24286 ENH: Create file(COPY) command signature
The file(INSTALL) command has long been undocumented and used only to
implement install() scripts.  We now document it and provide a similar
file(COPY) signature which is useful in general-purpose scripts.  It
provides the capabilities of install(DIRECTORY) and install(FILES) but
operates immediately instead of contributing to install scripts.
2009-04-29 13:13:29 -04:00
Brad King 6a74dbbeef ENH: Test spaces in non-string preprocessor values
This extends the Preprocessor test to put spaces in the value of a
definition that is not a quoted string.  In particular this tests that
VS6 supports values with spaces if they do not have '"', '$', or ';'.
See issue #8779.
2009-04-24 11:21:09 -04:00
Brad King 708d1cf1ee ENH: Support more preprocessor values in VS6
Previously we rejected all preprocessor definition values containing
spaces for the VS6 IDE generator.  In fact VS6 does support spaces but
not in combination with '"', '$', or ';', and only if we use the sytnax
'-DNAME="value with spaces"' instead of '-D"NAME=value with spaces"'.
Now we support all definition values that do not have one of these
invalid pairs.  See issue #8779.
2009-04-24 11:18:06 -04:00
Brad King d847ca8e27 BUG: Fix CTest.UpdateGIT test for older git
Older git versions do not support 'git init --bare', so we instead use
the more proper 'git --bare init'.
2009-04-23 09:10:07 -04:00
Brad King 9c17cbeb44 ENH: Teach CTest to handle git repositories
This creates cmCTestGIT to drive CTest Update handling on git-based work
trees.  Currently we always update to the head of the remote tracking
branch (git pull), so the nightly start time is ignored for Nightly
builds.  A later change will address this.  See issue #6994.
2009-04-22 09:19:06 -04:00
Bill Hoffman 3ca9bf797c ENH: make sure tests for cpack are run correctly 2009-04-21 17:15:42 -04:00
Bill Hoffman c8513fe14b ENH: make sure tests for cpack are run correctly 2009-04-21 17:15:04 -04:00
Bill Hoffman 0bbed87a5b ENH: make sure tests for cpack are run correctly 2009-04-21 17:13:46 -04:00
Bill Hoffman 572cf0212f ENH: make sure tests for cpack are run correctly 2009-04-21 17:12:37 -04:00
Brad King 0d92350bb6 ENH: Create file(RENAME) command mode
This creates command "file(RENAME <oldname> <newname>)" to rename a file
or directory within a single disk volume.
2009-04-15 09:58:13 -04:00
Brad King 68248be52e ENH: Allow lists in AddExternalProject arguments
The add_external_project function separates its arguments with ';'
separators, so previously no command line argument could contain one.
When specifying CMAKE_ARGS, some -D argument values may need to contain
a semicolon to form lists in the external project cache.

This adds add_external_project argument LIST_SEPARATOR to specify a list
separator string.  The separator is replaced by ';' in arguments to any
command created to drive the external project.  For example:

  add_external_project(...
    LIST_SEPARATOR ::
    CMAKE_ARGS -DSOME_LIST:STRING=A::B::C
    ...)

passes "-DSOME_LIST:STRING=A;B;C" to CMake for the external project.
2009-04-09 13:56:08 -04:00
Brad King d05e98f8d7 ENH: Allow IMPORTED_IMPLIB w/o IMPORTED_LOCATION
Linking to a Windows shared library (.dll) requires only its import
library (.lib).  This teaches CMake to recognize SHARED IMPORTED library
targets that set only IMPORTED_IMPLIB and not IMPORTED_LOCATION.
2009-04-08 16:29:04 -04:00
Brad King d49978a948 ENH: Teach Update* tests to report local mod step
The CTest.UpdateCVS/SVN tests report every step with a message.  This
adds a message for the local modification step.
2009-04-08 09:22:08 -04:00
Brad King cd532b6132 ENH: Make UpdateCVS test robust to 1s file time res
CVS clients recognize file modifications only if a file's timestamp is
newer than its CVS/Entries line.  This fixes intermittent failure of the
test on filesystems with low timestamp resolution by delaying before
creating a local modification.
2009-04-08 09:21:57 -04:00
Brad King d6bdaf9f13 ENH: Test transitive link to subdir-imported lib
This tests linking to an imported target that is not visible but is a
transitive dependency of a target that is visible.  See issue #8843.
2009-04-06 11:11:33 -04:00
David Cole 2981936707 STYLE: White space only change to see if continuous is working on new dashboard machine... 2009-03-31 13:50:26 -04:00
David Cole 17d62105d6 STYLE: White space only change to see if continuous is working on new dashboard machine... 2009-03-31 13:16:56 -04:00
Brad King d2175580e7 ENH: Generalize AddExternalProject step creation
This creates function 'add_external_project_step' to centralize creation
of external project steps.  Users may call it to add custom steps to
external project builds.
2009-03-30 11:36:32 -04:00
Brad King 5f4686920d BUG: Fix CMAKE_CURRENT_LIST_FILE in macros
The value of CMAKE_CURRENT_LIST_FILE is supposed to be the list file
currently being executed.  Before macros were introduced this was always
the context of the argument referencing the variable.

Our original implementation of macros replaced the context of command
arguments inside the macro with that of the arguments of the calling
context.  This worked recursively, but only worked when macros had at
least one argument.  Furthermore, it caused parsing errors of the
arguments to report the wrong location (calling context instead of line
with error).

The commit "Improve context for errors in macros" fixed the latter bug
by keeping the lexical context of command arguments in macros.  It broke
evaluation of CMAKE_CURRENT_LIST_FILE because the calling context was no
longer preserved in the argument referencing the variable.  However,
since our list file processing now maintains the proper value of
CMAKE_CURRENT_LIST_FILE with dynamic scope we no longer need the context
of the argument and can just evaluate the variable normally.
2009-03-25 10:37:04 -04:00
Brad King 4085454658 ENH: Support preprocessor def values in VS6
The add_definitions() command and COMPILE_DEFINITIONS dir/tgt/src
properties support preprocessor definitions with values.  Previously
values were not supported in the VS6 generator even though the native
tool supports them.  It is only values with spaces that VS6 does not
support.  This enables support and instead complains only for values
with spaces.  See issue #8779.
2009-03-23 14:48:09 -04:00
Brad King 2cc46c12f8 ENH: Add patch step for add_external_project
The patch step runs parallel to the update step since it does not make
sense to have both.  Configuration of the step requires specification of
a PATCH_COMMAND argument to add_external_project.
2009-03-18 11:01:02 -04:00
Brad King 6ae0ff626a ENH: Improve add_external_project interface
This rewrites the keyword/argument parsing and handling in the
AddExternalProject module to use arguments more literally:

  - The strict keyword-value pairing is gone in favor of keywords with
    arbitrary non-keyword values.  This avoids requiring users to escape
    spaces and quotes in command lines.

  - Customized step command lines are now specified with a single
    keyword <step>_COMMAND instead of putting the arguments in a
    separate entry (previously called <step>_ARGS).

  - Build step custom commands now use VERBATIM mode so that arguments
    are correctly escaped on the command line during builds.
2009-03-18 11:00:30 -04:00
Brad King ecb0f3af55 ENH: New foreach(<var> IN ...) mode
This creates a new mode of the foreach command which allows precise
iteration even over empty elements.  This mode may be safely extended
with more keyword arguments in the future.  The cost now is possibly
breaking scripts that iterate over a list of items beginning with 'IN',
but there is no other way to extend the syntax in a readable way.
2009-03-17 15:10:15 -04:00
Brad King 493f88ce55 ENH: Allow projects to disable per-rule echo lines
This creates global property RULE_MESSAGES which can be set to disbale
per-rule progress and action reporting.  On Windows, these reports may
cause a noticable delay due to the cost of starting extra processes.
This feature will allow scripted builds to avoid the cost since they do
not need detailed information anyway.  This replaces the RULE_PROGRESS
property created earlier as it is more complete.  See issue #8726.
2009-03-16 16:55:58 -04:00
Brad King 2f651c2e59 ENH: Allow projects to disable per-rule progress
This creates global property RULE_PROGRESS which can be set to disbale
per-rule progress reporting.  On Windows, progress reports may cause a
noticable delay due to the cost of starting an extra process.  This
feature will allow scripted builds to avoid the cost since they do not
need detailed progress anyway.  See issue #8726.
2009-03-16 16:22:19 -04:00
Brad King 9862f383d0 ENH: Add NAME mode to ADD_TEST command
This creates command mode add_test(NAME ...).  This signature is
extensible with more keyword arguments later.  The main purpose is to
enable automatic replacement of target names with built target file
locations.  A side effect of this feature is support for tests that only
run under specific configurations.
2009-03-16 10:51:30 -04:00
Brad King e5e91d6179 ENH: Teach set/get_property about CACHE properties
This adds the CACHE option to set_property and get_property commands.
This allows full control over cache entry information, so advanced users
can tweak their project cache as desired.  The set_property command
allows only pre-defined CACHE properties to be set since others would
not persist anyway.
2009-03-10 11:10:59 -04:00
David Cole 7bf80c9a11 STYLE: White space only change to see if continuous is working on new dashboard machine... 2009-03-06 14:29:31 -05:00
Brad King ca3b93d9c6 ENH: Teach message() how to display warnings
This adds message(WARNING) and message(AUTHOR_WARNING) command modes and
fully documents the command behavior in all modes.
2009-03-06 10:04:06 -05:00
Brad King 98c51ff6dc ENH: Overhaul CMake version numbering
This moves the version numbers into an isolated configured header so
that not all of CMake needs to rebuild when the version changes.

Previously we had spaces, dashes and/or the word 'patch' randomly chosen
before the patch number.  Now we always report version numbers in the
traditional format "<major>.<minor>.<patch>[-rc<rc>]".

We still use odd minor numbers for development versions.  Now we also
use the CCYYMMDD date as the patch number of development versions, thus
allowing tests for exact CMake versions.
2009-03-05 15:17:07 -05:00
Brad King 170febac52 ENH: Cleanup cmake --build interface.
This cleans up the 'cmake --build' command-line interface:
  - Rename --clean to --clean-first to better describe it.
  - Replace --extra-options with a -- separator to simplify passing of
    multiple native build tool options.
  - Document the options in the main CMake man page description of the
    --build option, and shares this with the usage message.
  - Require --build to be the first argument when present.
  - Move implementation into cmakemain where it belongs.
2009-03-04 15:39:27 -05:00
Brad King ba5cbf0fb1 ENH: Better recursive make in AddExternalProject
This teaches AddExternalProject to run "$(MAKE)" for build and install
steps of CMake-based external projects when using a Makefile generator.
It allows the external project to participate in a parallel make invoked
on the superproject.
2009-03-04 11:45:42 -05:00
Brad King 7960f7541c ENH: Extend CTest.UpdateSVN to test local mods
This teaches the test to create local modifications in the work tree
before updating.
2009-02-26 09:22:16 -05:00
Brad King ff32962a68 ENH: Test included header in Fortran preprocessing
This extends the Fortran preprocessing test to include a header file
through a preprocessor directive.
2009-02-24 14:32:31 -05:00
Brad King 1595b8e69e ENH: Add install(DIRECTORY) option 'OPTIONAL'
This adds the OPTIONAL option to the install(DIRECTORY) command.  It
tells the installation rule that it is not an error if the source
directory does not exist.  See issue #8394.
2009-02-24 11:41:40 -05:00
Brad King ac89c8004b BUG: Fix CTest.UpdateCVS/SVN tests for win slashes
This fixes the tests to allow windows slashes in reported file names in
the generated Update.xml file.
2009-02-23 16:54:53 -05:00
Brad King 430b376a5b ENH: Test svn updates with space in author name
This enhances the CTest.UpdateSVN test with a space in the test author
name.  It will check that author name parsing works correctly.
2009-02-23 15:59:20 -05:00
Brad King 5b49f22caf ENH: Enhance CTest.UpdateCVS/SVN tests
This adds a source tree subdirectory to the content of the test
projects.  It also smoke tests more than one revision worth of changes.
2009-02-23 15:59:07 -05:00
Brad King a16c857c30 ENH: Better failure output from CTest.Update*
This teaches CTestUpdateCommon to report the process exit condition from
failed child processes executed during tests.
2009-02-23 15:58:44 -05:00
Bill Hoffman 819a4f2e57 ENH: make sure multiple archs are only tested when the work 2009-02-19 15:24:44 -05:00
Bill Hoffman 756cb547f3 BUG: fix xcode depend issue and add a test for it 2009-02-19 11:51:24 -05:00
Brad King ae873d4a89 ENH: Add get_filename_component(... REALPATH)
This patch from Philip Lowman creates a REALPATH mode in the
get_filename_component command.  It is like ABSOLUTE, but will also
resolve symlinks (which ABSOLUTE once did but was broken long ago).
See issue #8423.
2009-02-09 09:23:55 -05:00
Brad King 16fe328dfc BUG: Alternative fix to bug #8423
The patch used to fix this bug used SystemTools::GetRealPath which works
only for existing files.  It broke the case of using the command
get_filename_component for a non-existing file.  Also, it changed
long-standing behavior in a possibly incompatible way even for existing
files.  This reverts the original fix and instead updates the
documentation to be consistent with the behavior.
2009-02-06 08:33:52 -05:00
Bill Hoffman 4b5cabed0e ENH: add missing file 2009-01-29 11:57:42 -05:00
Bill Hoffman 33c296a44e BUG: fix for #8423 2009-01-29 11:39:03 -05:00
Bill Hoffman bac4f79764 ENH: change to use CMAKE_CREATE_VERSION from CMAKE_VERSION as CMAKE_VERSION is auto-defined now 2009-01-27 10:35:29 -05:00
Brad King c332e0bf3c ENH: Isolate policy changes in included scripts
Isolation of policy changes inside scripts is important for protecting
the including context.  This teaches include() and find_package() to
imply a cmake_policy(PUSH) and cmake_policy(POP) around the scripts they
load, with a NO_POLICY_SCOPE option to disable the behavior.  This also
creates CMake Policy CMP0011 to provide compatibility.  See issue #8192.
2009-01-22 13:18:40 -05:00
Brad King 3028ca756c ENH: Better policies for functions and macros
This teaches functions and macros to use policies recorded at creation
time when they are invoked.  It restores the policies as a weak policy
stack entry so that any policies set by a function escape to its caller
as before.
2009-01-22 13:16:47 -05:00