Commit Graph

16293 Commits

Author SHA1 Message Date
Brad King eb3761ae68 Merge topic 'constify'
af4c109 cmGeneratorTarget: Make some accessors const.
6bdea06 cmTarget: Make some accessors const.
2013-11-04 07:54:03 -05:00
Brad King ae57fb8ef6 Merge topic 'robust-ctest_empty_binary_directory'
35fbc10 CTest: more aggressive implementation of ctest_empty_binary_directory()
9d9f102 Tests: added test for ctest_empty_binary_directory()
2013-11-04 07:53:47 -05:00
Brad King f3698f7c4a Merge topic 'cpack-drag-n-drop-rez'
53d6ebb cpack: For DragNDrop generator, add sysroot option when calling Rez.
193029c cpack: For DragNDrop generator, add sysroot option when calling Rez.
2013-11-04 07:53:25 -05:00
Peter Kümmel f212615d3e Ninja: don't parse empty string 2013-11-04 13:20:27 +01:00
Kitware Robot e405380d06 CMake Nightly Date Stamp 2013-11-04 00:01:10 -05:00
Stephen Kelly af4c1096f6 cmGeneratorTarget: Make some accessors const. 2013-11-03 22:27:28 +01:00
Stephen Kelly 6bdea066e6 cmTarget: Make some accessors const. 2013-11-03 22:27:28 +01:00
Brad King 25b7f87eca Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-master
Resolve conflict in Source/cmTarget.cxx by integrating the changes to
the internal copy constructor from both sides.  Also resolve a logical
conflict by dropping the special case for INTERFACE_LIBRARY targets.
Since cmTarget::SetMakefile already forces CMP0022 to NEW for such
targets we need no special handling.

Resolve conflict in Source/cmTargetLinkLibrariesCommand.h by dropping
the documentation change.  We will make the same change in the new
location of the same documentation in a separate commit.

Resolve conflicts in

 Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt
 Tests/RunCMake/CMP0022/RunCMakeTest.cmake

by taking the side from the 'policy-CMP0022-fixes' branch.
2013-11-03 09:20:47 -05:00
Brad King 0a561a0347 CMP0022: Warn about a given target at most once
Since cmTarget::ComputeLinkInterface is called separately for each
"head" target that links a target, the warning we produce when
CMP0022 is not set could be repeated.  Add explicit logic to allow
the warning to appear at most once.  Multiple copies of the warning
for the same target are almost always identical and therefore
redundant.  In the rare case that two copies of the warning are
different, the second can appear in a future run after the first
is fixed.
2013-11-03 09:14:54 -05:00
Kitware Robot defbc2aa2a CMake Nightly Date Stamp 2013-11-03 00:01:08 -04:00
Brad King 23d21b78e1 Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets
When cmExportFileGenerator::SetImportLinkInterface exports the old
LINK_INTERFACE_LIBRARIES property values it skips doing so for
non-linkable targets because target->GetLinkInterface returns NULL for
such targets.

Since cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty
looks at the INTERFACE_LINK_LIBRARIES property directly instead of using
the computed link interface, teach it to skip exporting the property if
target->IsLinkable returns false.

Extend the RunCMake.CMP0022 test with a case covering this.  Simply
export an executable target that links to a library that is not
exported.
2013-11-02 14:51:07 -04:00
Brad King e996b4e6dc Merge branch 'object-library-no-TARGET_FILE' into release 2013-11-02 13:41:54 -04:00
Brad King 71eee316c2 Merge branch 'object-library-missing-source' into release 2013-11-02 13:41:47 -04:00
Brad King ef10b87cc1 CMP0022: Plain target_link_libraries must populate link interface
The CMP0022 NEW behavior is that the INTERFACE_LINK_LIBRARIES property
exactly defines the link interface.  The plain target_link_libraries
signature says linking is transitive by default, so it should populate
the property.

Teach the target_link_libraries plain signature to populate the
INTERFACE_LINK_LIBRARIES regardless of the CMP0022 setting.  Refactor
the cmTarget::ComputeLinkInterface checks that warn when the policy is
not set to compare the new property to either the explicitly set old
link interface properties or the link implementation fallback for all
linkable target types, not just static libraries.

This fixes a regression in 2.8.12.0 that caused target_link_libraries to
not implement transitive linking in the plain signature once the policy
CMP0022 is set to NEW.
2013-11-02 12:55:17 -04:00
Brad King 4b0cfa7004 Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixes 2013-11-02 12:47:45 -04:00
Brad King 6f6caee388 Merge topic 'archive-skip-symlink-on-windows'
4c383b5 cmake: Avoid '-E tar' failure to extract symlinks on Windows (#13251)
0d8552c cmSystemTools: Re-order extract_tar logic
2013-11-02 10:54:51 -04:00
Brad King 8ada96a39f Merge topic 'cmake-gui-warning'
82bacea cmake-gui: Rename local variable to avoid shadowing a member
2013-11-02 10:54:47 -04:00
Brad King f61bbf1b90 Merge topic 'ctest-p4'
1b54b1d ctest_update: Do not remove the p4 depot name
2013-11-02 10:54:42 -04:00
Brad King 872a9d6476 Merge topic 'object-library-no-TARGET_FILE'
d960589 Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)
2013-11-02 10:54:23 -04:00
Brad King 53ac9b8d86 Merge topic 'object-library-missing-source'
5a2fc3d Check for OBJECT_LIBRARY source files at start of generation
2013-11-02 10:54:15 -04:00
Brad King 2043a86b6a Merge topic 'doc-rst-note-and-productionlist'
450b515 cmRST: Add support for the note and productionlist directives
2013-11-02 10:54:10 -04:00
Brad King 5b838ed383 Merge topic 'revert-accidental-changes'
13aea6d cmFindCommon: Revert accidental change
4064d6f target_link_libraries: Revert accidental change
2013-11-02 10:54:05 -04:00
Brad King 13aea6d175 cmFindCommon: Revert accidental change
In commit c4373b33 (cmTarget: Make GetProperty() const, 2013-10-29)
we accidentally changed the cmFindCommon.cxx logic in a way that
looks like a local experiment leftover that went unnoticed due to
the size of the other changes in the commit.  Revert it.
2013-11-02 10:45:15 -04:00
Nils Gladitz 35fbc10079 CTest: more aggressive implementation of ctest_empty_binary_directory()
Make sure that CMakeCache.txt is the last file being removed since
the binary directory may be left in a state that is no longer
removable otherwise.

Also retry removal a couple of times which makes this more robust
on windows where file locks may temporarily prevent removal.
2013-11-02 13:05:38 +01:00
Brad King 4064d6f216 target_link_libraries: Revert accidental change
In commit c4373b33 (cmTarget: Make GetProperty() const, 2013-10-29)
we accidentally changed the cmTargetLinkLibrariesCommand.cxx logic
in a way that looks like a local experiment leftover that went
unnoticed due to the size of the other changes in the commit.
Revert it.
2013-11-02 07:11:51 -04:00
Kitware Robot 547c59f000 CMake Nightly Date Stamp 2013-11-02 00:01:11 -04:00
Brad King 4c383b52d0 cmake: Avoid '-E tar' failure to extract symlinks on Windows (#13251)
If a symlink fails to extract and the host system is Windows then report
a warning and skip the entry instead of failing.  This will allow
archives containing symbolic links to be extracted on Windows with
somewhat gracefully degraded behavior.
2013-11-01 16:52:22 -04:00
Brad King 0d8552c459 cmSystemTools: Re-order extract_tar logic
Simplify extraction message logic to be easier to follow and to write a
newline before any error messages that may be produced.  Also flip
handling of the archive_write_header return code to handle success in
the "then" case and failure in the "else" case.
2013-11-01 16:52:18 -04:00
Brad King 5a2fc3d696 Check for OBJECT_LIBRARY source files at start of generation
Teach cmGlobalGenerator::CheckTargets to include OBJECT_LIBRARY targets
in the check for source file existence.

Extend the RunCMake.ObjectLibrary test to cover this case.
2013-11-01 14:46:58 -04:00
Brad King 82baceaa60 cmake-gui: Rename local variable to avoid shadowing a member
Address warnings:

 Source/QtDialog/CMakeSetupDialog.cxx:1233:15:
 warning: declaration of 'cursor' shadows a member of 'this' [-Wshadow]
 Source/QtDialog/CMakeSetupDialog.cxx:1260:15:
 warning: declaration of 'cursor' shadows a member of 'this' [-Wshadow]

by renaming the local variable to 'textCursor'.
2013-11-01 12:56:43 -04:00
Brad King d960589778 Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)
Teach the cmGeneratorExpressionEvaluator filesystem artifact logic
to reject OBJECT_LIBRARY targets since they have no main artifact.
Without the explicit rejection evaluation falls through to an
internal CMake error message in cmTarget::GetOutputInfo.

Extend the RunCMake.GeneratorExpression test to cover these cases.
2013-11-01 10:17:01 -04:00
Brad King 20bb609171 Merge topic 'fix-duplicate-test-run'
2eccdbd CTest: prevent tests from being inserted in the cost list twice
2013-11-01 09:40:26 -04:00
Brad King de5c29890f Merge topic 'constify'
c4373b3 cmTarget: Make GetProperty() const.
cfb6661 Don't call SetProperty from GetProperty.
2013-11-01 09:40:05 -04:00
Brad King a549b68d37 Merge topic 'cmake-syntax-recorded-brackets'
b54dbeb Test foreach/function/macro handling of bracket arguments
ccdf7e0 macro: Do not substitute for placeholders in bracket arguments
999abb9 macro: Add extra indentation to placeholder substitution code
2013-11-01 09:39:56 -04:00
Pedro Navarro 1b54b1d5b7 ctest_update: Do not remove the p4 depot name
Instead of removing the depot name, which causes problems when looking
at the file change list in CDash, make the Update test remove a given
prefix from the files retrieved from Update.xml.
2013-11-01 08:52:26 -04:00
Clinton Stimpson 53d6ebb360 cpack: For DragNDrop generator, add sysroot option when calling Rez. 2013-11-01 05:31:07 -06:00
Kitware Robot 80c3420f30 CMake Nightly Date Stamp 2013-11-01 00:01:14 -04:00
Clinton Stimpson 193029c4aa cpack: For DragNDrop generator, add sysroot option when calling Rez.
Also adding overwrite option (-ov) in case multiple temporary
dmg files are being created.

Fixes bug #14536.
2013-10-31 20:25:12 -06:00
Nils Gladitz 2eccdbdc2a CTest: prevent tests from being inserted in the cost list twice 2013-10-31 22:10:56 +01:00
Stephen Kelly c4373b33b2 cmTarget: Make GetProperty() const.
This has follow-on effects for other methods and classes. Further
work on making the use of const cmTarget pointers common can be
done, particularly with a view to generate-time methods.
2013-10-31 14:52:11 +01:00
Brad King 7a616e75b8 Merge topic 'use-generator-target'
07f5788 Move TraceDependencies to cmGeneratorTarget.
fa03777 Do not populate SourceEntries in AddSourceFile.
2013-10-31 09:40:13 -04:00
Brad King d182a55adb Merge topic 'fix-ninja-launcher-errors-from-custom'
4fcb97e Tests: Add test for CTEST_USE_LAUNCHERS capture of custom commands
05c7042 Ninja: run custom commands through launcher if available
2013-10-31 09:39:54 -04:00
Brad King c247f1e175 Merge topic 'vs-generator-names'
29071fe VS: Add version year to generator names
2013-10-31 09:39:42 -04:00
Nils Gladitz 05c70424f6 Ninja: run custom commands through launcher if available 2013-10-31 09:28:55 -04:00
Kitware Robot e02e3560fc CMake Nightly Date Stamp 2013-10-31 00:01:08 -04:00
Brad King ccdf7e04d4 macro: Do not substitute for placeholders in bracket arguments
Fix the macro command implementation to avoid substituting macro
placeholders in bracket arguments recorded inside the macro block.
2013-10-30 19:13:33 -04:00
Brad King 999abb993e macro: Add extra indentation to placeholder substitution code
The next commit will make this block conditional so pre-indent it
to clarify the simplicity of the change.
2013-10-30 19:10:11 -04:00
Stephen Kelly cfb6661333 Don't call SetProperty from GetProperty.
Memoize with the internal container directly instead.
2013-10-30 22:41:51 +01:00
Stephen Kelly 07f5788385 Move TraceDependencies to cmGeneratorTarget. 2013-10-30 21:29:45 +01:00
Stephen Kelly fa03777626 Do not populate SourceEntries in AddSourceFile.
It only generates a default constructed SourceEntry for each
cmSourceFile.

  this->Internal->SourceEntries[sf];

in cmTargetTraceDependencies::Trace has the same effect, and is called
early in generation-time for each source file anyway.
2013-10-30 21:16:29 +01:00
Brad King 8a6e82724c Merge topic 'use-generator-target'
638843a Remove the Location member from cmTarget.
90ef1cf Move GenerateTargetManifest to cmGeneratorTarget.
25f1df3 Split CreateGeneratorTargets into two methods.
2013-10-30 14:55:35 -04:00
Brad King 450b515ad0 cmRST: Add support for the note and productionlist directives
Simply print out the lines as normal paragraph text.  Teach the
CMakeLib.testRST test to cover this syntax.  Update the
cmake-developer.7 manual to document support for the directives.
2013-10-30 10:26:29 -04:00
Brad King f2572b04c5 Merge topic 'fix-coverage-over-multiple-projects'
eb1d6ce CTest: clean TargetDirs between unrelated coverage runs (issue 13143)
2013-10-30 10:25:12 -04:00
Kitware Robot 601d40358e CMake Nightly Date Stamp 2013-10-30 00:01:07 -04:00
Stephen Kelly 638843af98 Remove the Location member from cmTarget.
It is never used. Presumably it only exists so that a const char * can
be returned from GetLocation. However, that is getting in the way
now, so use a static std::string instead, which is already a common
pattern in cmake.
2013-10-29 15:42:42 +01:00
Brad King 8f80eaf981 Merge topic 'fix-custom-source-with-flags-crash'
f037b9b Generators: don't append sources from utility targets to objectSources
2013-10-29 09:45:45 -04:00
Nils Gladitz eb1d6cef2f CTest: clean TargetDirs between unrelated coverage runs (issue 13143) 2013-10-29 08:13:21 +01:00
Kitware Robot 047c1ec457 CMake Nightly Date Stamp 2013-10-29 00:01:08 -04:00
Brad King fcbe435c23 Merge topic 'Qt-auto-generators'
9c87d9c Add automatic rcc invocation for Qt.
84218e1 Add automatic uic invocation for Qt.
94a0ca6 Record which files are skipped by automoc.
18fb758 Run the main executable created in the autogen tests.
e485ba1 Rename the QtAutomoc tests to QtAutogen.
7ce65c3 Add extra checks for the AUTOMOC target property.
32771fc Update output messages for generic use.
f371ab5 Rename RunAutomoc to RunAutogen.
85b3d6e Extract an SetupAutoMocTarget method.
ca124a1 Rename the AutomocInfo.cmake file to be more generic.
a342c9f Move some makefile definitions up away from moc-specific code.
98632ef Add the AUTOGEN_TARGETS_FOLDER and obsolete AUTOMOC_TARGETS_FOLDER.
63378ba Rename some variables to reflect broader scope.
97f1aa3 Rename method to reflect generic use.
4abb111 Rename local variable to reflect generic use.
03878c9 Move variable set to where it is used.
...
2013-10-28 15:23:09 -04:00
Brad King 29071fed2e VS: Add version year to generator names
Rename the Visual Studio >= 10 generators to indicate the version year:

 Visual Studio 10 => Visual Studio 10 2010
 Visual Studio 11 => Visual Studio 11 2012
 Visual Studio 12 => Visual Stduio 12 2013

Report the names with the year to the list of available generators so
that the cmake-gui drop-down shows the years.  When selecting a
generator from the "-G" option or from an existing CMAKE_GENERATOR cache
entry, recognize names without the years for compatibility and map them
to the names with years.

Update the generator names in the cmake-generators.7 manual.
2013-10-28 13:43:14 -04:00
Nils Gladitz f037b9b726 Generators: don't append sources from utility targets to objectSources 2013-10-28 14:25:28 +01:00
Brad King 16df2456a4 Merge topic 'enable-language-require-compiler'
3e04946 Require CMAKE_<LANG>_COMPILER to be found as a full path
6007f7c CMakeDetermineCompilerId: Always use compiler detected from IDE
332771c CMakeDetermine*Compiler: Remove temporary cache entry
2013-10-28 08:39:29 -04:00
Brad King ecc6d7f919 Merge topic 'restore-serial-failed-test-order'
2b5c9da CTest: restore old failed test priority in serial test runs
2013-10-28 08:39:11 -04:00
Brad King e378bc6441 Merge topic 'ninja-use-deps'
eeb4aec Ninja: use deps = gcc/msvc feature
2013-10-28 08:38:40 -04:00
Brad King 3e04946f7b Require CMAKE_<LANG>_COMPILER to be found as a full path
All generators now support detection of the full path to the compiler, so
require it to be so.  This will allow CMake<LANG>Information.cmake and
other logic to assume the full path to the compiler tool is available.

The Makefile generators already rejected CMAKE_<LANG>_COMPILER values
that did not name an existing compiler.  Extend this error message to
all generators, make it occur as early as possible, and improve the
message with advice about how to set the compiler.  If the full path to
the compiler is not known, finish enabling languages with a fatal error
so configuration does not continue.

For now, allow the RC language compiler to not be a full path.  Later we
will need to detect the full path to "rc" under the VS IDE.

Add a RunCMake.CompilerNotFound test to cover failure cases.
Fix the RunCMake.CompilerChange test EmptyCompiler case to work
when configuration does not continue past enable_language.
2013-10-28 08:36:14 -04:00
Kitware Robot 25cfc1e380 CMake Nightly Date Stamp 2013-10-28 00:01:08 -04:00
Stephen Kelly 90ef1cfe48 Move GenerateTargetManifest to cmGeneratorTarget. 2013-10-27 20:29:45 +01:00
Stephen Kelly 25f1df3e81 Split CreateGeneratorTargets into two methods.
As the generate-time-related API is moving to cmGeneratorTarget, almost
all of generation code needs to be able to access instances of it.
2013-10-27 20:29:34 +01:00
Nils Gladitz 2b5c9da5bc CTest: restore old failed test priority in serial test runs 2013-10-27 08:44:55 +01:00
Kitware Robot b63c71aa35 CMake Nightly Date Stamp 2013-10-27 00:01:06 -04:00
Brad King 38fc334fd0 Merge topic 'ctest-fix-run-serial'
ff59365 CTest: fix dashboard issues associated with the ctest-fix-run-serial topic
7a665ae CTest: added test for RUN_SERIAL issue #14484
384beff CTest: added comments that describe the basic test sorting approach
adbe00d CTest: removed redundant copy of test dependency set
1b750cb CTest: perform cycle test early
6d4d7ca CTest: consider previously failed tests before all others
e809d8c CTest: prioritize tests by their depth in the dependency graph
44017a4 CTest: handle dependent and non dependent test requirements equally
2013-10-26 10:29:34 -04:00
Brad King ef13fc4dfc Merge topic 'ctest-p4'
970c823 ctest_update: Add support for Perforce p4 client
2013-10-26 10:29:28 -04:00
Brad King 40df0d6536 Merge topic 'less-versioned-installs'
1093dee Shorten CMake version used in install destinations
2013-10-26 10:29:20 -04:00
Brad King cd553c34d6 Merge topic 'wix-fix-shortcut-ids'
fe7f8c9 CPackWiX: use safe IDs for generated start menu shortcuts
2013-10-26 10:28:50 -04:00
Brad King 4025013dd7 Merge topic 'compatible-interface-numbers'
ff6c401 cmTarget: Add interface for compatible numeric properties
e4e20c1 cmTarget: Add enumeration for consistency to expect from properties.
9877769 cmTarget: Assign consistent content back to the property being evaluated.
816b4a8 cmTarget: Make consistentProperty return consistent content.
030800a cmTarget: Add a template to create correct implied content.
2013-10-26 10:28:30 -04:00
Brad King bb21e17fb7 Merge topic 'remove-pre-2.4-compatibility'
7d47c69 Drop compatibility with CMake < 2.4
c7c44fc CTestTest*: Update minimum required CMake to 2.4
2013-10-26 10:28:09 -04:00
Brad King 1b21ac405f Merge topic 'fix-tll-static-private'
239b0c6 Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.
2013-10-26 10:28:02 -04:00
Brad King 564cf169e6 Merge topic 'cmarray-templates'
dfe0c21 cmArray: Use macro variant of cmArray{Begin,Size,End} for old GCC.
2013-10-26 10:27:56 -04:00
Pedro Navarro 970c82348b ctest_update: Add support for Perforce p4 client
Teach the ctest_update implementation to use the p4 command-line
client to perform updates and extract the list of changes.

Add a CTest.UpdateP4 test like those that exist already for the other
version control tools.  Make the test available when p4 and the p4d
server are found.  During the test launch p4d in the background to
serve a repository from the test directory.  Then direct the client
toward this server for the duration of the test.
2013-10-26 10:24:15 -04:00
Nils Gladitz fe7f8c99a4 CPackWiX: use safe IDs for generated start menu shortcuts 2013-10-26 10:15:19 -04:00
Stephen Kelly 239b0c6b0e Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.
Only valid target names or generator expressions may appear in
the target field of a LINK_ONLY expression.

Other content like link flags should still be added to that property
(wrapped in config-specific generator expressions), but not wrapped
in LINK_ONLY. Otherwise undue warnings would be issued for the
policy CMP0022.

The LINK_ONLY expression only has an effect for actual target
names anyway, so there is no logical deficit.
2013-10-26 10:10:20 -04:00
Kitware Robot e7a5a4f4a5 CMake Nightly Date Stamp 2013-10-26 00:01:09 -04:00
Nils Gladitz ff59365f8b CTest: fix dashboard issues associated with the ctest-fix-run-serial topic 2013-10-25 21:39:58 +02:00
Brad King 1093deebd0 Shorten CMake version used in install destinations
Since commit c9a5f34b (Cleanup use of CMake version in install
destinations, 2013-09-26) we use the full CMake version in default
install destinations.  For rapidly changing versions of the form

 <major>.<minor>.<patch>.<date>-g<commit>[-dirty]

used by developers this is too granular.  Instead use just

 <major>.<minor>.<patch>

as the version for default install destinations.  This will still
be granular enough for unique directories in releases.

On Cygwin continue to use the full ${CMake_VERSION} as was the case
prior to the above-mentioned commit.
2013-10-25 09:01:37 -04:00
Kitware Robot fd818b2ff4 CMake Nightly Date Stamp 2013-10-25 00:01:12 -04:00
Peter Kümmel eeb4aece1c Ninja: use deps = gcc/msvc feature
cmcldeps is now only used for .rc file processing
2013-10-24 19:48:18 +02:00
Stephen Kelly dfe0c2168b cmArray: Use macro variant of cmArray{Begin,Size,End} for old GCC.
It is not capable of using the template versions.
2013-10-24 16:07:52 +02:00
Brad King c10e981fd0 Merge topic 'cmake-syntax-updates'
2945814 cmRST: Teach cmake-module directive to scan bracket comments
8bb2ee9 cmake-developer.7: Improve flow of module documentation instructions
efcf318 Add \-continuation to CMake language quoted arguments
2013-10-24 09:51:44 -04:00
Stephen Kelly 9c87d9cc3e Add automatic rcc invocation for Qt.
This replaces the need to invoke qt4_add_resources by allowing
adding the source .qrc file directly to the target sources.
2013-10-24 12:30:41 +02:00
Stephen Kelly 84218e1870 Add automatic uic invocation for Qt.
The source files are already processed by cmQtAutomoc to look for
moc includes, so extend that to also look for ui_ includes and
find corresponding .ui files to process.

This replaces the need to invoke qt4_wrap_ui().

As the ui files are not likely to be part of the SOURCES of the
target, store the options associated with them separately in the
cmMakefile for querying during the autogen run.
2013-10-24 12:30:38 +02:00
Stephen Kelly 94a0ca604c Record which files are skipped by automoc.
They may not be skipped by autouic.
2013-10-24 11:50:58 +02:00
Stephen Kelly 7ce65c3c97 Add extra checks for the AUTOMOC target property.
In an upcoming commit, this class will be used even if it is not set.
2013-10-24 11:50:58 +02:00
Stephen Kelly 32771fc7ca Update output messages for generic use. 2013-10-24 11:50:58 +02:00
Stephen Kelly f371ab5803 Rename RunAutomoc to RunAutogen.
It will soon be used to process ui and rcc files too.
2013-10-24 11:50:58 +02:00
Stephen Kelly 85b3d6e73d Extract an SetupAutoMocTarget method.
This class will soon gain methods for autouic and autorcc.
2013-10-24 11:50:58 +02:00
Stephen Kelly ca124a1515 Rename the AutomocInfo.cmake file to be more generic. 2013-10-24 11:50:57 +02:00
Stephen Kelly a342c9ffed Move some makefile definitions up away from moc-specific code. 2013-10-24 11:50:57 +02:00
Stephen Kelly 98632effeb Add the AUTOGEN_TARGETS_FOLDER and obsolete AUTOMOC_TARGETS_FOLDER. 2013-10-24 11:50:47 +02:00
Stephen Kelly 63378baa1c Rename some variables to reflect broader scope. 2013-10-24 09:14:13 +02:00
Stephen Kelly 97f1aa39da Rename method to reflect generic use. 2013-10-24 09:14:13 +02:00
Stephen Kelly 4abb111584 Rename local variable to reflect generic use. 2013-10-24 09:14:13 +02:00
Stephen Kelly 03878c9a22 Move variable set to where it is used. 2013-10-24 09:14:13 +02:00
Stephen Kelly be23dcfeb1 Rename the cmake_automoc command to cmake_autogen.
There is no need for a "cmake_automoc" backward compatibility command
because it is internal, undocumented, and only executed from a matching
version of cmake.
2013-10-24 09:14:13 +02:00
Stephen Kelly 52d5d4e915 Rename the cmQtAutoGenerator instances to reflect coming features. 2013-10-24 09:14:12 +02:00
Stephen Kelly 5c058c8f12 Rename the cmQtAutomoc class to cmQtAutoGenerators.
It will be extended to process .ui and .qrc files too.
2013-10-24 09:14:12 +02:00
Stephen Kelly ff6c401309 cmTarget: Add interface for compatible numeric properties
When using the boost MPL library, one can set a define to increase
the limit of how many variadic elements should be supported. The
default for BOOST_MPL_LIMIT_VECTOR_SIZE is 20:

 http://www.boost.org/doc/libs/1_36_0/libs/mpl/doc/refmanual/limit-vector-size.html

If the foo library requires that to be set to 30, and the independent
bar library requires it to be set to 40, consumers of both need to set
it to 40.

 add_library(foo INTERFACE)
 set_property(TARGET foo PROPERTY INTERFACE_boost_mpl_vector_size 30)
 set_property(TARGET foo PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size)
 target_compile_definitions(foo INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>)

 add_library(bar INTERFACE)
 set_property(TARGET bar PROPERTY INTERFACE_boost_mpl_vector_size 40)
 # Technically the next two lines are redundant, but as foo and bar are
 # independent, they both set these interfaces.
 set_property(TARGET bar PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size)
 target_compile_definitions(bar INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>)

 add_executable(user)
 target_link_libraries(user foo bar)

Because the TARGET_PROPERTY reads the boost_mpl_vector_size property
from the HEAD of the dependency graph (the user target), and because
that property appears in the COMPATIBLE_INTERFACE_NUMBER_MAX of
the dependencies of the user target, the maximum value for it is
chosen for the compile definition, ie, 40.

There are also use-cases for choosing the minimum value of a number.
In Qt, deprecated API can be disabled by version. Setting the
definition QT_DISABLE_DEPRECATED_BEFORE=0 disables no deprecated
API. Setting it to 0x501000 disables API which was deprecated before
Qt 5.1 etc.

If two dependencies require the use of API which was deprecated in
different Qt versions, then COMPATIBLE_INTERFACE_NUMBER_MIN can be
used to ensure that both can compile.
2013-10-24 08:42:05 +02:00
Stephen Kelly e4e20c1d19 cmTarget: Add enumeration for consistency to expect from properties.
The type of consistency to be expected will be extended to cover
numeric minimum and maximum.
2013-10-24 08:42:04 +02:00
Stephen Kelly 98777694b9 cmTarget: Assign consistent content back to the property being evaluated.
Currently, 'consistent' means the same or not set. Soon though,
it will be possible to choose a minimum number from an interface
for example.
2013-10-24 08:42:04 +02:00
Stephen Kelly 816b4a8a18 cmTarget: Make consistentProperty return consistent content.
Upcoming features will make use of that.
2013-10-24 08:42:04 +02:00
Stephen Kelly 030800a78a cmTarget: Add a template to create correct implied content.
Otherwise, in the string case, we would get a null pointer instead
of the implied empty string. That will become relevant when the
comparison result is used.
2013-10-24 08:42:04 +02:00
Kitware Robot a25c440f19 CMake Nightly Date Stamp 2013-10-24 00:01:08 -04:00
Brad King 2945814de2 cmRST: Teach cmake-module directive to scan bracket comments
When scanning CMake module files for .rst comments, recognize
bracket comments starting in ".rst:" too.  For example:

 #[[.rst:

Include the bracket comment content terminated by the closing bracket.
Exclude the line containing the bracket if it starts in "#".

Teach the CMakeLib.testRST test to cover multiple bracket lengths
and ending brackets on lines with and without "#".

Update the cmake-developer.7 manual to document the bracket-comment
syntax for .rst documentation.
2013-10-23 09:36:00 -04:00
Brad King efcf318f8d Add \-continuation to CMake language quoted arguments
Teach the CMake language lexer to treat the \-LF pair terminating a
line ending in an odd number of backslashes inside a quoted argument
as a continuation.  Drop the pair from the returned quoted argument
token text.  This will allow long lines inside quoted argument
strings to be divided across multiple lines in the source file.
It will also allow quoted argument text to start on the line after
the opening quote.  For example, the code:

 set(x "\
 ...")

sets variable "x" to the value "..." with no opening newline.

Previously an odd number of backslashes at the end of a line inside
a quoted argument would put a \-LF pair (or a \-CR pair) literally
in the argument.  Then the command-argument evaluator would complain
that the \-escape sequence is invalid.  Therefore this syntax is
available to use without changing behavior of valid existing code.

Teach the RunCMake.Syntax test to cover cases of quoted arguments
with lines ending in \, \\, and \\\.  Odd counts are continuations.
2013-10-23 09:02:07 -04:00
Brad King 7d47c69365 Drop compatibility with CMake < 2.4
Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to
a value lower than 2.4, and generate an error when projects or the user
attempt to do so.  In the error suggest using a CMake 2.8.x release.

Teach cmake_minimum_required to warn about projects that do not require
at least CMake 2.4.  They are not supported by CMake >= 3.0.

Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a
reference to policy CMP0001.
2013-10-23 08:54:31 -04:00
Brad King d67286ff9b Merge topic 'output-CMP0022-entries'
0b3b336 CMP0022: Output link interface mismatch for static library warning
2013-10-23 08:20:14 -04:00
Brad King a8cfc21843 Merge topic 'doc-cmake-developer'
e0ce6f0 cmRST: Cross-reference cmake-developer.7 manual and cmRST Doxygen
c1c239b Help: Add documentation format to cmake-developer.7 manual
a06a90f Help: Organize cmake-developer.7 manual Modules section
28f08ba Help: Fix module documentation markup in cmake-developer.7 manual
baaab06 Help: Move Modules/readme.txt content into cmake-developer.7 manual
80a311e Help: Add cmake-developer.7 manual
2013-10-23 08:20:01 -04:00
Brad King 8855bf5395 Merge topic 'remove-old-commands-by-policy'
6c91944 Add policy CMP0036 to disallow build_name
3969bb2 Add policy CMP0035 to disallow variable_requires
178b9af Add policy CMP0034 to disallow utility_source
248d1dc Add policy CMP0033 to disallow export_library_dependencies
6865c8f Add policy CMP0032 to disallow output_required_files
aa76518 Add policy CMP0031 to disallow load_command
97268cf Add policy CMP0030 to disallow use_mangled_mesa
9f64fbf Add policy CMP0029 to disallow subdir_depends
882c0f0 Add infrastructure for policies that disallow commands
2013-10-23 08:19:57 -04:00
Brad King 078530b448 Merge topic 'cmarray-templates'
d169b1f Genex: Use cmArraySize for targetPolicyWhitelist
86d5d80 Genex: Remove use of TransitiveWhitelistCompare
73d7705 Add some templates for cleaner array iteration.
2013-10-23 08:19:52 -04:00
Stephen Kelly 0b3b3368fb CMP0022: Output link interface mismatch for static library warning
Other warnings for the same policy already have similar output since
commit 81d2793e (Add differing target property content to policy CMP0022
warning, 2013-09-11).
2013-10-23 08:18:02 -04:00
Kitware Robot 20c0a6a0ad CMake Nightly Date Stamp 2013-10-23 00:01:08 -04:00
Brad King e0ce6f0a22 cmRST: Cross-reference cmake-developer.7 manual and cmRST Doxygen
The cmRST implementation and the list of capabilities documented in the
cmake-developer.7 manual must be kept in sync.  Add a note to each file
to reference the other.
2013-10-22 10:55:23 -04:00
Brad King 6c9194488a Add policy CMP0036 to disallow build_name 2013-10-22 09:09:53 -04:00
Brad King 3969bb23aa Add policy CMP0035 to disallow variable_requires 2013-10-22 09:09:52 -04:00
Brad King 178b9af186 Add policy CMP0034 to disallow utility_source 2013-10-22 09:09:52 -04:00
Brad King 248d1dc057 Add policy CMP0033 to disallow export_library_dependencies 2013-10-22 09:09:52 -04:00
Brad King 6865c8fe05 Add policy CMP0032 to disallow output_required_files 2013-10-22 09:09:52 -04:00
Brad King aa76518f8b Add policy CMP0031 to disallow load_command 2013-10-22 09:09:52 -04:00
Brad King 97268cf5b7 Add policy CMP0030 to disallow use_mangled_mesa 2013-10-22 09:09:51 -04:00
Brad King 9f64fbf5b5 Add policy CMP0029 to disallow subdir_depends 2013-10-22 09:09:51 -04:00
Brad King 882c0f0b69 Add infrastructure for policies that disallow commands
Add cmCommand::Disallowed helper to check the setting of a policy that
disallows the command.  Add a RunCMake.DisallowedCommands test
placeholder.  Add a Help/policy/DISALLOWED_COMMAND.txt file for
inclusion by each policy document to avoid duplication of the common
text.
2013-10-22 09:09:51 -04:00
Brad King ddef8a7cff Merge topic 'rst-literal-blocks'
2d0287d cmRST: Process literal blocks after paragraphs ending in '::'
7b9ae40 cmRST: Do not process inline markup in code-block literals
2013-10-22 09:08:38 -04:00
Brad King c9f17352d1 Merge topic 'genex-conversion-warnings'
a80fe4b use size_t for GeneratorExpressionContent::ContentLength to fix some warnings
2013-10-22 09:08:33 -04:00
Brad King 7809adb814 Merge topic 'string-CONCAT-command'
4e184a2 string: Add CONCAT sub-command
2013-10-22 09:08:15 -04:00
Brad King c951849799 Merge topic 'xcode-folder-types'
e5ec8ad Xcode: Generate 'folder' source type for directories (#14498)
2013-10-22 09:08:01 -04:00
Brad King 0d9e8b1ab9 Merge topic 'double-colon-is-imported'
f063c45 Consider targets with double colons to be IMPORTED or ALIAS targets.
2013-10-22 09:07:40 -04:00
Brad King d8fe9f9de7 Merge topic 'vs9-target-framework-version'
0698714 VS: Set .NET target framework version for VS 7-9 (#14499)
2013-10-22 09:07:28 -04:00
Brad King 61de941ad7 Merge topic 'cmake--build-pipes'
bcd5de7 cmake: Always pass through stdout/stderr in --build mode
2013-10-22 09:07:23 -04:00
Brad King 6384f1683a Merge topic 'remove-cmake-i-wizard'
a8226e9 cmake: Drop support for "-i" wizard mode
2013-10-22 09:07:14 -04:00
Stephen Kelly d169b1f037 Genex: Use cmArraySize for targetPolicyWhitelist
For better readability.
2013-10-22 10:45:23 +02:00
Stephen Kelly 86d5d808c8 Genex: Remove use of TransitiveWhitelistCompare
Replace with generic solution based on cmArray* for better
readability.
2013-10-22 10:45:23 +02:00
Stephen Kelly 73d7705416 Add some templates for cleaner array iteration. 2013-10-22 10:45:23 +02:00
Kitware Robot e71a5e3982 CMake Nightly Date Stamp 2013-10-22 00:01:09 -04:00
Brad King 2d0287dd5e cmRST: Process literal blocks after paragraphs ending in '::'
Teach cmRST to recognize non-markup lines ending in '::' followed by a
blank line as starting a literal block.  Record the whole block as if it
were a literal block directive and print it just like a code block.
Extend the CMakeLib.testRST test to cover such cases.
2013-10-21 15:40:26 -04:00
Brad King 7b9ae406f3 cmRST: Do not process inline markup in code-block literals
Move the ProcessDirectiveParsedLiteral and ProcessDirectiveCodeBlock
method internals into an OutputMarkupLines helper.  Pass through it a
new "inlineMarkup" parameter and teach OutputLine to understand it.
When false, do not process inline markup.  Extend the CMakeLib.testRST
test to cover the two cases.
2013-10-21 14:56:26 -04:00
Rolf Eike Beer a80fe4b1d2 use size_t for GeneratorExpressionContent::ContentLength to fix some warnings
CMake/Source/cmGeneratorExpressionParser.cxx: In member function ‘void cmGeneratorExpressionParser::ParseGeneratorExpression(std::vector<cmGeneratorExpressionEvaluator*>&)’:
CMake/Source/cmGeneratorExpressionParser.cxx:116:55: warning: conversion to ‘unsigned int’ from ‘long int’ may alter its value [-Wconversion]
CMake/Source/cmGeneratorExpressionParser.cxx:240:39: warning: conversion to ‘int’ from ‘long int’ may alter its value [-Wconversion]
2013-10-21 19:58:49 +02:00
Nils Gladitz 384beffc39 CTest: added comments that describe the basic test sorting approach 2013-10-21 19:55:14 +02:00
Nils Gladitz adbe00d6e1 CTest: removed redundant copy of test dependency set 2013-10-21 19:32:53 +02:00
Brad King 4e184a21be string: Add CONCAT sub-command
Add a string(CONCAT) command to simply concatenate input arguments
together.  This will be useful for combining strings from different
quoting syntaxes.  Add a RunCMake.string test covering these cases.
2013-10-21 12:54:20 -04:00
Michael Priestman e5ec8ad47d Xcode: Generate 'folder' source type for directories (#14498)
Teach the Xcode generator to set 'lastKnownFileType' to be 'folder' for
file references that are directories.  If you set 'explicitFileType' to
'sourcecode', then Xcode cannot browse the directory.
2013-10-21 11:09:59 -04:00
Stephen Kelly f063c45589 Consider targets with double colons to be IMPORTED or ALIAS targets.
Introduce a policy to control the behavior.

The AliasTargets unit test already tests that using a
double-semicolon in the name is not an error. Change the ExportImport
test to use a namespace with a double-semicolon too.
2013-10-21 15:56:31 +02:00
Brad King bf02e75079 Merge topic 'INTERFACE_LIBRARY-build-targets'
b04f3b9 Create make rules for INTERFACE_LIBRARY targets.
dba4962 Makefile: Always create clean target command
2013-10-21 09:48:04 -04:00
Stephen Kelly b04f3b9a2a Create make rules for INTERFACE_LIBRARY targets.
The result is that the depends of the target are created.

So,

 add_library(somelib foo.cpp)
 add_library(anotherlib EXCLUDE_FROM_ALL foo.cpp)
 add_library(extra EXCLUDE_FROM_ALL foo.cpp)
 target_link_libraries(anotherlib extra)

 add_library(iface INTERFACE)
 target_link_libraries(iface INTERFACE anotherlib)

Executing 'make iface' will result in the anotherlib and extra targets
being made.

Adding a regular executable to the INTERFACE of an INTERFACE_LIBRARY
will not result in the executable being built with 'make iface' because
of the logic in cmComputeTargetDepends::AddTargetDepend.

So far, this is implemented only for the Makefile generator. Other
generators will follow if this feature is possible for them.

Make INTERFACE_LIBRARY targets part of the all target by default.
Test this by building the all target and making the expected library
EXCLUDE_FROM_ALL.
2013-10-21 09:46:27 -04:00
Brad King 0698714c86 VS: Set .NET target framework version for VS 7-9 (#14499)
Teach the VS 7-9 generators to honor the

 VS_DOTNET_TARGET_FRAMEWORK_VERSION

target property.  This was already done for VS >= 10 by commit cfe6300a
(VS: Add support for .NET target framework version, 2013-06-14).

Inspired-by: mar.na@t-online.de
2013-10-21 09:35:09 -04:00
Brad King 6d1444feac Merge topic 'minor-cleanups'
187385a cmCoreTryCompile: Fix typo in comments.
af2a3ab cmTarget: Remove unused variable.
620b0e9 target_link_libraries(): Fix code snippet in documentation.
2d4ce80 cmPolicies: Fix typo
d6dd264 include(): Use lower case and () to refer to the include() command.
2013-10-21 09:02:31 -04:00
Brad King d06610888d Merge topic 'remove-old-process-execution'
765d783 cmSystemTools: Drop old RunCommand method
52b80b2 exec_program: Re-implement using KWSys Process
c076476 cmake: Drop "cmake -E comspec" Win9x helper
f551135 cmExtraEclipseCDT4Generator: Replace RunCommand with RunSingleCommand
2013-10-21 09:02:26 -04:00
Brad King 9fb65d7090 Merge topic 'cmake-syntax-updates'
daa0f6f Add Lua-style long brackets and long comments to CMake language
a8c6523 cmListFileLexer: Convert CRLF -> LF newlines explicitly
dbd9333 cmListFileLexer: Allow a leading UTF-8 Byte-Order-Mark (#11137)
5645783 cmListFileLexer: Allow command names with one letter (#14181)
2013-10-21 09:02:00 -04:00
Kitware Robot ecfcce44b3 CMake Nightly Date Stamp 2013-10-21 00:01:08 -04:00
Stephen Kelly 187385a8ed cmCoreTryCompile: Fix typo in comments.
Add 'S' to match actual variable names.
2013-10-20 12:29:15 +02:00
Kitware Robot 2e68516818 CMake Nightly Date Stamp 2013-10-20 00:01:17 -04:00
Brad King 765d783972 cmSystemTools: Drop old RunCommand method
All calls to this method have been replaced by newer infrastructure.
Remove it and the supporting cmWin32ProcessExecution class.
2013-10-19 07:25:43 -04:00
Brad King 52b80b2643 exec_program: Re-implement using KWSys Process
Drop use of cmSystemTools::RunCommand.  It used popen on UNIX
(equivalent to /bin/sh -c "$command") and direct CreateProcess calls on
Windows.  Implement equivalent behavior using the KWSys Process library.
Copy windows shortpath conversion logic from cmSystemTools::RunCommand.
2013-10-19 07:21:09 -04:00
Brad King c076476d7d cmake: Drop "cmake -E comspec" Win9x helper
Since we dropped Win9x support there is no need for this helper.
2013-10-19 07:19:49 -04:00
Nils Gladitz 1b750cbf9a CTest: perform cycle test early 2013-10-19 09:28:18 +02:00
Nils Gladitz 6d4d7ca955 CTest: consider previously failed tests before all others 2013-10-19 08:52:28 +02:00
Kitware Robot 0645d74118 CMake Nightly Date Stamp 2013-10-19 00:01:07 -04:00
Nils Gladitz e809d8cfdf CTest: prioritize tests by their depth in the dependency graph 2013-10-19 00:38:35 +02:00
Brad King f551135208 cmExtraEclipseCDT4Generator: Replace RunCommand with RunSingleCommand
Avoid use of the old cmSystemTools::RunCommand by using RunSingleCommand
instead.
2013-10-18 15:08:42 -04:00
Brad King bcd5de775a cmake: Always pass through stdout/stderr in --build mode
Enable the --use-stderr behavior by default and ignore the old option.
Passing through the pipes allows color terminal output and other things
to work as if one ran the native build command directly.
2013-10-18 13:45:27 -04:00
Brad King a8226e91d7 cmake: Drop support for "-i" wizard mode
Tell users to pass cache values with the -D option on the command line
or use cmake-gui or ccmake.
2013-10-18 13:32:39 -04:00
Stephen Kelly af2a3ab691 cmTarget: Remove unused variable. 2013-10-18 18:58:02 +02:00
Stephen Kelly d6dd264671 include(): Use lower case and () to refer to the include() command. 2013-10-18 18:51:10 +02:00
Stephen Kelly 70ae6dfd92 Handle genexes when evaluating INTERFACE_INCLUDE_DIRECTORIES errors. 2013-10-18 10:11:49 -04:00
Brad King 36d8d987c7 Merge topic 'help-replace-version'
89448a5 cmRST: Substitute CMake version for |release| as Sphinx does
2013-10-18 10:02:51 -04:00
Brad King de5159236d Merge topic 'fix-policy-versions'
1873205 Update CMP0024/CMP0025/CMP0026 release version
2013-10-18 10:02:44 -04:00
Brad King abf0dc7fd3 Merge topic 'doc-drop-policy-builtin'
5cdaef7 Drop builtin policy "full" documentation
2013-10-18 10:02:31 -04:00
Brad King b051ccbb52 Merge topic 'allow-repeated-LINK-keywords'
dede273 target_link_libraries: Allow repeated use of LINK_{PRIVATE,PUBLIC} keywords.
2013-10-18 10:02:22 -04:00
Brad King 037887e7ab Merge topic 'simplify-cmake-E-command-line'
d4c3de2 cmake: Simplify -E command line processing
2013-10-18 10:02:15 -04:00
Brad King f6cc3b0744 Merge topic 'vs-intel-compiler'
d14898b Intel: Fix detection of MSVC version simulated by pre-11.0 Fortran
a85e17e Intel: When simulating MSVC, re-use Windows-MSVC (#14476)
af40e8c VS: Detect Intel Fortran compiler id and version
b8522a8 VS: Expose Intel Fortran .vfproj format version to CMake language
2d36c9a CMakeDetermineCompilerId: Fix Intel Fortran compiler id detection
a6fd17c VS: Fix CMAKE_<LANG>_COMPILER detection with Intel toolset (#14471)
2013-10-18 10:01:58 -04:00
Brad King af40e8c312 VS: Detect Intel Fortran compiler id and version
Teach CMakeDetermineCompilerId to use a .vfproj project file to
build the Fortran compiler id source file under the Visual Studio
generators.
2013-10-18 09:55:59 -04:00
Brad King b8522a8c8a VS: Expose Intel Fortran .vfproj format version to CMake language
Lookup the Intel VS plugin version on demand in the VS global generator,
compute the corresponding .vfproj format version number, and memoize it.
Add it as a CMAKE_VS_INTEL_Fortran_PROJECT_VERSION platform definition.
2013-10-18 09:55:50 -04:00
Kitware Robot b4de56386c CMake Nightly Date Stamp 2013-10-18 00:01:14 -04:00
Nils Gladitz 44017a4767 CTest: handle dependent and non dependent test requirements equally 2013-10-17 22:10:35 +02:00
Brad King 89448a5bad cmRST: Substitute CMake version for |release| as Sphinx does
Sphinx provides a builtin substitution for the |release| version.
Teach cmRST to replace this with the CMake version number too.
2013-10-17 15:23:45 -04:00
Brad King 1873205a6e Update CMP0024/CMP0025/CMP0026 release version
These policies were introduced after 2.8.12 in anticipation of 2.8.13.
However, we've now decided the next release will be 3.0.0, so update the
version of introduction accordingly.
2013-10-17 15:14:53 -04:00
Brad King 5cdaef7ee9 Drop builtin policy "full" documentation
The full policy documentation was moved to Help/policy/*.rst by commit
f051814e (Convert builtin help to reStructuredText source files,
2013-10-15).  We no longer need the builtin string literals.

In commit 87cc62ca (Drop "full" documentation output types, 2013-09-13)
we dropped code using the LongDescription field of policy definitions.
We need to follow it up with a change similar to commit 399e9c46 (Drop
builtin property documentation, 2013-09-16) to remove the policy
documentation.  Do that now.  Keep the short description as it is used
in policy error and warning messages.
2013-10-17 15:00:20 -04:00
Stephen Kelly dede273193 target_link_libraries: Allow repeated use of LINK_{PRIVATE,PUBLIC} keywords.
This has not been allowed since they were introduced in
commit 91438222 (target_link_libraries: Add LINK_(PUBLIC|PRIVATE)
options, 2011-10-07), but allowing this form makes it more compatible
with the newer PUBLIC and PRIVATE keywords.
2013-10-17 17:37:20 +02:00
Brad King daa0f6f98d Add Lua-style long brackets and long comments to CMake language
Teach the CMake language parser to recognize Lua-style "long bracket"
arguments.  These start with two '[' separated by zero or more '='
characters e.g. "[[" or "[=[" or "[==[".  They end with two ']'
separated by the same number of '=' as the opening bracket.  There is no
nesting of brackets of the same level (number of '=').  No escapes,
variable expansion, or other processing is performed on the content
between such brackets so they always represent exactly one argument.

Also teach CMake to parse and ignore "long comment" syntax.  A long
comment starts with "#" immediately followed by an opening long bracket.
It ends at the matching close long bracket.

Teach the RunCMake.Syntax test to cover long bracket and long comment
cases.
2013-10-17 09:07:00 -04:00
Brad King a8c652342f cmListFileLexer: Convert CRLF -> LF newlines explicitly
Read input files in binary mode instead of text mode and convert CRLF
newlines to LF newlines explicitly in our own buffer.  This is necessary
to read CMake source files with CRLF newlines on platforms whose C
runtime libraries do not transform newlines in text mode.  For example,
a Cygwin or Linux binary may not transform CRLF -> LF in files read from
a Windows filesystem.  Perform the conversion ourselves to ensure that
multi-line string literals in CMake source files have LF newlines
everywhere.
2013-10-17 09:07:00 -04:00
Brad King dbd933365e cmListFileLexer: Allow a leading UTF-8 Byte-Order-Mark (#11137)
Teach the lexer to read a UTF-8, UTF-16 BE/LE, or UTF-32 BE/LE
Byte-Order-Mark from the start of a file if any is present.  Report an
error on files using UTF-16 or UTF-32 and accept a UTF-8 or missing BOM.
2013-10-17 09:06:59 -04:00
Brad King 56457837e2 cmListFileLexer: Allow command names with one letter (#14181)
Teach the lexer to treat a single letter as an identifier instead of an
unquoted argument.  Outside of a command invocation, the parser treats
an identifier as a command name and an unquoted argument as an error.
Inside of a command invocation, the parser treats an identifier as an
unquoted argument.  Therefore this change to the lexer will make what
was previously an error case work with no other behavioral change.
2013-10-17 09:06:59 -04:00
Brad King 8f2b0c3307 Merge topic 'help-manual-cleanup'
9b212ad Make --help-* options available from all command-line tools
5dde65a Help: De-duplicate manual/(cmake|ccmake).1.rst build options
ae944d1 Help: Organize manual/*.1.rst sections
4f7d708 Help: Drop leftover conversion content from manual/*.1.rst
2013-10-17 08:57:45 -04:00
Brad King d4c3de2f15 cmake: Simplify -E command line processing
Check for "cmake -E ..." up front (along with "cmake --build ...") and
skip normal command line processing.  Drop the special handling for -E
from the normal processing to simplify things.  Strictly speaking, it
was previously possible to invoke command mode with -E anywhere in the
command line e.g. "cmake echo -E message" or "cmake echo message -E",
but no one should be using it as it was not documented and looks
strange.
2013-10-17 08:56:50 -04:00
Kitware Robot ca498f0192 CMake Nightly Date Stamp 2013-10-17 00:01:07 -04:00
Brad King 9b212ad01a Make --help-* options available from all command-line tools
Make the standard --help-* options available from all command-line
tools.  Drop options that are no longer supported:

  --copyright, --help-full, --help-html, --help-man,
  --help-compatcommands, --help-custom-modules

De-duplicate Help/manual/*.1.rst help options by using an
OPTIONS_HELP.txt file included from each manual.
2013-10-16 16:24:51 -04:00
Brad King c54fb6fede Merge topic 'update-kwsys'
0408415 Merge branch 'upstream-kwsys' into update-kwsys
c01e744 KWSys 2013-10-15 (6eab64c3)
2013-10-16 10:45:40 -04:00
Brad King dba4962b86 Makefile: Always create clean target command
Borland Make complains if the phony clean target has no rule to build it.
If there are no files to clean, generate and run an empty clean script.
2013-10-16 10:43:24 -04:00
Brad King c49083e9a4 Merge topic 'doc-reStructuredText'
7038a93 Modules/readme.txt: Update steps to add module documentation
a77e308 CPack: Replace #<type> markup with reStructuredText equivalent
e7ca48f Help: Factor out cmake-generator-expressions manual page
97e8650 Help: Factor out COMPILE_DEFINITIONS disclaimer duplication
8982161 Help: Factor out find_* command duplication
30b2186 Help: Factor out *_OUTPUT_(NAME|DIRECTORY).rst duplication
bfe07aa Build Help documentation during CMake build using Sphinx
53ded59 Drop unused builtin documentation APIs
0c39a75 Drop the 'Full' field from cmDocumentationEntry
e33d8d2 Drop builtin command documentation
399e9c4 Drop builtin property documentation
6035c04 get_property: Drop test for builtin property documentation
80a3273 Drop all documentation formatters except Usage
b336a1eb Teach COMPATIBLE_INTERFACE_* checks to use Help .rst documents
ec6df36 Teach --help-* options to load documentation from .rst files
25f2877 Add class cmRST to do basic reStructuredText processing
...
2013-10-16 09:28:12 -04:00
Brad King 53ded59515 Drop unused builtin documentation APIs
Now that all DefineProperty documentation calls have been dropped, drop
the supporting APIs.
2013-10-16 09:22:37 -04:00
Brad King 0c39a757da Drop the 'Full' field from cmDocumentationEntry
We need only 'Brief' for usage documentation.  We no longer have builtin
'Full' documentation, which is now in Help/*/*.rst files.
2013-10-16 09:22:37 -04:00
Brad King e33d8d2d77 Drop builtin command documentation
Drop all GetTerseDocumentation and GetFullDocumentation methods from
commands.  The command documentation is now in Help/command/*.rst files.
2013-10-16 09:22:36 -04:00
Brad King 399e9c46d8 Drop builtin property documentation
Drop all DefineProperty calls for non-chained properties.  Drop the
documentation from the chained ones.  The documentation for all
properties is now in Help/prop_*/*.rst files.
2013-10-16 09:22:36 -04:00
Brad King 80a3273b5e Drop all documentation formatters except Usage
We now need only the Usage formatter to support command-line options
that print basic usage, and the supporting indented=>preformatted markup
processor to support CMake message formatting.  Drop all other
documentation formatters and move the remaining code up into the top
cmDocumentationFormatter class.
2013-10-16 09:22:35 -04:00
Brad King b336a1ebe4 Teach COMPATIBLE_INTERFACE_* checks to use Help .rst documents
These checks want to know if named target properties are builtin, which
is now known by checking the Help/prop_tgt directory.  (Previously the
check could be confused by a define_property call in the project.)
2013-10-16 09:22:35 -04:00
Brad King ec6df3675e Teach --help-* options to load documentation from .rst files
Install the Help directory next to Modules to make it available in CMake
distributions.  Use cmRST to read Help .rst documents and print them as
help output.

Add options

 --help-manual-list
 --help-manual

to list available manuals or print one of them.  Implement the options

 --help-commands
 --help-modules
 --help-policies
 --help-properties
 --help-variables

by mapping to the corresponding manual page.  Implement the options

 --help-command-list
 --help-module-list
 --help-policy-list
 --help-property-list
 --help-variable-list

by globbing the available Help .rst documents of the corresponding type
and reading their titles.  Implement the options

 --help-command
 --help-module
 --help-policy
 --help-property
 --help-variable

by globbing the matching Help .rst document(s) and printing them.
2013-10-16 09:22:35 -04:00
Brad King 25f2877eef Add class cmRST to do basic reStructuredText processing
Create a cmRST class to perform just enough reStructuredText processing
to support display of Help documents in human-readable text format.
This will be used to implement --help-* command-line options.

Support directives "include", "replace", "parsed-literal", "toctree"
(Sphinx), and "cmake-module" (CMake Sphinx Extension to scan .cmake
modules).  Support inline CMake Sphinx Domain roles to convert
cross-references to corresponding title text.  Support inline
substitutions defined by the "replace" directive, but keep it simple by
requiring replacements to be defined before use.

Add a CMakeLib "testRST" case to cover processing of supported
constructs and compare results against expected output.
2013-10-16 09:22:35 -04:00
Kitware Robot 5029da5eac CMake Nightly Date Stamp 2013-10-16 00:01:08 -04:00
Brad King 87cc62cab9 Drop "full" documentation output types
We will no longer support full documentation generation from executables
and will instead generate documentation with other tools.  Disable (with
a warning left behind) the command-line options:

 --copyright
 --help-compatcommands
 --help-full
 --help-html
 --help-man

Drop supporting code.  Drop manual sections generation from executables.
Remove internal documentation construction APIs.  Drop unused sections
See Also, Author, Copyright, Compat Commands, Custom Modules.
2013-10-15 14:12:49 -04:00
Brad King f85405f551 Add reStructuredText (RST) documentation formatter
Temporarily add a RST formatter to convert builtin documentation to .rst
source files.  This will be removed shortly after we use it to convert
documentation.

Teach the RST formatter to:

* Output preformatted blocks as reStructuredText "::" literal blocks.

* Output option lists as bullet lists with option names enclosed in
  reStructuredText ``literal`` quoting.

* Output individual documentation objects (commands, variables, etc.)
  in separate .rst files organized in directories by type.

Replace references to cmVersion::GetCMakeVersion() in builtin
documentation with the literal placeholder "|release|" that will be
defined as a substitution later.
2013-10-15 10:47:39 -04:00
Brad King 0d0fec1524 Drop CPack module documentation markup extraction
This will be replaced by alternative markup later.
2013-10-15 10:47:39 -04:00
Brad King 946f0efb7c Drop definition of internal property
The property __CMAKE_DELETE_CACHE_CHANGE_VARS_ is not meant for public
exposure.
2013-10-15 10:47:39 -04:00
Brad King 277bd1db98 Drop CMAKE_STRICT mode
With our modern development workflow it is less likely a property will
be added to C++ code without documentation.  This mode only existed to
support the DocTest which had very limited coverage of the properties
anyway.
2013-10-15 10:47:38 -04:00
Brad King 07b80021aa cmDocumentation: Drop version output from usage and text help
Drop the "cmake version ..." line from the top of usage and text help
formats.  Print it only when requested with --version or similar option.
2013-10-15 10:46:54 -04:00
Brad King 6e68bc2273 cmake: Add --help-policy-list option
All the other --help-<item> options have a corresponding option
--help-<item>-list.  Add one for --help-policy.
2013-10-15 10:46:54 -04:00
Brad King c9a5f34bd7 Cleanup use of CMake version in install destinations
Factor the CMAKE_DATA_DIR, CMAKE_DOC_DIR, and CMAKE_MAN_DIR selection
out of CMakeLists.txt and into a Source/CMakeInstallDestinations.cmake
script.  Load the script from the original location of the code.

Cache the destination values as empty strings so we know if the user
sets them explicitly.  If not, then compute defaults based on the
platform and full CMake version string.  By not caching the versioned
defaults, we can change them in a single build tree as the version
changes.

Remove duplication of the install destination defaults from the
bootstrap script.  Cache empty defaults there too.  Parse from the CMake
code the default values to report in the help output.  Keep the CMake
code in a structured format to make this reliable.
2013-10-15 10:46:54 -04:00
Brad King c72f8513f7 Factor CMake version logic into dedicated module
Move logic to compute CMake_VERSION out of the top-level CMakeLists.txt
file to a dedicated Source/CMakeVersionCompute.cmake module and include
it from the original location.  This will allow it to be re-used.
2013-10-15 10:46:53 -04:00
Brad King cb51088f75 Merge topic 'doc-list-append-nothing'
eec7834 list: Fix docs for APPEND to show that elements are optional
2013-10-15 09:33:28 -04:00
Brad King 69fd12583c Merge topic 'wix-extra-sources'
2e6cadd CPackWiX: allow user supplied extra sources, objects and libraries
2013-10-15 09:33:22 -04:00
Brad King cd36929c27 Merge topic 'wix-deterministic-ids'
3a4a748 CPackWiX: generate deterministic ids for directories, components and files
2013-10-15 09:33:15 -04:00
Brad King b31ca93ba2 Merge topic 'target-LOCATION-policy'
e4e5b28 cmTarget: Deprecate the LOCATION target property with a policy.
2013-10-15 09:33:05 -04:00
Brad King 34f66ae21b Merge topic 'deprecate-COMPILE_FLAGS'
3507d5a Deprecate COMPILE_FLAGS target property.
2013-10-15 09:32:48 -04:00
Brad King 06491955eb Merge topic 'export-at-generate-time'
a4263c9 export(): Handle multiple dependent export sets.
66b290e export(): Process the export() command at generate time.
5fe5c32 export(): Set a Makefile on the cmExportBuildFileGenerator.
e383555 cmExportInstallFileGenerator: Fix comment to match reality.
2013-10-15 09:32:36 -04:00
Brad King ebffbda447 Merge topic 'fix-CMP0024-multiple-directories'
af1f698 CMP0024: Store the fact of included export in global generator.
2013-10-15 09:32:32 -04:00
Brad King 08dc9720ef Merge topic 'osx-framework-search-flag'
2e13c36 OS X: Encode -F framework search flag in per-language platform variable
2013-10-15 09:32:03 -04:00
Brad King 0408415bdd Merge branch 'upstream-kwsys' into update-kwsys 2013-10-15 09:04:01 -04:00
Kitware Robot bedb7bc526 CMake Nightly Date Stamp 2013-10-15 00:01:08 -04:00
Роман Донченко eec7834ed8 list: Fix docs for APPEND to show that elements are optional
list(APPEND) has been able to append nothing since commit a06dcdba
(Allow LIST(APPEND) command to append nothing, 2008-01-16) but the
documentation still used to imply that at least one argument is
required.
2013-10-14 11:16:59 -04:00
Kitware Robot d37c934f17 CMake Nightly Date Stamp 2013-10-14 00:01:05 -04:00
Nils Gladitz 2e6cadde13 CPackWiX: allow user supplied extra sources, objects and libraries 2013-10-13 13:16:54 +02:00
Kitware Robot de94782bc5 CMake Nightly Date Stamp 2013-10-13 00:01:06 -04:00
Nils Gladitz 3a4a74828c CPackWiX: generate deterministic ids for directories, components and files 2013-10-12 10:41:05 +02:00
Kitware Robot dca43862f1 CMake Nightly Date Stamp 2013-10-12 00:01:07 -04:00
Stephen Kelly e4e5b28c27 cmTarget: Deprecate the LOCATION target property with a policy.
The final location and name of a build-target is not determined
until generate-time. However, reading the LOCATION property from
a target is currently allowed at configure time. Apart from creating
possibly-erroneous results, this has an impact on the implementation
of cmake itself, and prevents some major cleanups from being made.

Disallow reading LOCATION from build-targets with a policy. Port some
existing uses of it in CMake itself to use the TARGET_FILE generator
expression.
2013-10-11 21:17:27 +02:00
Stephen Kelly 3507d5afdd Deprecate COMPILE_FLAGS target property.
It is succeeded by COMPILE_OPTIONS, which supports generator
expressions, is a list rather than a string, and is properly
escaped.
2013-10-11 13:40:29 +02:00
Stephen Kelly a4263c9f64 export(): Handle multiple dependent export sets.
The export-sets topic, merged in commit 49c7b649 (Merge topic
'export-sets', 2012-10-01) changed install(EXPORT) to allow
exporting targets whose dependents are exported separately
to different locations. Doing the same for export() was not
possible because the export() command was executed at
configure-time.

Now that export() is also executed at generate-time, make it
possible to export to multiple dependent export sets.
2013-10-11 12:46:10 +02:00
Stephen Kelly 66b290e7e2 export(): Process the export() command at generate time.
Make the API for adding targets string based so that it can easily
use cmGeneratorTarget.

Teach the cmIncludeCommand to generate the exported file at
configure-time instead if it is to be include()d.

The RunCMake.ExportWithoutLanguage test now needs a dummy header.h
file as expected error from export() is now reported after the
missing file error.
2013-10-11 12:46:10 +02:00
Kitware Robot 2a96e374fc CMake Nightly Date Stamp 2013-10-11 00:01:06 -04:00
Stephen Kelly 5fe5c32480 export(): Set a Makefile on the cmExportBuildFileGenerator.
This is better than the cmCommand, because the lifetime of that is
not as useful, and it is only used to report an error anyway.

In the next commit, the cmExportBuildFileGenerator will outlive the
cmCommand.
2013-10-10 16:36:26 +02:00
Brad King 2e13c36211 OS X: Encode -F framework search flag in per-language platform variable
Compilers for languages other than C and C++ on OS X may not understand
the -F framework search flag.  Create a new platform information
variable CMAKE_<LANG>_FRAMEWORK_SEARCH_FLAG to hold the flag, and set it
for C and CXX lanugages in the Platform/Darwin module.

Reported-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2013-10-10 08:33:25 -04:00
Stephen Kelly e383555838 cmExportInstallFileGenerator: Fix comment to match reality.
It was copied from cmExportBuildFileGenerator.
2013-10-10 12:02:32 +02:00
Stephen Kelly af1f698757 CMP0024: Store the fact of included export in global generator.
Storing it in the makefile means that the policy does not trigger
when include and export are in differing directories.
2013-10-10 12:01:39 +02:00
Kitware Robot 872db622d6 CMake Nightly Date Stamp 2013-10-10 00:01:11 -04:00
Brad King 5925e34107 Merge topic 'osx-cmake-app-info-plist'
dcf1b64 OS X: Set CMake.app bundle Info.plist fields (#11694)
2013-10-09 10:24:34 -04:00
Brad King be9d289fce Merge topic 'deprecation-message'
f973737 GenerateExportHeader: Port to use message(DEPRECATION)
f69606d Qt4Macros: Port to use message(DEPRECATION)
509c142 message: Add a DEPRECATION mode
2013-10-09 10:24:16 -04:00
Brad King e81b6742f7 Merge topic 'haiku-updates'
54ef2be Haiku: Include files cleanup in cmCTest
38d5555 Haiku: Remove outdated preprocessor checks
1dc61f8 Haiku: Remove use of B_COMMON_DIRECTORY
7ebc1cb Haiku: Several fixes to platform module
2013-10-09 10:23:04 -04:00
Brad King 7ed7d75a04 Merge topic 'update-kwsys'
f59693b Merge branch 'upstream-kwsys' into update-kwsys
1a39f85 KWSys 2013-10-08 (96b2f6f4)
2013-10-09 10:22:37 -04:00
Brad King 8424d569f0 Merge topic 'unset-PARENT_SCOPE'
261c248 unset: Add PARENT_SCOPE option
2013-10-09 10:22:10 -04:00
Brad King 12a7e2b10c Merge topic 'apple-clang-id'
1763c31 Set policy CMP0025 to NEW while building CMake itself
aa53ee5 Add policy CMP0025 for Apple Clang compiler id compatibility
ab65862 Clang: Add separate "AppleClang" compiler id
2013-10-09 10:21:28 -04:00
Kitware Robot 7f268c243f CMake Nightly Date Stamp 2013-10-09 00:01:16 -04:00
Brad King dcf1b64569 OS X: Set CMake.app bundle Info.plist fields (#11694)
Use the Apple Info.plist reference documentation:

 Core Foundation Keys
 https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html

 Launch Services Keys
 https://developer.apple.com/library/mac/documentation/general/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html

 Cocoa Keys
 https://developer.apple.com/library/mac/documentation/general/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html

modify the Info.plist we create for cmake-gui to add/set fields

 CFBundleShortVersionString = The release-version-number string
 LSApplicationCategoryType  = UTI that categorizes the app for the App Store
 NSHumanReadableCopyright   = Specifies the copyright notice

and drop fields

 CFBundleGetInfoString
 CFBundleLongVersionString
 LSRequiresCarbon

Also prepare to set

 CFBundleVersion            = The build-version-number string

but leave it commented out as TBD (To Be Determined) for now.

The version fields must have form <major>.<minor>.<patch> with integer
components.  While at it, rename the bundle to end in ".<patch>" instead
of "-<patch>" so that it is consistent with the version number and does
not look like a packaging increment suffix.
2013-10-08 12:32:28 -04:00
Stephen Kelly 509c142a3f message: Add a DEPRECATION mode
By default, the message is not issued. If CMAKE_ERROR_DEPRECATED
is on, the message is fatal. If CMAKE_WARN_DEPRECATED is on, the
message is a warning.
2013-10-08 18:11:22 +02:00
Brad King 40c84683aa Merge topic 'export-policy'
904ff9f export: Add policy CMP0024 to disallow include() of export files
2013-10-08 10:59:07 -04:00
Brad King 5a6c15155c Merge topic 'clang-cl-compiler'
3d8356d Clang: Support Windows variants for GNU and MSVC (#13035, #14458)
51ab85c CMakeDetermineCompilerId: Add notion of "simulated" id/version
be10826 CMakeDetermineCompilerId: Fix local var init
2013-10-08 10:58:56 -04:00
Brad King f8241136b4 Merge topic 'INTERFACE_LIBRARY-target-type'
ce0c303 install: Teach EXPORT option to handle INTERFACE_LIBRARY targets
435c912 export: Add support for INTERFACE_LIBRARY targets
fe73226 Add the INTERFACE_LIBRARY target type.
2013-10-08 10:58:40 -04:00
Adrien Destugues 54ef2bea37 Haiku: Include files cleanup in cmCTest
* No need to use a different path from the BeOS one, which still works.

Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-08 09:56:16 -04:00
Adrien Destugues 1dc61f8142 Haiku: Remove use of B_COMMON_DIRECTORY
The common directory was removed in Haiku. Applications are now
installed in the system directory.

Applied-by: Rolf Eike Beer <eike@sf-mail.de>
2013-10-08 09:55:38 -04:00
Brad King 2ba45f5285 Merge topic 'Add-coverage.py-Coverage'
d0ec3a0 Adding support for the Python coverage.py tool.
2013-10-08 09:53:25 -04:00
Brad King 5bf7102505 Merge topic 'ctest_rerun_failed'
eb2decc ctest: Add --rerun-failed option
2013-10-08 09:53:17 -04:00
Brad King f59693b971 Merge branch 'upstream-kwsys' into update-kwsys 2013-10-08 09:53:13 -04:00
Brad King 5a364d8ed5 Merge topic 'clang-warnings'
af0051f curl, bzip2: Suppress warnings by setting initial value
cb4ec60 cmDocumentation: Fix a few doxygen comment errors
d915819 cm*Lexer: Populate empty doxygen @param comment
97124f9 cmTarget: Properly escape @ char in doxygen comments
8e96353 Fix warnings about \brief usage
d993032 cmGraphVizWriter: Add extra space in comment to suppress warning
6cea3ee cmNewLineStyle: Remove useless semi-colon
7e7a1c0 curl: Fix typo in header include guard
2013-10-08 09:53:13 -04:00
Patrick Reynolds d0ec3a01a6 Adding support for the Python coverage.py tool.
This assumes that coverage.py has been run in such a way to produce its
standard XML output. This uses the Cobertura schema and should be somewhat
generalizable.
2013-10-08 09:20:30 -04:00
Zack Galbreath eb2decc02d ctest: Add --rerun-failed option
Add a new command line argument to ctest.  This allows users to
rerun tests that failed during the previous call to ctest.  This
is accomplished by analyzing the most recently modified file named
"^LastTestsFailed*" in the Testing/Temporary subdirectory of the
project's binary directory.
2013-10-08 09:18:13 -04:00
Sean McBride cb4ec606a9 cmDocumentation: Fix a few doxygen comment errors
Warned by clang -Wdocumentation
2013-10-08 09:16:32 -04:00
Sean McBride d915819ad1 cm*Lexer: Populate empty doxygen @param comment
And in one case fixed wrong param name.
Warned by clang -Wdocumentation.
2013-10-08 09:16:32 -04:00
Sean McBride 97124f91a5 cmTarget: Properly escape @ char in doxygen comments
Found by clang's -Wdocumentation.
2013-10-08 09:16:32 -04:00
Sean McBride 8e96353fd8 Fix warnings about \brief usage
A doxygen \brief is ended with a newline, so remove a newline right
after \brief to fix clang -Wdocumentation warning.
2013-10-08 09:16:32 -04:00
Sean McBride d993032209 cmGraphVizWriter: Add extra space in comment to suppress warning
Clang's -Wdocumentation thought it was malformed doxygen.
2013-10-08 09:16:31 -04:00
Sean McBride 6cea3eeb4b cmNewLineStyle: Remove useless semi-colon
Warned by clang.
2013-10-08 09:16:31 -04:00
Brad King 261c248254 unset: Add PARENT_SCOPE option
Add an unset() command option to remove a variable from the calling
scope, just like the set() command's PARENT_SCOPE option.  Teach the
Unset test to cover such cases.
2013-10-08 08:37:50 -04:00
Kitware Robot cfb2c66f66 CMake Nightly Date Stamp 2013-10-08 00:01:08 -04:00
Brad King 1763c31c3b Set policy CMP0025 to NEW while building CMake itself
CMake is aware of the policy's NEW behavior and the AppleClang compiler
id.  Set the policy to NEW explicitly to avoid the warning and get the
NEW behavior.

Also teach the RunCMake test infrastructure to build tests with
-DCMAKE_POLICY_DEFAULT_CMP0025=NEW to avoid the policy warning
in test output that must match specific regular expressions.
2013-10-07 20:12:46 -04:00
Brad King aa53ee57bb Add policy CMP0025 for Apple Clang compiler id compatibility
The parent commit introduced a separate "AppleClang" compiler id for
Apple's Clang distribution.  Add a policy in order to support projects
that expect this compiler's id to be just "Clang".  When the policy is
OLD or not set, map AppleClang back to Clang.  Continue to use the
AppleClang id internally while enabling the language, but set the
CMAKE_<LANG>_COMPILER_ID after project() or enable_language() to the
compatible value for use by project code.
2013-10-07 20:12:46 -04:00
Brad King ab65862417 Clang: Add separate "AppleClang" compiler id
Apple distributes their own Clang build with their own version numbers
that differ from upstream Clang.  Use the __apple_build_version__ symbol
to identify the Apple Clang compiler and report the Apple Build Version
as the fourth version component in CMAKE_<LANG>_COMPILER_VERSION.  Add
Compiler/AppleClang-<lang> and Platform/Darwin-AppleClang-<lang> modules
that simply include the upstream equivalents.

Fix comparisons of CMAKE_<LANG>_COMPILER_ID to Clang in CMake's own
source and tests to account for AppleClang.
2013-10-07 20:12:46 -04:00
Stephen Kelly ce0c303d62 install: Teach EXPORT option to handle INTERFACE_LIBRARY targets 2013-10-07 20:07:27 -04:00
Stephen Kelly 435c912848 export: Add support for INTERFACE_LIBRARY targets 2013-10-07 20:07:27 -04:00
Stephen Kelly 904ff9fe59 export: Add policy CMP0024 to disallow include() of export files
Currently, export() is executed at configure-time.

One problem with this is that certain exported properties like
the link interface may not be complete at the point the export() is
encountered leading to an incorrect or incomplete exported
representation. Additionally, the generated IMPORTED_LOCATION
property may even be incorrect if commands following the export()
have an effect on it.

Another problem is that it requires the C++ implementation of cmake
to be capable of computing the exported information at configure time.
This is a limitation on the cleanup and maintenance of the code. At
some point in the future, this limitation will be dropped and more
implementation will be moved from cmTarget to cmGeneratorTarget.
2013-10-07 19:57:06 -04:00
Stephen Kelly fe732264e9 Add the INTERFACE_LIBRARY target type.
This target type only contains INTERFACE_* properties, so it can be
used as a structural node. The target-specific commands enforce
that they may only be used with the INTERFACE keyword when used
with INTERFACE_LIBRARY targets. The old-style target properties
matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for
this target type.

The name of the INTERFACE_LIBRARY must match a validity generator
expression. The validity is similar to that of an ALIAS target,
but with the additional restriction that it may not contain
double colons. Double colons will carry the meaning of IMPORTED
or ALIAS targets in CMake 2.8.13.

An ALIAS target may be created for an INTERFACE library.

At this point it can not be exported and does not appear in the
buildsystem and project files are not created for them. That may
be added as a feature in a later commit.

The generators need some changes to handle the INTERFACE_LIBRARY
targets returned by cmComputeLinkInterface::GetItems. The Ninja
generator does not use that API, so it doesn't require changes
related to that.
2013-10-07 19:56:31 -04:00
Brad King 1d9af198a8 Merge topic 'split-cmake-E'
c04995b cmake: Split -E command implementation into separate source file
2013-10-07 15:45:15 -04:00
Brad King 4e1368c1a0 Merge topic 'IMPORTED-target-SYSTEM-includes'
a63fcbc Always consider includes from IMPORTED targets to be SYSTEM.
2013-10-07 15:45:05 -04:00
Brad King b38425fa4b Merge topic 'private-link-depends-are-package-private'
0ad2a1c Export: Never treat private link libraries as public package dependencies.
2013-10-07 15:44:59 -04:00
Brad King c7384a053e Merge topic 'fixDocumentationComment'
e507bf2 CPack: Fix clang -Wdocumentation warnings
2013-10-07 15:44:54 -04:00
Brad King fe0477c2bf Merge topic 'add_cache_options_to_ccmake'
fadffab ccmake: Teach dialog to support cache STRINGS property
2013-10-07 15:44:48 -04:00
Brad King 3e2e060999 Merge topic 'generate-modern-style'
027a020 Merge branch 'test-property-genex' into generate-modern-style
33055c4 Generate modern-style cmake code.
2013-10-07 15:44:33 -04:00
Brad King 9939c99bc6 Merge topic 'test-property-genex'
6a47c37 add_test: Mention generator expressions in old-style add_test docs
d331292 cmTestGenerator: Evaluate generator expressions in test properties
6fe5c4a cmTestGenerator: Separate test properties for each configuration
2013-10-07 15:44:23 -04:00
Brad King b53a71bb1b Merge topic 'doc-add_dependencies-direction'
1bdac7d add_dependencies: Clarify direction of dependency in docs (#14424)
2013-10-07 15:44:19 -04:00
Brad King 55af4ba26f Merge topic 'cmListFileLexer-fix-leak-on-error'
ad3d5c5 cmListFileLexer: Fix leak on error before EOF
2013-10-07 15:43:59 -04:00
Brad King e00089388c Merge topic 'cleanup-properties'
b78bc33 Cleanup some variable documentation names
bbfff52 Remove redundant cmake::GetIsPropertyDefined method
2013-10-07 15:43:55 -04:00
Brad King ca2c627b39 Merge topic 'mark_as_advanced'
8cff5e4 mark_as_advanced: improve documentation syntax
2013-10-07 15:43:51 -04:00
Brad King 2e7ba290a5 Merge topic 'minor_cleanup'
6931999 VS6: Add some delimiting between error message and content.
d1a5f12 cmTarget: Fix typo in comment.
961c0ba Fix comments to match the code.
7cca50c Remove unused include.
2013-10-07 15:43:23 -04:00
Brad King 6955d7bea6 Merge topic 'cmake-gui-window-settings'
81ea363 cmake-gui: save and restore the geometry and window state between sessions.
2013-10-07 15:43:09 -04:00
Brad King 31e6ee502e Merge topic 'authorative-LINK_LIBRARIES'
f01dc72 Use one authorative source of the LINK_LIBRARIES property.
2013-10-07 15:42:55 -04:00
Brad King 5f9de609dd Merge topic 'rename-genex-method'
cfae430 Genex: Rename cmGeneratorExpression::NeedsParsing to NeedsEvaluation
2013-10-07 15:42:17 -04:00
Brad King b61960564a Merge topic 'graphviz-at-generate-time'
6cf5564 Generate graphviz files at generate time, not configure time.
2013-10-07 15:42:13 -04:00
Brad King d673e1f38f Merge topic 'fix-style'
5916645 Fix some indentation problems in cmPolicies.
2013-10-07 15:41:54 -04:00
Brad King 1e54b380cb Merge topic 'MAP_IMPORTED_CONFIG-property-default'
fb1294c cmTarget: Add initializer for MAP_IMPORTED_CONFIG_<CONFIG>
2013-10-07 15:41:49 -04:00
Brad King a65df441f2 Merge topic 'vs-no-regen-external-msproject'
e478f03 VS: Fix CMAKE_SUPPRESS_REGENERATION bad ZERO_CHECK dependency (#14378)
2013-10-07 15:41:44 -04:00
Brad King 058af7a6ce Merge topic 'PLATFORM_ID-genex'
dcc00ec Genex: Add the PLATFORM_ID expression.
2013-10-07 15:41:39 -04:00
Brad King ea3bb7ed9a Merge topic 'automoc-gadget'
d4937da Search for the Q_GADGET macro for running automoc too.
2013-10-07 15:41:33 -04:00
Brad King f4acef500b Merge topic 'ADDITIONAL_MAKE_CLEAN_FILES-genex'
d26594f Genex: Evaluate genexes for additional make clean files.
2013-10-07 15:41:29 -04:00
Brad King f7558c5447 Merge topic 'fix-reset-compiler'
8b2a2db Fix resetting the compiler on the command line (#14366).
2013-10-07 15:41:24 -04:00
Brad King 0f32faafdb Merge topic 'remove-local-typedef'
2a7fecc remove unused local typedef
2013-10-07 15:41:12 -04:00
Brad King d4134352ab Begin post-2.8.12 development 2013-10-07 15:24:20 -04:00
Bill Hoffman fadffab538 ccmake: Teach dialog to support cache STRINGS property
This commit adds the ability to ccmake of cycling through cache options.
This uses the STRINGS property of the cache entry. The enter key will cycle
forward, and the right and left arrows will go up and down in the list.
2013-10-07 14:17:54 -04:00
Brad King ffff99c58e CMake 2.8.12 2013-10-07 08:28:26 -04:00
Brad King c515dc5748 Merge topic 'fix-install-include-dirs-processing'
6f98f4a Genex: Fix processing multiple include directories for relative paths
2013-10-07 08:26:46 -04:00
Brad King 431eaf3783 Merge branch 'release' 2013-10-07 08:26:01 -04:00
Stephen Kelly 6f98f4ac92 Genex: Fix processing multiple include directories for relative paths
Re-insert the semicolon which was removed during splitting.

Commit d777b8e7 (Genex: Allow relative paths in INSTALL_INTERFACE.,
2013-07-25) introduced the prefixItems method to allow relative paths
in the argument of the INSTALL_INTERFACE expression. That method was
buggy in that it did not re-introduce the semicolon separator in
the result.

This bug also affects paths which are already absolute in user code.
2013-10-07 08:17:12 -04:00
Kitware Robot d85b06602a CMake Nightly Date Stamp 2013-10-07 00:01:10 -04:00
Kitware Robot 5b98d09e80 CMake Nightly Date Stamp 2013-10-06 00:01:10 -04:00
Kitware Robot dc92741d03 CMake Nightly Date Stamp 2013-10-05 00:01:06 -04:00
Brad King 51ab85c398 CMakeDetermineCompilerId: Add notion of "simulated" id/version
Some compilers try to simulate other compilers as a drop-in replacement
supporting all the same command-line options and predefined preprocessor
macros.  In such cases it will be useful to have CMake load the compiler
information files for the simulated compiler instead of duplicating the
information.  Teach CMakeDetermineCompilerId to extract the simulated
compiler id and version when the compiler id detection provides it.
2013-10-04 13:25:06 -04:00
Kitware Robot e20edcdb3d CMake Nightly Date Stamp 2013-10-04 00:01:07 -04:00
Brad King c04995b46e cmake: Split -E command implementation into separate source file
Move the cmake::ExecuteCMakeCommand static method and all the static
methods it calls out of the 'cmake' class to a separate 'cmcmd' class.
Build the latter as part of the main cmake executable with cmakemain.cxx
and not in CMakeLib.  Drop unused header includes from "cmake.cxx".

By moving this implementation out of cmake.cxx we avoid carrying it
around in all the executables that use class 'cmake'.  It is needed only
for the main "cmake -E" functionality.
2013-10-03 17:30:28 -04:00
Brad King e27523a834 Merge topic 'xcode-5'
a3194ff Xcode: Fix OBJECT library support for Xcode 5 (#14254)
dff8d11 Xcode: Drop XCODE_DEPEND_HELPER for Xcode >= 5
1180322 Xcode: Teach Tests/BuildDepends to allow LINK_DEPENDS_NO_SHARED failure
765b46d Xcode: Fix test architecture selection for Xcode >= 5
2013-10-03 08:17:43 -04:00
Kitware Robot a9a48ff9f4 CMake Nightly Date Stamp 2013-10-03 00:01:05 -04:00
Brad King a3194ff4a7 Xcode: Fix OBJECT library support for Xcode 5 (#14254)
Xcode 2.1 through 4 supported $(CURRENT_ARCH) in a PBXFileReference
'path' value used in the "Link Binary with Libraries" build phase.
CMake uses this to reference object file locations on link lines to
bring in OBJECT library content.  However, Xcode 5 now evaluates the
$(CURRENT_ARCH) reference in this context as "undefined_arch" so the
wrong path is given to the linker.  There seems to be no alternative way
to produce an architecture-specific value in a PBXFileReference.

Fortunately Xcode 5 now also handles link dependencies for paths linked
through OTHER_LDFLAGS.  For Xcode >= 5, move the OBJECT library object
file references from the link build phase to OTHER_LDFLAGS.  We can
still show the object files in the source group listing in either case.
2013-10-02 13:03:21 -04:00
Brad King dff8d113b4 Xcode: Drop XCODE_DEPEND_HELPER for Xcode >= 5
Xcode 5.0 now computes dependencies from files linked through
OTHER_LDFLAGS, so we no longer need the XCODE_DEPEND_HELPER hack to
re-link dependents when targets change.
2013-10-02 12:49:09 -04:00
Kitware Robot c0133a58e8 CMake Nightly Date Stamp 2013-10-02 00:01:07 -04:00
Brad King c33a38fe22 CMake 2.8.12-rc4 2013-10-01 08:05:44 -04:00
Brad King e02e56c4a6 Merge topic 'fix-duplicate-custom-commands'
dccd494 Use first custom command for the same output (#14446)
2013-10-01 08:05:17 -04:00
Brad King 204a54774c Merge branch 'release' 2013-10-01 08:03:41 -04:00
Kitware Robot fa97f43c81 CMake Nightly Date Stamp 2013-10-01 00:01:06 -04:00
Brad King dccd4949c0 Use first custom command for the same output (#14446)
In buggy code like

 add_custom_command(
   OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/out.h
   MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/out.h.in
   ...)
 add_custom_command(
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/out.h
   ...)

that has more than one rule to generate the same output CMake has always
used the first rule.  However, since commit 2268c41a (Optimize custom
command full-path dependency lookup, 2013-08-06) we update the map from
output to cmSourceFile for every rule generating an output, effectively
keeping the last command instead of the first.

Fix this regression by checking for each map update if the output
already has an entry.  If so, keep only the original entry.  The VS 8
generator triggers this with a special case for generate.stamp rules
that differ between ZERO_CHECK and normal targets, so do not warn for
now.  Leave a TODO comment for warning in the future.
2013-09-30 15:03:00 -04:00
Kitware Robot 6a3958b374 CMake Nightly Date Stamp 2013-09-30 00:01:04 -04:00
Kitware Robot 6f74212360 CMake Nightly Date Stamp 2013-09-29 00:01:07 -04:00
Kitware Robot 1bf010ae98 CMake Nightly Date Stamp 2013-09-28 00:01:10 -04:00
Kitware Robot 6ed8504ea5 CMake Nightly Date Stamp 2013-09-27 00:01:08 -04:00
Kitware Robot b89cedd112 CMake Nightly Date Stamp 2013-09-26 00:01:16 -04:00
Kitware Robot 5f8eefa301 CMake Nightly Date Stamp 2013-09-25 00:01:11 -04:00
Stephen Kelly a63fcbcb9f Always consider includes from IMPORTED targets to be SYSTEM.
Introduce a target property to control this behavior variable
to set the default value for the target property.

This does not affect try_compile runs.
2013-09-24 20:00:31 +02:00
Stephen Kelly 0ad2a1c181 Export: Never treat private link libraries as public package dependencies.
Multiple libraries in a single buildsystem can be exported to multiple
export-sets.

If a library from one export set depends on a library from
another export set, the export logic generates a check in the targets
file to verify that the target in the other export set is found. That
check is executed at downstream-find_package-time.

However, a target may depend privately on a target in another export
set. In that case, the depend used to also be listed in the required
targets in the targets file. Change the export logic to ignore the
private link entries instead.
2013-09-24 15:06:56 +02:00
Eric NOULARD e507bf28c2 CPack: Fix clang -Wdocumentation warnings 2013-09-24 14:29:24 +02:00
Kitware Robot e5538f323e CMake Nightly Date Stamp 2013-09-24 00:01:07 -04:00
Kitware Robot 475635ec0f CMake Nightly Date Stamp 2013-09-23 00:01:05 -04:00
Kitware Robot fe5e193020 CMake Nightly Date Stamp 2013-09-22 00:01:06 -04:00
Kitware Robot ee6b7a8a18 CMake Nightly Date Stamp 2013-09-21 00:01:05 -04:00
Brad King 027a0201b2 Merge branch 'test-property-genex' into generate-modern-style
Resolve conflict in Source/cmTestGenerator.cxx by taking "their" side
(test-property-genex).  It already accounts for the lower-case change in
"our" side (generate-modern-style).
2013-09-20 08:20:01 -04:00
Ben Boeckel 6a47c37ccf add_test: Mention generator expressions in old-style add_test docs
The old-style add_test() call does not support generator expressions at
all. This also applies to the properties for the test, but it is not
mentioned at all.
2013-09-20 08:18:22 -04:00
Ben Boeckel d331292c12 cmTestGenerator: Evaluate generator expressions in test properties
This is useful for cases like:

  add_test(NAME mytest COMMAND mydriver $<TARGET_FILE:myexe>)
  set_tests_properties(mytest PROPERTIES
    REQUIRED_FILES "$<TARGET_FILE:myexe>"
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>"
    )

In this example we require the actual test executable to exist to
run the test in addition to the test driver at argv[0].  Also the
$<CONFIGURATION> expression improves over \${CTEST_CONFIGURATION_TYPE}
because the latter is not normalized for case-sensitive filesystems.
2013-09-20 08:18:22 -04:00
Brad King 6fe5c4afc0 cmTestGenerator: Separate test properties for each configuration
Move property generation from GenerateScriptConfigs to separate copies
in GenerateOldStyle and GenerateScriptForConfig.  This causes the
per-config tests generated for the add_test(NAME) signature to each get
their own test properties.  This will allow us to later change the
property values based on the test configuration.

While at it, generate lower-case CMake code (e.g. set_tests_properties).

Inspired-by: Ben Boeckel <mathstuf@gmail.com>
2013-09-20 08:18:10 -04:00
Kitware Robot 45b182180c CMake Nightly Date Stamp 2013-09-20 00:01:10 -04:00
Brad King 1bdac7d5a6 add_dependencies: Clarify direction of dependency in docs (#14424)
State explicitly that the dependencies will build before the target.
Drop wording that may imply the opposite.

Suggested-by: Rob Stewart <robert.stewart@sig.com>
2013-09-19 14:10:23 -04:00
Kitware Robot 5e2b499485 CMake Nightly Date Stamp 2013-09-19 00:01:05 -04:00
Kitware Robot 9bcf6adc38 CMake Nightly Date Stamp 2013-09-18 00:01:06 -04:00
Brad King ad3d5c59b3 cmListFileLexer: Fix leak on error before EOF
Teach cmListFileLexerDestroy to call cmListFileLexerSetToken with a NULL
token to free the token string buffer.  Without this, if an error occurs
before the token cleanup happens when EOF is reached, then the token
string buffer may leak.
2013-09-17 10:27:08 -04:00
Brad King b78bc33311 Cleanup some variable documentation names
Remove trailing whitespace after property names.
Remove duplicate CMAKE_<LANG>_LINK_EXECUTABLE definition.
Rename "[Project name]" placeholder to "<PROJECT-NAME>".
2013-09-17 09:10:58 -04:00
Brad King bbfff5233d Remove redundant cmake::GetIsPropertyDefined method
We already have cmake::IsPropertyDefined for the same reason.
2013-09-17 09:10:31 -04:00
Rolf Eike Beer 8cff5e4474 mark_as_advanced: improve documentation syntax
Only one argument is required. Also avoid using the same variable name twice in
the input list and follow the convention used elsewhere for optional arguments.
2013-09-17 08:19:29 +02:00
Kitware Robot abfd574d05 CMake Nightly Date Stamp 2013-09-17 00:01:06 -04:00
Brad King 237aaafe80 Merge topic 'fix-genex-preprocessing-incomplete'
70089d0 genex: Fix preprocessing with incomplete content (#14410).
2013-09-16 08:55:21 -04:00
Kitware Robot c1122e1ecb CMake Nightly Date Stamp 2013-09-16 00:01:06 -04:00
Kitware Robot 3cc8a78403 CMake Nightly Date Stamp 2013-09-15 00:01:05 -04:00
Kitware Robot 396dfafa59 CMake Nightly Date Stamp 2013-09-14 00:01:07 -04:00
Stephen Kelly 70089d0769 genex: Fix preprocessing with incomplete content (#14410).
Similar incomplete generator expressions are already tested
in the GeneratorExpression unit test, but those are executed
with add_custom_target. The generator expressions in the include
directories are run through the preprocessor, whereas the ones
run through add_custom_target are not.
2013-09-13 18:21:37 +02:00
Brad King b434b0510a Merge topic 'print-CMP0022-content-conflict'
271bf10 Fix CMP0022 warning when no old-style property is set
2013-09-13 11:37:53 -04:00
Stephen Kelly 271bf10263 Fix CMP0022 warning when no old-style property is set
The string could be null at this point.
2013-09-13 11:34:08 -04:00
Kitware Robot 1fef29e4c6 CMake Nightly Date Stamp 2013-09-13 00:01:06 -04:00
Stephen Kelly 693199999a VS6: Add some delimiting between error message and content. 2013-09-12 17:04:00 +02:00
Stephen Kelly d1a5f1241d cmTarget: Fix typo in comment.
compatiblity -> compatibility
2013-09-12 16:43:05 +02:00
Brad King 4c4bafdeab Merge topic 'print-CMP0022-content-conflict'
81d2793 Add differing target property content to policy CMP0022 warning
2013-09-12 08:46:44 -04:00
Brad King 00e44b6f0d Merge topic 'vs-intel-version'
cd90a0e VS: Future-proof Intel project format selection
2013-09-12 08:46:30 -04:00
Kitware Robot 85e35a3aed CMake Nightly Date Stamp 2013-09-12 00:01:09 -04:00
Stephen Kelly 81d2793e92 Add differing target property content to policy CMP0022 warning
List the contents of the INTERFACE_LINK_LIBRARIES and the old-style
property.
2013-09-11 22:28:32 +02:00
Stephen Kelly 961c0bae89 Fix comments to match the code. 2013-09-11 15:05:05 +02:00
Stephen Kelly 7cca50cb2f Remove unused include. 2013-09-11 10:07:22 +02:00
Kitware Robot 7c7cdf7073 CMake Nightly Date Stamp 2013-09-11 00:01:05 -04:00
Clinton Stimpson 81ea3637b4 cmake-gui: save and restore the geometry and window state between sessions. 2013-09-10 14:35:11 -06:00
Brad King cd90a0eadd VS: Future-proof Intel project format selection
The version of Intel Fortran that actually uses 9.10 as a project format
is very old.  Default to the latest format version (11.0) and use the
older format only when known to be necessary.

Suggested-by: Dick Munroe <munroe@csworks.com>
2013-09-10 13:44:10 -04:00
Kitware Robot b2ce2f5e48 CMake Nightly Date Stamp 2013-09-10 00:01:10 -04:00
Stephen Kelly f01dc72c58 Use one authorative source of the LINK_LIBRARIES property.
We populate and maintain a vector of structs to keep track of
backtraces already, so no need to populate the Properties container
additionally.

For completeness, it is necessary to remove the condition for
populating the vector for only valid library names and generator
expressions. That condition is now determined when evaluating the
generator expressions.
2013-09-09 21:08:34 +02:00
Robert Maynard 323f0b5acc CMake 2.8.12-rc3 2013-09-09 13:42:48 -04:00
Robert Maynard 03c3fa68ea Merge branch 'release' 2013-09-09 13:41:05 -04:00
Brad King 1e11708a56 Merge topic 'no_track_configured_files'
38571f2 cmMakefile: Do not track CMake temporary files.
2013-09-09 11:01:56 -04:00
Robert Maynard 38571f2c94 cmMakefile: Do not track CMake temporary files.
Since commit ad502502 (cmMakefile: Track configured files so we can
regenerate them, 2013-06-18) cmMakefile::ConfigureFile records the
configured file as an output file generated by CMake.  The intention is
that for make and ninja we can re-run CMake when one of the files it
generates goes missing.  However, files configured temporarily in
CMakeTmp directories by Check* modules do not live past the CMake
invocation.

We have to also track input files to the configure command.  In theory
the input to a configure command could it self be a file that is going
to be deleted later (output from a custom command or configure_file).
2013-09-09 10:58:21 -04:00
Kitware Robot 92cc653979 CMake Nightly Date Stamp 2013-09-09 00:01:03 -04:00
Kitware Robot bbfa1b2bc5 CMake Nightly Date Stamp 2013-09-08 00:01:04 -04:00
Kitware Robot 7d2adde2af CMake Nightly Date Stamp 2013-09-07 00:01:11 -04:00
Kitware Robot 8ff2b5548c CMake Nightly Date Stamp 2013-09-06 00:01:05 -04:00
Kitware Robot e5f6bf587d CMake Nightly Date Stamp 2013-09-05 00:01:12 -04:00
Kitware Robot 0fcdef5e4d CMake Nightly Date Stamp 2013-09-04 00:01:09 -04:00
Kitware Robot dccc2b84a7 CMake Nightly Date Stamp 2013-09-03 00:01:05 -04:00
Kitware Robot 5ce44295c6 CMake Nightly Date Stamp 2013-09-02 00:01:10 -04:00
Kitware Robot b91655585e CMake Nightly Date Stamp 2013-09-01 00:01:15 -04:00
Kitware Robot ce6c7366f7 CMake Nightly Date Stamp 2013-08-31 00:01:11 -04:00
Robert Maynard ab9c7e36e5 CMake 2.8.12-rc2 2013-08-30 11:52:13 -04:00
Robert Maynard 90b51230d9 Merge branch 'release' 2013-08-30 09:27:35 -04:00
Brad King 452882ebeb Merge topic 'ctest-gtm-coverage-fileoffset-bug'
782eba3 CTest: Fix GTM coverage parsing line offset bug
2013-08-30 08:10:35 -04:00
Brad King b62042dbfb Merge topic 'normalize-system-includes-check'
5e15f39 Normalize system directories from the interface target property
2013-08-30 08:09:39 -04:00
Kitware Robot b6fe422a4c CMake Nightly Date Stamp 2013-08-30 00:01:08 -04:00
Stephen Kelly cfae430133 Genex: Rename cmGeneratorExpression::NeedsParsing to NeedsEvaluation 2013-08-29 17:53:31 +02:00
Stephen Kelly 6cf55644ef Generate graphviz files at generate time, not configure time.
The feature needs access to all link libraries. In the future that
will only be possible to calculate at generate-time.

Even when the files were generated at configure time, they were
generated after user code in CMakeLists files were generated. No
policy is needed to handle manipulation of the files from CMake
code, because that was never possible.
2013-08-29 17:18:02 +02:00
Brad King 549b95f115 Merge topic 'fix-docs-whitespace'
3580b9f Fix some whitespace errors in docs.
2013-08-29 10:43:42 -04:00
Zack Galbreath 782eba3a0c CTest: Fix GTM coverage parsing line offset bug
In cmParseGTMCoverage::ReadMCovFile, initialize the lineoffset variable.
Also set lastoffset only if the function is found (thanks to Bill
Hoffman).
2013-08-29 10:43:40 -04:00
Brad King ddff7ae0ce Merge topic 'no_track_configured_files'
0264eec cmMakefile: Do not track configured files known to be temporary
2013-08-29 10:39:10 -04:00
Stephen Kelly 5e15f39886 Normalize system directories from the interface target property
The input dir being tested is normalized, so ensure that the entries
in the vector are normalized too (eg no trailing slash).
2013-08-29 10:28:52 +02:00
Kitware Robot 4e7a4a0453 CMake Nightly Date Stamp 2013-08-29 00:01:07 -04:00
Robert Maynard 0264eec9d3 cmMakefile: Do not track configured files known to be temporary
Since commit ad502502 (cmMakefile: Track configured files so we can
regenerate them, 2013-06-18) cmMakefile::ConfigureFile records the
configured file as an output file generated by CMake.  The intention is
that for make and ninja we can re-run CMake when one of the files it
generates goes missing.  However, files configured temporarily in
CMakeTmp directories by Check* modules do not live past the CMake
invocation.

Teach cmMakefile::FinalPass to stop tracking files that don't
exist after we are finished generation.
2013-08-28 12:49:53 -04:00
Stephen Kelly 5916645064 Fix some indentation problems in cmPolicies. 2013-08-28 18:06:27 +02:00
Stephen Kelly fb1294c3a9 cmTarget: Add initializer for MAP_IMPORTED_CONFIG_<CONFIG> 2013-08-28 17:41:18 +02:00
Brad King b6f6802b3d Merge topic 'fix-MAP_IMPORTED_CONFIG-evaluation'
15d98a4 Genex: Fix evaluation of MAP_IMPORTED_CONFIG_<CONFIG>
2013-08-28 09:11:04 -04:00
Brad King e478f03469 VS: Fix CMAKE_SUPPRESS_REGENERATION bad ZERO_CHECK dependency (#14378)
When CMAKE_SUPPRESS_REGENERATION tells us not to create the ZERO_CHECK
target we should not add dependencies on it from other targets either.

Reviewed-by: Mateusz Loskot <mateusz@loskot.net>
2013-08-28 08:57:12 -04:00
Stephen Kelly dcc00ece4b Genex: Add the PLATFORM_ID expression. 2013-08-28 10:23:20 +02:00
Stephen Kelly 3580b9f338 Fix some whitespace errors in docs.
Remove trailing whitespace and add additional whitespace where
necessary.
2013-08-28 10:21:15 +02:00
Stephen Kelly d4937da71b Search for the Q_GADGET macro for running automoc too. 2013-08-28 10:18:11 +02:00
Kitware Robot 150bc7da3d CMake Nightly Date Stamp 2013-08-28 00:01:05 -04:00
Stephen Kelly d26594f390 Genex: Evaluate genexes for additional make clean files.
This is necessary because custom commands and targets may create
custom files whose names are determined by generator expressions.

For example, clang should be using $<TARGET_FILE> and $<TARGET_FILE_DIR>
instead of reverse engineering the output file name:

 http://thread.gmane.org/gmane.comp.compilers.clang.scm/80523

However, that can only be done when ADDITIONAL_MAKE_CLEAN_FILES
also accepts and evaluates generator expressions.

Similarly, KDE uses the LOCATION property where $<TARGET_FILE>
would also be better in KDE4_HANDLE_RPATH_FOR_EXECUTABLE but
also appends the result to ADDITIONAL_MAKE_CLEAN_FILES.

After this patch, both can be ported to generator expressions.
2013-08-28 00:49:29 +02:00
Stephen Kelly 15d98a42fd Genex: Fix evaluation of MAP_IMPORTED_CONFIG_<CONFIG>
Commit 10a069b5 (Genex: Fix $<CONFIG> with IMPORTED targets and
multiple locations., 2013-07-15) changed the logic here to include
handling of the MAP_IMPORTED_CONFIG_<CONFIG> target property, but
it was buggy in several ways.

Uppercase the configs in all cases, and compare the mapped configs
with the parameter to the CONFIG genex, instead of with the key of
the mapping.
2013-08-27 15:36:57 +02:00
Brad King b15ad0d1de Merge topic 'fix-install-destinations'
df62f64 Clean up install rules of CMake itself (#14371)
2013-08-27 09:13:57 -04:00
Kitware Robot 9b2940875e CMake Nightly Date Stamp 2013-08-27 00:01:06 -04:00
Brad King df62f64db7 Clean up install rules of CMake itself (#14371)
Ensure CMAKE_DATA_DIR, CMAKE_DOC_DIR, and CMAKE_MAN_DIR are always
relative paths in CMake code, and set defaults accordingly.  Use the
install() command instead of install_files() and install_targets().
This is more modern and also avoids stripping of the first character
from user-specified destinations.

While at it, fix the default destinations reported in the bootstrap
help.
2013-08-26 11:54:07 -04:00
Brad King c5baca7804 Merge topic 'find-IMPORTED-targets-for-try_compile'
cc8f796 try_compile: Extract IMPORTED targets from INTERFACE_LINK_LIBRARIES
fd4fb9e try_compile: Extract IMPORTED targets from LINK_DEPENDENT_LIBRARIES
2013-08-26 11:39:08 -04:00
Stephen Kelly cc8f79670e try_compile: Extract IMPORTED targets from INTERFACE_LINK_LIBRARIES 2013-08-26 11:37:00 -04:00
Stephen Kelly fd4fb9ef04 try_compile: Extract IMPORTED targets from LINK_DEPENDENT_LIBRARIES 2013-08-26 11:36:57 -04:00
Brad King 4d5d8df0cd Merge topic 'vs2013_toolset_14369'
3064f80 VS: Generate ToolsVersion matching each VS version
2013-08-26 10:28:52 -04:00
Brad King 757de2bb78 Merge topic 'doc-CPack-typo'
807a564 CPack: Fix a typo in documentation
2013-08-26 10:28:32 -04:00
Brad King 4923c6c724 Merge topic 'rpath-on-mac'
78cd884 OSX: Allow an empty INSTALL_NAME_DIR to override MACOSX_RPATH.
2013-08-26 10:28:10 -04:00
Brad King 32ea090a70 Merge topic 'fix-OLD-CMP0021'
eef6df5 Fix OLD behavior of CMP0021.
2013-08-26 10:27:29 -04:00
Robert Maynard 3064f80d25 VS: Generate ToolsVersion matching each VS version
The MSBuild version for each Visual Studio generator isn't 4.0.  With
Visual Studo 2013 the ToolsVersion moved from being tied to the .NET
framework and now has its own version number.
2013-08-26 10:21:16 -04:00
Kitware Robot 464456646f CMake Nightly Date Stamp 2013-08-26 00:01:04 -04:00
Kitware Robot beffeb1ffe CMake Nightly Date Stamp 2013-08-25 00:01:11 -04:00
Stephen Kelly eef6df5c7d Fix OLD behavior of CMP0021.
Exclude Ninja and Xcode from the CMP0021 test

They do not behave the same as the makefile generator with
relative paths.

Don't overwrite the header file for in-source builds.
2013-08-24 15:14:56 +02:00
Kitware Robot 898d920d54 CMake Nightly Date Stamp 2013-08-24 00:01:10 -04:00
Kitware Robot b864a5396a CMake Nightly Date Stamp 2013-08-23 00:01:05 -04:00
Stephen Kelly 33055c405e Generate modern-style cmake code.
The commits 9db31162 (Remove CMake-language block-end command
arguments, 2012-08-13) and 77543bde (Convert CMake-language
commands to lower case, 2012-08-13) changed most cmake code
to use lowercase commands and no parameters in termination
commands. However, those changes excluded cmake code generated
in c++ by cmake.

Make a similar style change to code generated by cmake.
2013-08-22 12:06:58 +02:00
Kitware Robot 374af6529a CMake Nightly Date Stamp 2013-08-22 00:01:05 -04:00
Clinton Stimpson 78cd884296 OSX: Allow an empty INSTALL_NAME_DIR to override MACOSX_RPATH.
With this, projects can enable MACOSX_RPATH by default, but still have
a way to install libraries with no install name dirs into locations
such as /usr/local/lib by setting INSTALL_NAME_DIR="".
2013-08-21 21:09:51 -06:00
Kitware Robot 7324eb896e CMake Nightly Date Stamp 2013-08-21 00:01:09 -04:00
Kitware Robot d7c9d60d9f CMake Nightly Date Stamp 2013-08-20 00:01:06 -04:00
Stephen Kelly 8b2a2db073 Fix resetting the compiler on the command line (#14366).
Convert the incoming value to a path in the same way that the
already-cached value was converted before comparison.

Do the actual comparison only one time, after both values are
normalized.
2013-08-19 14:35:14 +02:00
Kitware Robot 56cf74e734 CMake Nightly Date Stamp 2013-08-19 00:01:06 -04:00
Kitware Robot 79af005cf8 CMake Nightly Date Stamp 2013-08-18 00:01:06 -04:00
Kitware Robot 10ad7e458c CMake Nightly Date Stamp 2013-08-17 00:01:07 -04:00
Kitware Robot 31719643c5 CMake Nightly Date Stamp 2013-08-16 00:01:18 -04:00
Yury G. Kudryashov 807a564e7a CPack: Fix a typo in documentation 2013-08-15 13:11:57 -04:00
Brad King 330db97e64 CMake 2.8.12-rc1 2013-08-15 10:53:16 -04:00
Brad King 8da09f6ee1 Merge topic 'cmake-syntax'
9040ec9 Do not warn about left paren not separated by a space
2013-08-15 10:52:45 -04:00
Brad King 9040ec9117 Do not warn about left paren not separated by a space
Since commit 58e52416 (Warn about arguments not separated by whitespace,
2013-02-16) we warn about arguments not separated by spaces.  Loosen the
warning to not complain about left parens not separated by spaces from
the preceding token.  This is common in code like "if(NOT(X))".

Teach the RunCMake.Syntax test to cover cases of left parens not
separated by spaces and check that no warning appears.
2013-08-15 09:00:34 -04:00
Kitware Robot b4e5ba1717 CMake Nightly Date Stamp 2013-08-15 00:01:05 -04:00
Rolf Eike Beer 2a7fecc409 remove unused local typedef
Fixes this warning from g++ 4.8:

CMake/Source/cmDocumentation.cxx:835:23: warning: typedef 'sdoc_t' locally defined but not used [-Wunused-local-typedefs]
         SDOC_UNKNOWN} sdoc_t;
                       ^
2013-08-14 20:28:28 +02:00
Brad King 07c16eece5 Update version introducing CMP0021, CMP0022, and CMP0023
These policies will be first released in 2.8.12.
2013-08-14 09:44:00 -04:00
Brad King 3c61aec950 Merge topic 'fix-genex-segfault'
36eef30 Genex: Fix segfault when parsing ends with parameter expectation.
2013-08-14 08:48:14 -04:00
Kitware Robot 5353165a6c CMake Nightly Date Stamp 2013-08-14 00:01:14 -04:00
Stephen Kelly 36eef302c0 Genex: Fix segfault when parsing ends with parameter expectation.
The extendResult method expects a non-empty parameters vector, as
assured by the normal case. Avoid calling the method when the parser
finds an incomplete generator expression, but has already entered
the state of expecting to find parameters.
2013-08-13 13:58:39 +02:00
Kitware Robot b26f0e034a CMake Nightly Date Stamp 2013-08-13 00:01:05 -04:00
Kitware Robot 9ea7130630 CMake Nightly Date Stamp 2013-08-12 00:01:05 -04:00
Kitware Robot aeeda4852d CMake Nightly Date Stamp 2013-08-11 00:01:05 -04:00
Kitware Robot 4bc8b7abab CMake Nightly Date Stamp 2013-08-10 00:01:09 -04:00
Stephen Kelly b33c9844fa Revert "Add compiler target compile options."
This reverts commit 2d9ec1dadf.
2013-08-09 14:28:43 +02:00
Kitware Robot 702f630db8 CMake Nightly Date Stamp 2013-08-09 00:01:06 -04:00
Brad King 81aaad0c73 Merge topic 'cmake-syntax'
b93982f Merge branch 'dev/fix-variable-watch-crash' into cmake-syntax
c50f7ed cmListFileLexer: Modify flex output to avoid Borland warning
bf73264 Warn about unquoted arguments that look like long brackets
58e5241 Warn about arguments not separated by whitespace
e75b69f cmListFileCache: Convert CMake language parser to class
e945949 Add RunCMake.Syntax test cases for command invocation styles
0546484 cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enum
28685ad cmListFileLexer: Split normal and legacy unquoted arguments
1eafa3e cmListFileLexer: Fix line number after backslash in string
f3155cd Add RunCMake.Syntax test to cover argument parsing
2013-08-08 13:55:32 -04:00
Brad King aaadc280c9 Merge topic 'dev/fix-variable-watch-crash'
6aa0c21 variable_watch: Add test for watching a variable multiple times
b86e37c variable_watch: Check newValue for NULL
f9bb20f variable_watch: Don't share memory for callbacks
05dad99 variable_watch: Fix a typo in the error message
00ce12a variable_watch: Prevent making extra entries in the watch map
34b397e variable_watch: Allow specifying the data to match in RemoveWatch
e43e207 variable_watch: Match client_data when finding duplicates
0d6acb1 variable_watch: Add a deleter for the client data
fc7c3b4 variable_watch: Store client data as pointers
2013-08-08 13:55:25 -04:00
Brad King d422ee362d Merge topic 'parallel-memcheck'
6f9aaad CTest: create one output file per memcheck (#14303)
2013-08-08 13:55:19 -04:00
Brad King 4408382f19 Merge topic 'wince800'
0416a0e VS11: Add support for Windows CE SDKs
8fcf0ab Add support for new Windows CE compiler
2013-08-08 13:55:07 -04:00
Brad King a4529584ab Merge topic 'update-kwsys'
09b147b Merge branch 'upstream-kwsys' into update-kwsys
ce6eac8 KWSys 2013-08-06 (deec6b8a)
2013-08-08 13:55:02 -04:00
Brad King f181f27cd1 Merge topic 'fix-lexer-include-order'
ae6a5ea Include cmMakefile.h before cm*Lexer.h to get stdint.h first
2013-08-08 13:54:58 -04:00
Brad King cedf4550be Merge topic 'cmake-gui-qt5-win'
8120e13 cmake-gui: Fix build rules for Qt5 on Windows
2013-08-08 13:54:54 -04:00
Brad King b93982fb64 Merge branch 'dev/fix-variable-watch-crash' into cmake-syntax
Resolve conflict in Source/cmVariableWatchCommand.cxx by integrating the
changes from both sides.
2013-08-08 13:35:15 -04:00
Ben Boeckel b86e37c84f variable_watch: Check newValue for NULL
On read access, newValue can be NULL since there is no new value, so use
the empty string instead.
2013-08-08 13:31:10 -04:00
Ben Boeckel f9bb20fe2b variable_watch: Don't share memory for callbacks
The command itself is owned by the cmMakefile class, but the
cmVariableWatch which holds a pointer to the cmVariableWatchCommand via
the client_data for the callback outlives the cmMakefile class in the Qt
GUI. This means that when the cmMakefile is destroyed, the variable
watch is still in effect, but with a stale pointer.

To fix this, each callback is now a separate entity completely and
doesn't rely on the command which spawned it at all.

An example CMakeLists.txt which demonstrates the issue (only displayed
in cmake-gui, so no tests can be written for it):

    set(var 0)
    variable_watch(var)
2013-08-08 13:31:10 -04:00
Ben Boeckel 05dad99f5a variable_watch: Fix a typo in the error message
There was no space between "callback" and the quoted command name.
2013-08-08 13:31:10 -04:00
Ben Boeckel 00ce12a334 variable_watch: Prevent making extra entries in the watch map
When removing a watch on a variable, using the operator [] on the
internal map will create an empty watch if the variable doesn't have any
existing watches. Rather than creating this empty structure in the map,
return if there isn't a watch on the variable already.
2013-08-08 13:31:09 -04:00
Ben Boeckel 34b397e8de variable_watch: Allow specifying the data to match in RemoveWatch
Now that watches are dependent on their client_data when adding, it also
makes sense to allow matching the data for removal.
2013-08-08 13:31:09 -04:00
Ben Boeckel e43e207c7b variable_watch: Match client_data when finding duplicates
If a callback has the same data as another call, we don't want to delete
the old callback. This is because if the client_data is the same, it
might get deleted causing the new client_data to be bogus. Now, AddWatch
will return true if it will use the watch, false otherwise. Callers
should check the return value to know whether client_data was adopted by
the watch or not.
2013-08-08 13:31:09 -04:00
Ben Boeckel 0d6acb1df8 variable_watch: Add a deleter for the client data
The client data is arbitrary and the callback may be called an
unspecified number of times, so the cmVariableWatch must be the one to
delete the client data in the end (if it is needed at all).
2013-08-08 13:31:09 -04:00
Ben Boeckel fc7c3b4dc8 variable_watch: Store client data as pointers
The STL containers create extra copies which makes keeping track of the
owner of the client data much messier.
2013-08-08 13:31:09 -04:00
Brad King c50f7ede20 cmListFileLexer: Modify flex output to avoid Borland warning
Remove the "yyscanner = NULL" assignment from the end of the
yylex_destroy function because Borland warns that the value is never
used.
2013-08-08 13:26:28 -04:00
Brad King bf73264694 Warn about unquoted arguments that look like long brackets
In the future CMake will introduce Lua-style long bracket syntax.
Warn about unquoted arguments that in the future will be treated
as opening long brackets.

Teach the RunCMake.Syntax test to cover such cases and ensure that the
warning appears.
2013-08-08 13:26:28 -04:00
Brad King 58e524165d Warn about arguments not separated by whitespace
Teach the lexer to return tokens for whitespace.  Teach the parser to
tolerate the space tokens where whitespace is allowed.  Also teach the
parser to diagnose and warn about cases of quoted arguments followed
immediately by another argument.  This was accidentally allowed
previously, so we only warn.

Update the RunCMake.Syntax test case StringNoSpace expected stderr to
include the warnings.
2013-08-08 13:26:27 -04:00
Brad King e75b69f55b cmListFileCache: Convert CMake language parser to class
Refactor the parser implementation into a class to make
it easier to extend.
2013-08-08 13:26:27 -04:00
Brad King 0546484e4b cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enum
Replace the boolean value that indicates whether an argument is unquoted
or quoted with a generalized enumeration of possible argument types.
For now "Quoted" and "Unquoted" remain the only types.
2013-08-08 13:26:27 -04:00
Brad King 28685ade7a cmListFileLexer: Split normal and legacy unquoted arguments
Match legacy arguments separately.  Add macros to simplify and clarify
matching rules.
2013-08-08 13:26:26 -04:00
Brad King 1eafa3edaf cmListFileLexer: Fix line number after backslash in string
If a line inside a string ends in a backslash count the following
newline character as a line increment.  Add a test covering this case to
verify that subsequent line numbers are correct.
2013-08-08 13:26:26 -04:00
Kitware Robot 48539259ef CMake Nightly Date Stamp 2013-08-08 00:01:07 -04:00
Rolf Eike Beer 6f9aaad150 CTest: create one output file per memcheck (#14303)
The output file used for memory checker runs must be unique for every test run
in parallel, so simply make them unique for every test run. Simply use the test
index to avoid collisions.
2013-08-07 22:25:48 +02:00
Patrick Gansterer 0416a0e6d8 VS11: Add support for Windows CE SDKs
Allow additional generator platforms for the installed WinCE SDKs.
2013-08-07 10:28:30 -04:00
Brad King ae6a5ea5a2 Include cmMakefile.h before cm*Lexer.h to get stdint.h first
Some generated cm*Lexer.h headers define preprocessor macros normally
provided by <stdint.h>.  The latter is included indrectly by cmMakefile.h
since commit 2268c41a (Optimize custom command full-path dependency
lookup, 2013-08-06).  Adjust the order to avoid redefinition warnings.
2013-08-07 10:19:40 -04:00
Brad King 8120e13f40 cmake-gui: Fix build rules for Qt5 on Windows
Set policy CMP0020 to NEW to get WinMain from Qt.  Fix the documentation
custom command PATH for cmake-gui to find the Qt5 DLLs.
2013-08-07 09:59:33 -04:00
Brad King 7c9f0c664f Merge topic 'optimize-custom-command-dependencies'
2268c41 Optimize custom command full-path dependency lookup
eccb39d VS 6,7: Refactor local generators to avoid GetSourceFileWithOutput
2013-08-07 08:21:31 -04:00
Brad King 09b147b3a7 Merge branch 'upstream-kwsys' into update-kwsys 2013-08-07 08:18:32 -04:00
Kitware Robot 726fa61b59 CMake Nightly Date Stamp 2013-08-07 00:01:08 -04:00
Brad King a3b86cf711 Merge topic 'wince-entrypoint'
34969cf Fix setting of the entry point symbol for Windows CE (#14088)
5e0252c Improve const-correctness in cmVisualStudioGeneratorOptions
2013-08-06 16:55:22 -04:00
Brad King 1ed726a46c Merge topic 'vs-masm'
28e770c VS10: Add support for assembler code (#11536)
2013-08-06 16:55:10 -04:00
Brad King dba225db33 Merge topic 'vs-cleanup'
c90151b VS: Unify how the name of the generator is specified
3873d29 Fix detection of WinCE SDKs with 64bit verion of CMake
40a4302 VS12: Remove duplicated overload of UseFolderProperty()
b02f09d VS: Replace ArchitectureId with PlatformName
4b15dc8 VS: Set CMAKE_VS_PLATFORM_NAME for VS7 and VS71 too
60e568c VS10: Do not set the TargetMachine when detecting the compiler
dfbfe6f VS6: Hardcode id_machine_6 for compiler detection
2013-08-06 16:54:54 -04:00
Nicolas Despres 2268c41a05 Optimize custom command full-path dependency lookup
In the common case of custom command dependencies specified via full
path optimize the implementation of GetSourceFileWithOutput using a
(hash) map.  This is significantly faster than the existing linear
search.  In the non-full-path case fall back to the existing linear
suffix search.
2013-08-06 16:17:13 -04:00
Brad King eccb39d7f4 VS 6,7: Refactor local generators to avoid GetSourceFileWithOutput
Use the cmSourceFile returned by AddCustomCommandToOutput instead of
throwing out the return value and looking it up with
GetSourceFileWithOutput.
2013-08-06 10:20:03 -04:00
Brad King 87e0e6e497 Merge topic 'ALIAS-targets'
370bf55 Add the ALIAS target concept for libraries and executables.
2013-08-06 09:07:21 -04:00
Kitware Robot 0174133dfd CMake Nightly Date Stamp 2013-08-06 00:01:05 -04:00
Patrick Gansterer 34969cf15e Fix setting of the entry point symbol for Windows CE (#14088)
Set the EntryPointSymbol only when it has not been set before
and use the correct symbol depending on the usage of Unicode.
2013-08-05 21:24:00 +02:00
Patrick Gansterer 5e0252ce68 Improve const-correctness in cmVisualStudioGeneratorOptions
Add const qualifier to IsDebug(), UsingSBCS() and UsingUnicode().
2013-08-05 21:23:50 +02:00
Patrick Gansterer 28e770cf6e VS10: Add support for assembler code (#11536)
Use the masm BuildCustomizations, which are part of the Visual
Studio installation to allow compilation of asm files.
2013-08-05 16:34:10 +02:00
Patrick Gansterer c90151bd82 VS: Unify how the name of the generator is specified
Use the value of the provided argument instead of using a fixed
character buffer. This aligns VS10+VS11+VS12 with VS8+VS9.
2013-08-05 13:38:32 +02:00
Patrick Gansterer 3873d29d9e Fix detection of WinCE SDKs with 64bit verion of CMake
Use cmSystemTools::KeyWOW64_32 instead of KeyWOW64_Default to
make sure that the correct part of the registry is read.
2013-08-05 13:38:30 +02:00
Patrick Gansterer 40a4302414 VS12: Remove duplicated overload of UseFolderProperty()
cmGlobalVisualStudio11Generator generator already defines the same
function body, which makes the additional overload useless.
2013-08-05 13:38:28 +02:00
Patrick Gansterer b02f09d434 VS: Replace ArchitectureId with PlatformName
Since we do not need the information about the target architecture
we can use the PlatformName only to specify the this information.
This also removes setting of the MSVC_*_ARCHITECTURE_ID variable
which is not required, because this variable gets set by the
compiler detection code in CMAKE_DETERMINE_COMPILER_ID_CHECK().
2013-08-05 13:38:26 +02:00
Patrick Gansterer 4b15dc855d VS: Set CMAKE_VS_PLATFORM_NAME for VS7 and VS71 too
Move the code which sets CMAKE_VS_PLATFORM_NAME from
cmGlobalVisualStudio8Generator to cmGlobalVisualStudio7Generator.
2013-08-05 13:38:23 +02:00
Kitware Robot c359264948 CMake Nightly Date Stamp 2013-08-05 00:01:05 -04:00
Kitware Robot 7d680ca101 CMake Nightly Date Stamp 2013-08-04 00:01:05 -04:00
Kitware Robot c034b6e925 CMake Nightly Date Stamp 2013-08-03 00:01:09 -04:00
Stephen Kelly 370bf55415 Add the ALIAS target concept for libraries and executables.
* The ALIAS name must match a validity regex.
* Executables and libraries may be aliased.
* An ALIAS acts immutable. It can not be used as the lhs
  of target_link_libraries or other commands.
* An ALIAS can be used with add_custom_command, add_custom_target,
  and add_test in the same way regular targets can.
* The target of an ALIAS can be retrieved with the ALIASED_TARGET
  target property.
* An ALIAS does not appear in the generated buildsystem. It
  is kept separate from cmMakefile::Targets for that reason.
* A target may have multiple aliases.
* An ALIAS target may not itself have an alias.
* An IMPORTED target may not have an alias.
* An ALIAS may not be exported or imported.
2013-08-02 15:21:00 +02:00
Brad King 1e0539cd2c Merge topic 'vs10-include-dir-ampersand'
e7bcdf8 VS10: Escape include paths in XML project files (#14331)
2013-08-02 08:18:38 -04:00
Kitware Robot 70fccc91dd CMake Nightly Date Stamp 2013-08-02 00:01:12 -04:00
Brad King e7bcdf856e VS10: Escape include paths in XML project files (#14331)
Fix generation of the AdditionalIncludeDirectories element content to
escape for XML syntax.  We already escape content of other elements,
this one was simply missing by accident.
2013-08-01 15:00:28 -04:00
Brad King b341bf2178 Merge topic 'INCLUDES-DESTINATION-no-config'
80e652f Export: Process generator expressions from INCLUDES DESTINATION.
4355815 cmTarget: Add NAME property
2013-08-01 08:54:15 -04:00
Brad King 0920587b1d Merge topic 'minor-cleanups'
7429941 Docs: Fix typo in CMAKE_DEBUG_TARGET_PROPERTIES
2013-08-01 08:53:45 -04:00
Brad King 75af0cbfe7 Merge topic 'vs-subsystem-order'
b64e8f2 VS10: Honor user-specified /SUBSYSTEM: flag (#14326)
2013-08-01 08:53:21 -04:00
Brad King a26e7d0782 Merge topic 'target-command-allow-no-items'
c0b8682 Allow target commands to be invoked with no items (#14325).
2013-08-01 08:52:35 -04:00
Kitware Robot f0f7ee0adf CMake Nightly Date Stamp 2013-08-01 00:01:09 -04:00
Stephen Kelly 80e652f5cc Export: Process generator expressions from INCLUDES DESTINATION.
Configuration sensitive expressions are not permitted.
2013-08-01 00:37:25 +02:00
Stephen Kelly 43558156d4 cmTarget: Add NAME property
In generator expression contexts, this can be used to determine the
name of the head target in the evaluation.
2013-08-01 00:36:11 +02:00
Stephen Kelly 7429941254 Docs: Fix typo in CMAKE_DEBUG_TARGET_PROPERTIES
Introduced in commit f10e6480 (Docs: Document existing target
property debugging options., 2013-07-26)
2013-07-31 17:13:46 +02:00
Brad King b64e8f22a4 VS10: Honor user-specified /SUBSYSTEM: flag (#14326)
Use the WIN32_EXECUTABLE target property only to set the SubSystem build
attribute default.  When user-specified flags are later parsed they may
then override it.
2013-07-31 10:17:17 -04:00
Stephen Kelly c0b8682200 Allow target commands to be invoked with no items (#14325).
Code such as

 target_include_directories(foo PRIVATE ${items})

should not work or break based on whether items is defined or not.
2013-07-31 16:06:34 +02:00
Brad King e3b6ab92db Merge topic 'static_library_flags'
33e6e0b VS6: Add handling of CMAKE_*_LINKER_FLAGS_<CONFIG> variables
152dfda Add additonal tests for the linker flags
20ed496 Add documentation for the missing CMAKE_*_LINKER_FLAGS_* variables
54f7019 Add CMAKE_STATIC_LINKER_FLAGS to CMakeCommonLanguageInclude
2a43c30 Add support for CMAKE_STATIC_LINKER_FLAGS
14bbf83 Unify the way the flags of a static library are read
2013-07-31 08:49:01 -04:00
Brad King 58c5dc37d3 Merge topic '13582_configured_file_regeneration'
8fbf39a cmMakefile: Do not track configured files known to be temporary
2013-07-31 08:48:57 -04:00
Brad King b728ec3c31 Merge topic 'install-interface-includes'
72d13ff install: Remove error condition using INCLUDES DESTINATION without EXPORT.
2013-07-31 08:48:36 -04:00
Brad King 6e2da4a4d3 Merge topic 'passthru'
2b473d2 Add option to use stdout/stderr of original terminal in cmake --build
2013-07-31 08:48:19 -04:00
Patrick Gansterer 33e6e0b9c2 VS6: Add handling of CMAKE_*_LINKER_FLAGS_<CONFIG> variables
Read the content of the config specific linker flags in the
Visual Studio 6 generator too.
2013-07-31 08:41:08 -04:00
Patrick Gansterer 20ed496b6d Add documentation for the missing CMAKE_*_LINKER_FLAGS_* variables
Add CMAKE_MODULE_LINKER_FLAGS_*, CMAKE_SHARED_LINKER_FLAGS_* and
CMAKE_STATIC_LINKER_FLAGS_* to cmDocumentVariables.cxx with a
similar documentation as CMAKE_EXE_LINKER_FLAGS_*.
2013-07-31 08:41:07 -04:00
Patrick Gansterer 2a43c306fe Add support for CMAKE_STATIC_LINKER_FLAGS
Add the content of this variable to the target specific linker flags
as we do with the other CMAKE_*_LINKER_FLAGS variables already.
2013-07-31 08:41:07 -04:00
Patrick Gansterer 14bbf8340a Unify the way the flags of a static library are read
Introduce cmLocalGenerator::GetStaticLibraryFlags() to have a central
function for getting the linker flags for a given target.
2013-07-31 08:41:07 -04:00
Kitware Robot 8e475470be CMake Nightly Date Stamp 2013-07-31 00:01:05 -04:00
Brad King 8fbf39a471 cmMakefile: Do not track configured files known to be temporary
Since commit ad502502 (cmMakefile: Track configured files so we can
regenerate them, 2013-06-18) cmMakefile::ConfigureFile records the
configured file as an output file generated by CMake.  The intention is
that for make and ninja we can re-run CMake when one of the files it
generates goes missing.  However, files configured temporarily in
CMakeTmp directories by Check* modules do not live past the CMake
invocation.

Teach cmMakefile::ConfigureFile to skip tracking files with "CMakeTmp"
in their path, just like cmCoreTryCompile::TryCompileCode does to
avoid adding dependencies on temporary source files.  In the future
we will need a more general filter to avoid recording as CMake
outputs any files that do not exist at the end of generation.
2013-07-30 14:43:59 -04:00
Kitware Robot 9181a4e3b6 CMake Nightly Date Stamp 2013-07-30 00:01:10 -04:00
Brad King c18117a129 Merge topic 'fix-export-includes-crash'
f868e47 Fix crash on export of target with empty INTERFACE_INCLUDE_DIRECTORIES.
2013-07-29 09:59:29 -04:00
Brad King 63728df6e5 Merge topic 'memcheck_pre_post_args'
c0756b6 Revert "CTest: fix pre and post test commands with spaces" (#13887)
2013-07-29 09:55:27 -04:00
Brad King 3c683d788d Merge topic 'rpath-on-mac'
84698ab OS X: If necessary, use xcrun to help find otool used to query install names.
2013-07-29 09:55:15 -04:00
Brad King 64bb8f4d19 Merge topic 'DocumentGraphvisOptions'
692ecf4 graphvizoptions: add copyright notice
ee32673 Add documentation for the --graphviz support
2013-07-29 09:55:08 -04:00
Brad King 50c5eb508c Merge topic 'ninja_bad_cmcldeps_paths'
9275554 Ninja: Update BuildDepends test to verify cmcldeps depfiles.
6fa9d0a Ninja: Make cmcldeps depfile output more consistent with 'ninja -t msvc'
2013-07-29 09:54:48 -04:00
Brad King 3dace78c2c Merge topic 'minor-cleanups'
b8dc7fa Genex: Disallow LINKER_LANGUAGE only when used on a static library.
c8a10ba cmTarget: Fix iface libraries and languages for static libraries.
f94bdb3 cmTarget: Remove duplicates when printing traces of tll signatures
ff3d5fa Export: Fix typo of LINK_INTERFACE_LIBRARIES.
79a7a81 Docs: Document variables for default visibility values.
6f6391b Docs: Generalize and de-duplicate VISIBILITY_PREFIX docs.
d8cb47f Docs: Trim trailing whitespace in generated doc.
f10e648 Docs: Document existing target property debugging options.
4f4d69f Qt4Macros: Simplify some variable population.
a413a40 Qt4Macros: Remove undefined varible use.
b60a29e Qt4Macros: Remove unneeded generate CONDITION.
e454cba Docs: Document file(GENERATE) CONDITION as optional.
2013-07-29 09:54:34 -04:00
Stephen Kelly f868e47236 Fix crash on export of target with empty INTERFACE_INCLUDE_DIRECTORIES.
The new feature of install(TARGETS ... INCLUDES DESTINATION) introduced
in commit 650e61f8 (Add a convenient way to add the includes install
dir to the INTERFACE., 2013-01-05) introduced this crash. If the
new feature is used with a target which has no
INTERFACE_INCLUDE_DIRECTORIES, a segfault occurred.
2013-07-29 15:50:24 +02:00
Stephen Kelly 72d13ff482 install: Remove error condition using INCLUDES DESTINATION without EXPORT.
Commit 650e61f8 (Add a convenient way to add the includes install
dir to the INTERFACE., 2013-01-05) introduced an error case for
using the install(TARGETS) command with specified INCLUDES DESTINATION,
but no specified EXPORT set.

It is convenient to use a variable to set the various destinations
for different outputs (as KDE does), and some targets such as
executables are installed but not exported. This was triggering
the error case, but as it is a common case, remove the error.
2013-07-29 15:16:15 +02:00
Patrick Gansterer 2b473d2eaa Add option to use stdout/stderr of original terminal in cmake --build
Pass the original file handles to the native tool when using the
--use-stderr option in the build command. This enables the
usage of advanced terminal features like colored output.
2013-07-29 08:52:54 +02:00
Kitware Robot fc1708ac99 CMake Nightly Date Stamp 2013-07-29 00:01:03 -04:00
Kitware Robot 8d3b65346f CMake Nightly Date Stamp 2013-07-28 00:01:04 -04:00
Rolf Eike Beer c0756b6dd6 Revert "CTest: fix pre and post test commands with spaces" (#13887)
This reverts commit 6187876dea.

It was actually possible before to have paths with spaces in them, the spaces
just need to be quoted. This way spaces will work as argument separators.
2013-07-27 22:05:47 +02:00
Clinton Stimpson 84698abb51 OS X: If necessary, use xcrun to help find otool used to query install names.
This fixes querying for @rpath install names when using Xcode without
the command line tools installed.
2013-07-26 22:38:57 -06:00
Kitware Robot 46558d290b CMake Nightly Date Stamp 2013-07-27 00:01:11 -04:00
Alex Neundorf ee32673c7d Add documentation for the --graphviz support
This patch adds Modules/CMakeGraphVizOptions.cmake, which is used
only for generating documentation for the --graphviz support.

Alex
2013-07-26 22:43:42 +02:00
Stephen Kelly b8dc7fad23 Genex: Disallow LINKER_LANGUAGE only when used on a static library.
For shared libraries and executables, the linker_language is
indepenedent of the linked libraries.
2013-07-26 16:58:25 +02:00
Reid Kleckner 6fa9d0ab40 Ninja: Make cmcldeps depfile output more consistent with 'ninja -t msvc'
Ninja relies on the generator to produce paths that match up with the
paths used in the build.ninja file, which are spelled with backslashes.
Therefore, cmcldeps should canonicalize depfile paths to use backslashes
and relativize paths to the build directory.
2013-07-26 10:12:03 -04:00
Stephen Kelly c8a10ba9ad cmTarget: Fix iface libraries and languages for static libraries. 2013-07-26 15:15:42 +02:00
Brad King 87402c995e Merge topic 'tid-system-argument'
9b9a596 cmTarget: Fix property name typo in docs.
2013-07-26 09:01:22 -04:00
Brad King dda6e93666 Merge topic 'install-interface-relative'
d777b8e Genex: Allow relative paths in INSTALL_INTERFACE.
2013-07-26 09:01:19 -04:00
Brad King c82b1cbe83 Merge topic 'install-interface-includes'
650e61f Add a convenient way to add the includes install dir to the INTERFACE.
2013-07-26 09:01:06 -04:00
Brad King a883bc0a3b Merge topic 'sha2-avoid-type-pun'
6a365d0 sha2: Avoid type-punned pointer dereference (#14314)
2013-07-26 09:00:45 -04:00
Stephen Kelly f94bdb3deb cmTarget: Remove duplicates when printing traces of tll signatures 2013-07-26 14:05:25 +02:00
Stephen Kelly ff3d5fae5d Export: Fix typo of LINK_INTERFACE_LIBRARIES.
Refer correctly to the old property, not the new one.
2013-07-26 13:10:06 +02:00
Stephen Kelly 79a7a81327 Docs: Document variables for default visibility values. 2013-07-26 09:37:12 +02:00
Stephen Kelly 6f6391b771 Docs: Generalize and de-duplicate VISIBILITY_PREFIX docs. 2013-07-26 09:37:12 +02:00
Stephen Kelly d8cb47f23c Docs: Trim trailing whitespace in generated doc. 2013-07-26 09:37:12 +02:00
Stephen Kelly f10e64804e Docs: Document existing target property debugging options. 2013-07-26 09:37:12 +02:00
Kitware Robot 4c2803358d CMake Nightly Date Stamp 2013-07-26 00:01:07 -04:00
Stephen Kelly e454cba292 Docs: Document file(GENERATE) CONDITION as optional. 2013-07-26 00:21:50 +02:00
Brad King 6a365d0901 sha2: Avoid type-punned pointer dereference (#14314)
GCC warns:

 dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

on constructs like

 *(sha_word64*)&var =

so use memcpy to perform such assignments instead.
2013-07-25 13:10:13 -04:00
Stephen Kelly 9b9a596004 cmTarget: Fix property name typo in docs. 2013-07-25 15:06:02 +02:00
Ben Boeckel 5837f19690 export: Error when exporting a target without a language
First, it prevents a NULL dereference and second it reiterates that
targets without languages are not supported by CMake.

Add a RunCMake.ExportWithoutLanguage test exporting a library without a
languages.
2013-07-25 08:44:57 -04:00
Brad King 2f8dace125 Merge topic 'tll-new-signatures'
b655865 target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature
2013-07-25 08:37:16 -04:00
Brad King 6b92e93b6d Merge topic 'doc-CMAKE_lang_FLAGS'
41bb95f Document CMAKE_<LANG>_FLAGS variable (#14305)
2013-07-25 08:36:55 -04:00
Stephen Kelly d777b8e716 Genex: Allow relative paths in INSTALL_INTERFACE.
These paths can be prepended with the ${_IMPORT_PREFIX} generated
in the export file.

Such relative paths were previously an error.
2013-07-25 14:31:22 +02:00
Kitware Robot 6b184d1607 CMake Nightly Date Stamp 2013-07-25 00:01:05 -04:00
Stephen Kelly b655865bbf target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature
Add a new signature to help populate INTERFACE_LINK_LIBRARIES and
LINK_LIBRARIES cleanly in a single call.  Add policy CMP0023 to control
whether the keyword signatures can be mixed with uses of the plain
signatures on the same target.
2013-07-24 11:52:44 -04:00
Brad King 828ddb6813 Merge topic 'framework-interface-includes'
f5ca872 Use linked frameworks as a source of include directories.
2013-07-24 11:50:49 -04:00
Stephen Kelly f5ca872e8b Use linked frameworks as a source of include directories. 2013-07-24 11:49:06 -04:00
Stephen Kelly 650e61f833 Add a convenient way to add the includes install dir to the INTERFACE.
Export the INCLUDES DESTINATION without appending to the
INTERFACE_INCLUDE_DIRECTORIES of the target itself. That way, a target
can be exported multiple times with different INCLUDES DESTINATION
without unintended cross-pollution of export sets.
2013-07-24 17:32:58 +02:00
Brad King e31c4bd9a6 Merge topic 'dev/property-append-with-empty-string'
31bd83e set_property: Do not remove a property when APPENDing nothing
2013-07-24 11:02:44 -04:00
Brad King e6f93dc560 Merge topic 'windows_ninja_duplicate_paths'
a11da72 Ninja: Properly convert all paths to unix style before we do set intersection.
2013-07-24 11:02:33 -04:00
Brad King a52f00e07c Merge topic 'minor-cleanups'
8f5b402 Remove TODO to uniq COMPILE_OPTIONS
5fb58b8 Don't add trailing whitespace to error message.
2013-07-24 11:02:24 -04:00
Brad King 571d050415 Merge topic 'fix-mapped-config-genex'
10a069b Genex: Fix $<CONFIG> with IMPORTED targets and multiple locations.
2013-07-24 11:02:19 -04:00
Brad King 6077847edc Merge topic 'remove-LINK_LANGUAGE-genex'
4f6bd70 Remove the LINK_LANGUAGE generator expression.
2013-07-24 11:02:14 -04:00
Ben Boeckel 31bd83e9fc set_property: Do not remove a property when APPENDing nothing 2013-07-24 10:50:15 -04:00
Stephen Kelly 10a069b504 Genex: Fix $<CONFIG> with IMPORTED targets and multiple locations.
The old code checked only that there was a LOCATION for the
specified config, but did not check whether the config actually
mapped.

Task-number: 14292
2013-07-24 10:43:02 -04:00
Stephen Kelly 4f6bd7022b Remove the LINK_LANGUAGE generator expression.
It accepted an optional argument to test for equality, but no way
to get the linker language of a particular target.

TARGET_PROPERTY provides this flexibility and STREQUAL provides
the necessary API for equality test.

Extend the CompileDefinitions test to cover accessing the
property of another target.
2013-07-24 10:40:00 -04:00
Sebastian Leske 41bb95fc67 Document CMAKE_<LANG>_FLAGS variable (#14305)
We already document the variables CMAKE_<LANG>_FLAGS_{DEBUG, MINSIZEREL,
RELEASE, RELWITHDEBINFO}. However, CMAKE_<LANG>_FLAGS is not documented,
even though it's available (and useful).
2013-07-24 10:30:34 -04:00
Kitware Robot 52daa0ea34 CMake Nightly Date Stamp 2013-07-24 00:01:04 -04:00
Kitware Robot ffe79b582f CMake Nightly Date Stamp 2013-07-23 00:01:09 -04:00
Robert Maynard a11da72e7b Ninja: Properly convert all paths to unix style before we do set intersection.
On windows we had a subset of the paths as unix style and a subset as windows
so when doing the set intersection it resulted in the same file being
found twice.
2013-07-22 10:42:37 -04:00
Brad King cb57ce249e Merge topic 'AddCommentsToExportsFile'
4b1919f ExportTargets: add one more comment to the generated file.
2013-07-22 09:48:51 -04:00
Brad King 8521a909ba Merge topic 'rpath-on-mac'
603bc59 OS X: Fix regression handling frameworks for Ninja
e645ff0 OS X: Enable rpath support on Mac OS X when find_library() is used.
2013-07-22 09:48:44 -04:00
Brad King 29859c09af Merge topic 'cpack-wix'
bf23891 CPackWIX: Add support for custom WiX templates
155bb01 CMakeCPack: Provide an upgrade guid for WiX
bfa2e29 CPackWIX: Add option to specify the language(s) of the installer
6e51ea9 CPackWIX: Handle multiple shortcuts in the start menu
6d77e1a CPackWIX: Fix MSI package layout regression from parent
8c0e325 CPackWIX: Handle CPACK_PACKAGE_EXECUTABLES (#13967)
2013-07-22 09:48:32 -04:00
Clinton Stimpson 603bc5998f OS X: Fix regression handling frameworks for Ninja
Fix a regression created by commit 373faae5 (Refactor how bundles and
frameworks are supported, 2013-05-05).

Since the ninja file isn't aware of how framework symlinks work, we
suppress symlink creation and let cmOSXBundleGenerator handle it.  Also,
use the real name of framework library in build rules as was done
before, instead of the symlink.
2013-07-22 09:40:11 -04:00
Kitware Robot 7dcf63e8a5 CMake Nightly Date Stamp 2013-07-22 00:01:03 -04:00
Kitware Robot 56e6538400 CMake Nightly Date Stamp 2013-07-21 00:01:03 -04:00
Kitware Robot 5f4daff8f5 CMake Nightly Date Stamp 2013-07-20 00:01:04 -04:00
Alex Neundorf 4b1919f73e ExportTargets: add one more comment to the generated file.
This patch adds a comment above the block which protects
the exported targets file against multiple inclusion, to make
the file easier to understand for readers.

Alex
2013-07-19 22:57:33 +02:00
Adam J. Weigold bf23891942 CPackWIX: Add support for custom WiX templates
WiX provides a lot of functionality for installers that cannot be
supported (easily) in the default WIX.template.in file.

For most users, the default template should be fine.  However if users
want to produce merge modules, include custom actions, etc, this new
option allows for a hook into how the wxs is produced.
2013-07-19 14:50:43 -04:00
Richard Ulrich bfa2e299ae CPackWIX: Add option to specify the language(s) of the installer
Add option "CPACK_WIX_CULTURES".
2013-07-19 14:50:43 -04:00
Richard Ulrich 6e51ea9870 CPackWIX: Handle multiple shortcuts in the start menu 2013-07-19 14:50:42 -04:00
Ian Monroe 6d77e1ab3f CPackWIX: Fix MSI package layout regression from parent
The parent commit added a regression where if the install directory had:

  parent
    child A
    child B

the produced MSI would install:

  parent
    child A
       child B
2013-07-19 10:49:20 -04:00
Fredrik Axelsson 8c0e32550c CPackWIX: Handle CPACK_PACKAGE_EXECUTABLES (#13967)
Add start menu items including an uninstall shortcut.  Add variable
CPACK_WIX_PROGRAM_MENU_FOLDER to configure folder name.
2013-07-19 10:49:00 -04:00
Kitware Robot e3c9be07b2 CMake Nightly Date Stamp 2013-07-19 00:01:10 -04:00
Brad King b28360c780 Merge topic 'custom-command-assignment'
17c841c add_custom_command: Manage backtrace memory correctly (#14299)
2013-07-18 10:12:08 -04:00
Brad King 085ed41f65 Merge topic 'doc-add_test-names'
d017058 add_test: Document test name restrictions (#14298)
2013-07-18 10:11:55 -04:00
Stephen Kelly 8f5b402aa2 Remove TODO to uniq COMPILE_OPTIONS
Compile options should not be passed through a uniq filter because
repeated use of an option may have siginificance.
2013-07-18 11:49:11 +02:00
Stephen Kelly 5fb58b8686 Don't add trailing whitespace to error message. 2013-07-18 11:46:50 +02:00
Kitware Robot beffb88da9 CMake Nightly Date Stamp 2013-07-18 00:01:08 -04:00
Brad King 17c841c42d add_custom_command: Manage backtrace memory correctly (#14299)
Add an assignment operator to cmCustomCommand to copy the Backtrace
member pointee and avoid multiple-free on destruction.

Reported-by: Vitezslav Cizek <vcizek@suse.cz>
2013-07-17 11:18:06 -04:00
Brad King d0170584c5 add_test: Document test name restrictions (#14298) 2013-07-17 08:11:37 -04:00
Kitware Robot 1c7dd4da31 CMake Nightly Date Stamp 2013-07-17 00:01:05 -04:00
Brad King ff6de6d325 Merge topic 'drop-old-vs-dependency'
4bb6e24 VS,Xcode: Drop incorrect legacy dependency trace (#14291)
2013-07-16 13:59:35 -04:00
Brad King ddfd3b85df Merge topic 'cppcheck-fixes'
a20c819 cmake: Fix resource leak reported by cppcheck
c8adab9 cmcurl: Fix resource leak reported by cppcheck
499531c libarchive: Fix free() order to avoid accessing freed memory
3b849a7 ccmake: Add missing initializers reported by cppcheck
2013-07-16 13:59:30 -04:00
Brad King 3573a94d72 Merge topic 'vs-no-indirect-output'
45d2966 VS: Avoid leaking child process output back to IDE (#14266)
2013-07-16 13:59:17 -04:00
Brad King 41a2fb5ba0 Merge topic 'tid-system-argument'
9cf3547 Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property.
1925cff Add a SYSTEM parameter to target_include_directories (#14180)
286f227 Extend the cmTargetPropCommandBase interface property handling.
83498d4 Store system include directories in the cmTarget.
f1fcbe3 Add Target API to determine if an include is a system include.
2679a34 Remove unused variable.
2013-07-16 13:59:07 -04:00
Brad King 45d2966dcc VS: Avoid leaking child process output back to IDE (#14266)
The VS IDE sets the environment variable VS_UNICODE_OUTPUT when
executing build rules in order to tell MS tools to report output through
a back door instead of through stdout/stderr.  Unset this variable so
that CMake can capture or properly redirect all output from processes it
runs even when running inside a VS IDE build environment.

This generalizes the special cases fixed by commit 80d045b0 (When
GetPrerequisites.cmake runs dumpbin while running inside the VS IDE...,
2008-05-01) and commit 44aff73d (ExternalProject: Avoid bleed-through
output when logging, 2011-01-06), so drop special handling of
VS_UNICODE_OUTPUT in those instances.
2013-07-16 13:48:10 -04:00
Stephen Kelly 9cf3547e1c Add the INTERFACE_SYSTEM_INCLUDE_DIRECTORIES target property.
Unlike other target properties, this does not have a corresponding
non-INTERFACE variant.

This allows propagation of system attribute on include directories
from link dependents.
2013-07-16 13:44:57 -04:00
Clinton Stimpson e645ff0b10 OS X: Enable rpath support on Mac OS X when find_library() is used. 2013-07-15 22:39:08 -06:00
Kitware Robot 029e836a21 CMake Nightly Date Stamp 2013-07-16 00:01:05 -04:00
Brad King 4bb6e24809 VS,Xcode: Drop incorrect legacy dependency trace (#14291)
Drop the "vsProjectFile" argument from cmTarget::TraceDependencies.  It
appears to be the modern equivalent to a hunk added in commit ba68f771
(...added new custom command support, 2003-06-03):

 +  name = libName;
 +  name += ".dsp.cmake";
 +  srcFilesToProcess.push(name);

but was broken by refactoring at some point.  The current behavior tries
to trace dependencies on a source file named the same as a target, which
makes no sense.  Furthermore, in code of the form

 add_executable(foo foo.c)
 add_custom_command(OUTPUT "${somewhere}/foo" ... DEPENDS foo)

the "vsProjectFile" value "foo" matches source "${somewhere}/foo.rule"
generated to hold the custom command and causes the command to be added
to the "foo" target incorrectly.

Simply drop the incorrect source file trace and supporting logic.
2013-07-15 13:17:29 -04:00
Brad King a20c819f63 cmake: Fix resource leak reported by cppcheck
Return early in cmake::ReportUndefinedPropertyAccesses if there is no
global generator instead of opening a file and leaking the descriptor.

Reported-by: Ömer Fadıl USTA <omerusta@gmail.com>
2013-07-15 10:20:00 -04:00
Ömer Fadıl USTA 3b849a7ae9 ccmake: Add missing initializers reported by cppcheck
The return statement uses d1, d2, d3, and d4 variables but the code
which initialize them inside a if statement and not always this if
statement is corrent.  On the other hand these variables are using for
return statement and needed to be initialized.  A trivial fix to pervent
some compilers will give build error.

Reviewed-by: Igor Murzov <e-mail@date.by>
2013-07-15 10:20:00 -04:00
Brad King b94e726a83 Merge topic 'doc-deprecation-variables'
c64326b Document some variables for deprecation control.
2013-07-15 09:43:06 -04:00
Brad King d5d54b4629 Merge topic 'compile-defs-debugging'
d7dd010 Add target property debugging for COMPILE_DEFINITIONS
1841215 Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.
afc9243 Add an overload of cmIDEOptions::AddDefines taking a vector of strings.
d95651e Overload cmLocalGenerator::AppendDefines to add a list.
2013-07-15 09:34:00 -04:00
Brad King 7fa77b3fb3 Merge topic 'revert-CMAKE_SYSROOT'
0416c94 Revert "Use --sysroot when cross compiling."
2013-07-15 09:33:56 -04:00
Brad King 0e294b6fa7 Merge topic 'update-kwsys'
635e19d Merge branch 'upstream-kwsys' into update-kwsys
0a44fa4 KWSys 2013-07-10 (beef6819)
2013-07-15 09:33:53 -04:00
Brad King fa6106ec56 Merge topic 'target-policies'
484bb88 Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICY
2013-07-15 09:33:47 -04:00
Brad King b6e0972262 Merge topic 'INTERFACE_LINK_LIBRARIES-prop'
3e30d9e TLL: Don't populate old link interface if CMP0022 is NEW.
574fec9 Export: Generate INTERFACE_LINK_LIBRARIES property on targets.
d0a76ea Introduce the INTERFACE_LINK_LIBRARIES property.
ddde61c Introduce the LINK_ONLY generator expression.
5aa9731 GenexEval: Add abstracted access to link interface for a target.
2013-07-15 09:33:42 -04:00
Brad King f6024ef420 Merge topic 'try_compile-COPY_FILE_ERROR'
c28715b try_compile: Add COPY_FILE_ERROR option to capture failure
2013-07-15 09:33:32 -04:00
Brad King c0fe24e539 Merge topic 'cmake-error-advice'
18e1bfb cmake: On configure error suggest looking at CMake*.log files
2013-07-15 09:31:18 -04:00
Brad King 656abc28ad Merge topic 'vs-flag-MAP-with-value'
f2caf79 VS: Fix /MAP:mapfile flag mapping (#14282)
2013-07-15 09:31:14 -04:00
Brad King 37ba3d4a6a Merge topic 'doc-include-clarify'
e934b1f include: Clarify variable access scope for included file
2013-07-15 09:31:10 -04:00
Brad King 88f4ec0dd5 Merge topic 'try_compile-escape-flags'
290857b try_compile: Escape CMAKE_<lang>_FLAGS in test projects (#14268)
2013-07-15 09:31:01 -04:00
Brad King cbdea2cca9 Merge topic 'doc-project-top-level'
4a71168 project: Document top-level CMakeLists.txt requirement
2013-07-15 09:30:50 -04:00
Brad King aa0b9fa311 Merge topic 'IMPORTED-build-dependencies'
4f7ceb5 Test non-IMPORTED libraries in the INTERFACE of IMPORTED libraries.
3405351 Add entire link interface transitive closure as target depends.
2013-07-15 09:30:34 -04:00
Brad King c28715b16c try_compile: Add COPY_FILE_ERROR option to capture failure
When the COPY_FILE operation fails optionally capture the error message
with a COPY_FILE_ERROR option instead of reporting the error
immediately.  This gives callers a chance to do something else or report
the error.

Teach the RunCMake.try_compile test to cover bad argument combinations
involving COPY_FILE_ERROR.  Teach the TryCompile test to cover the case
of a COPY_FILE error message captured by COPY_FILE_ERROR.
2013-07-15 09:16:36 -04:00
Brad King 290857bb03 try_compile: Escape CMAKE_<lang>_FLAGS in test projects (#14268)
If CMAKE_<lang>_FLAGS contains quotes or other CMake language characters
they must be escaped when written into the generated CMakeLists.txt file
so that the test project parses them properly.

Teach the TryCompile test to cover this case by adding a flag with
quotes into CMAKE_C_FLAGS during a C language try_compile.
2013-07-15 09:14:56 -04:00
Kitware Robot b5dd80105f CMake Nightly Date Stamp 2013-07-15 00:01:04 -04:00
Kitware Robot de2a02b191 CMake Nightly Date Stamp 2013-07-14 00:01:04 -04:00
Kitware Robot 89f59694d2 CMake Nightly Date Stamp 2013-07-13 00:01:07 -04:00
Stephen Kelly d7dd01083a Add target property debugging for COMPILE_DEFINITIONS
Use constructs similar to those for COMPILE_OPTIONS. This is a little
different because there is a command to remove_definitions(), so
we can't populate the equivalent target property until generate-time
in cmGlobalGenerator.
2013-07-12 16:57:36 +02:00
Stephen Kelly 0416c94f64 Revert "Use --sysroot when cross compiling."
This reverts commit de4da665d3.

This feature is not yet ready for release. It needs to be
merged with the CMAKE_OSX_SYSROOT feature.
2013-07-12 15:44:38 +02:00
Kitware Robot b9412889e9 CMake Nightly Date Stamp 2013-07-12 00:01:05 -04:00
Brad King 635e19d607 Merge branch 'upstream-kwsys' into update-kwsys 2013-07-11 09:04:05 -04:00
Stephen Kelly 484bb888a0 Genex: Make CMP0021 and CMP0022 usable with TARGET_POLICY
Use preprocessor loops and add a unit test for the appropriate
policies. All policies whose value is recorded at target creation
time should be part of this list.
2013-07-11 11:56:14 +02:00
Stephen Kelly c64326bc0b Document some variables for deprecation control. 2013-07-11 10:25:30 +02:00
Stephen Kelly 184121538c Refactor cmTarget::GetCompileDefinitions to use an out-vector, not a string.
Refactor to create AddCompileDefinitions.
2013-07-11 08:23:56 +02:00
Kitware Robot 4dc515f8e1 CMake Nightly Date Stamp 2013-07-11 00:01:04 -04:00
Stephen Kelly afc9243c32 Add an overload of cmIDEOptions::AddDefines taking a vector of strings. 2013-07-10 15:53:53 +02:00
Stephen Kelly d95651e15a Overload cmLocalGenerator::AppendDefines to add a list. 2013-07-10 12:59:20 +02:00
Kitware Robot a18e9586db CMake Nightly Date Stamp 2013-07-10 00:01:06 -04:00
Brad King 18e1bfbb3c cmake: On configure error suggest looking at CMake*.log files
When CMake reports failure to configure a project, especially when the
toolchain does not initialize properly, the true reason may be clear
from reading the CMakeFiles/CMake(Output|Error).log files.  Advise users
to look at these files if they exist when configuration fails.

Add RunCMake.Configure test to check that the log files are mentioned
when configuration fails.
2013-07-09 15:00:39 -04:00
Brad King f2caf795fe VS: Fix /MAP:mapfile flag mapping (#14282)
We have two mappings for the "/MAP" flag.  The first does not care
whether there is a value and activates the GenerateMapFile boolean
setting.  The second takes a value and puts it in the MapFileName
setting.  The latter must treat the ":" as part of the flag.

This is similar to commit 8ae66bf4 (Fix optionally-valued booleans in VS
10 flag table, 2009-10-23).
2013-07-09 10:13:43 -04:00
Brad King e934b1f503 include: Clarify variable access scope for included file
The wording "Commands in the file are processed immediately as if they
were written in place of the include command" sounds as if some kind of
macro replacement is performed.  This is not accurate.  Update the
wording to describe behavior of the included code in terms of the
variable access scope.
2013-07-09 08:31:23 -04:00
Kitware Robot d2fb62e916 CMake Nightly Date Stamp 2013-07-09 00:01:04 -04:00
Stephen Kelly 3e30d9ed67 TLL: Don't populate old link interface if CMP0022 is NEW.
Always populate the INTERFACE_LINK_LIBRARIES for interface
entries. Don't populate the old interface properties
matching (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?
if CMP0022 is NEW.

Because the INTERFACE_LINK_LIBRARIES property is now populated by
the target_link_libraries when operating on a static library,
make an equivalent change which populates the property with
the same value when the old link_libraries() command is used. This
silences the policy warning in that case.
2013-07-08 22:39:58 +02:00
Stephen Kelly 574fec97fd Export: Generate INTERFACE_LINK_LIBRARIES property on targets.
This property is generated only for targets which have recorded
policy CMP0022 as NEW, and a compatibility mode is added to
additionally export the old interfaces in that case too.

If the old interfaces are not exported, the generated export files
require CMake 2.8.12. Because the unit tests use a version which
is not yet called 2.8.12, temporarily require a lower version.
2013-07-08 22:39:57 +02:00
Stephen Kelly d0a76ea07c Introduce the INTERFACE_LINK_LIBRARIES property.
This property replaces the properties which
match (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?, and is enabled
for IMPORTED targets, and for non-IMPORTED targets only with a policy.

For static libraries, the INTERFACE_LINK_LIBRARIES property is
also used as the source of transitive usage requirements content.
Static libraries still require users to link to all entries in
their LINK_LIBRARIES, but usage requirements such as INCLUDE_DIRECTORIES
COMPILE_DEFINITIONS and COMPILE_OPTIONS can be restricted to only
certain interface libraries.

Because the INTERFACE_LINK_LIBRARIES property is populated unconditionally,
we need to compare the evaluated result of it with the link implementation
to determine whether to issue the policy warning for static libraries. For
shared libraries, the policy warning is issued if the contents of
the INTERFACE_LINK_LIBRARIES property differs from the contents of the
relevant config-specific old LINK_INTERFACE_LIBRARIES property.
2013-07-08 22:39:09 +02:00
Brad King 4a71168735 project: Document top-level CMakeLists.txt requirement
CMake requires the top-level CMakeLists.txt to contain a direct call to
the project() command and will insert one if there is not.  Document
this requirement since some authors have tried to use include() to load
a file calling the project command.
2013-07-08 08:22:30 -04:00
Kitware Robot 448a677148 CMake Nightly Date Stamp 2013-07-08 00:01:05 -04:00
Stephen Kelly ddde61c0b2 Introduce the LINK_ONLY generator expression.
This is an internal expression for use by target_link_libraries
for static libraries.
2013-07-08 00:00:18 +02:00
Stephen Kelly 5aa9731c9f GenexEval: Add abstracted access to link interface for a target.
This can be extended with special handling for static libraries
so that we can process the link dependencies separately from the
usage dependencies.
2013-07-08 00:00:17 +02:00
Kitware Robot 14eb4a1dc7 CMake Nightly Date Stamp 2013-07-07 00:01:03 -04:00
Kitware Robot dd24c60fe7 CMake Nightly Date Stamp 2013-07-06 00:01:03 -04:00
Kitware Robot bdc66ea7c5 CMake Nightly Date Stamp 2013-07-05 00:01:04 -04:00
Kitware Robot 1101350f76 CMake Nightly Date Stamp 2013-07-04 00:01:05 -04:00
Kitware Robot 287bbab7d4 CMake Nightly Date Stamp 2013-07-03 00:01:05 -04:00
Stephen Kelly 340535156d Add entire link interface transitive closure as target depends.
This was missing from commit 30962029 (Make targets depend on the
link interface of their dependees., 2012-12-26), which caused
only immeditate entries of the link interface to become target
depends.
2013-07-02 17:01:37 +02:00
Stephen Kelly 1925cffa08 Add a SYSTEM parameter to target_include_directories (#14180)
This is similar to the include_directories(SYSTEM) signature
in that it allows telling the compiler to ignore warnings from
such headers.
2013-07-02 16:40:03 +02:00
Stephen Kelly 286f227709 Extend the cmTargetPropCommandBase interface property handling.
This can be used to handle INTERFACE SYSTEM include directories
in particular.
2013-07-02 16:40:02 +02:00
Stephen Kelly 83498d4135 Store system include directories in the cmTarget.
Entries from the cmMakefile are processed and maintained similarly
to other include directories. The include_directories(SYSTEM)
signature affects all following targets, and all prior targets
in the same makefile.
2013-07-02 16:40:02 +02:00
Stephen Kelly f1fcbe3fde Add Target API to determine if an include is a system include.
The implementation can be modified later so that system includes
can be determined on a per-target basis.
2013-07-02 16:40:02 +02:00
Stephen Kelly 2679a34a94 Remove unused variable. 2013-07-02 16:40:02 +02:00
Brad King 0e9ff1cb3b Merge topic 'update-kwsys'
c314da0 Merge branch 'upstream-kwsys' into update-kwsys
2e3c935 KWSys 2013-07-01 (f6c4c247)
2013-07-02 09:05:14 -04:00
Brad King 357db89d27 Merge topic 'make-depends-collapse-paths'
551d334 cmDependsC: Collapse relative include paths
2013-07-02 09:03:52 -04:00
Brad King b6f01d4560 Merge topic 'vs-generator-brief-doc-update'
52f1464 VS: Clarify Visual Studio product year for each version
2013-07-02 08:38:57 -04:00
Robert Maynard 52f146414f VS: Clarify Visual Studio product year for each version
Add to the brief documentation of the Visual Studio 10, 11, and 12
generators the corresponding VS product year.  Clarify that VS11 is for
Visual Studio 2012, and VS12 is for Visual Studio 2013.
2013-07-02 08:24:38 -04:00
Kitware Robot 7b276a3b5d CMake Nightly Date Stamp 2013-07-02 00:01:03 -04:00
Brad King c314da004a Merge branch 'upstream-kwsys' into update-kwsys 2013-07-01 09:36:48 -04:00
Brad King 8a08ab051a Merge topic 'vs12-generator'
9a76d83 VS12: Find proper MSBuild for VSProjectInSubdir test
4e5cb39 Merge branch 'master' into vs12-generator
78fdbbc FindBoost: Add -vc120 mangling for VS 12
e99d7b1 VS12: Generate flag tables from MSBuild v120 tool files
77ac9b8 VS12: Add Visual Studio 12 generator (#14251)
2013-07-01 09:27:33 -04:00
Brad King 526f1e636e Merge topic 'clang-register-warnings'
e1381b1 Document removal of 'register' from flex/bison output
1399825 Remove some uses of obsolete 'register' storage specifier
2013-07-01 09:24:22 -04:00
Brad King 5f36fa98ff Merge topic 'AddAutomocTargetFolder'
ba0e06f automoc: add a global AUTOMOC_TARGETS_FOLDER property
2013-07-01 09:22:22 -04:00
Brad King 51406e2532 Merge topic 'DontStripImportLibs'
ae8e654 install: do not strip dll import libraries (#14123)
2013-07-01 09:21:28 -04:00
Brad King be9a80a088 Merge topic 'vs-windows-forms'
6c9712c VS: Add Resx configuration to the vcxproj file
2013-07-01 09:18:06 -04:00
Brad King 62428f5e72 Merge topic 'ninja_phony_targets'
539356f Ninja: Custom Command file depends don't need to exist before building
874e171 Ninja: GlobalNinjaGenerator WriteBuild and WritePhonyBuild non static
88d27ad Add a test to expose a bug with add_custom_command and ninja.
2013-07-01 09:15:09 -04:00
Brad King 07095e1ea7 Merge topic 'compiler-version-genex'
47a8db5 Add generator expressions for compiler versions.
2013-07-01 09:12:32 -04:00
Robert Maynard 539356f128 Ninja: Custom Command file depends don't need to exist before building
When converting custom commands for the ninja build system we
need to make sure that any file dependencies that exist in the build
tree are converted to phony targets. This tells ninja that these
files might not exist when starting the build, but could be generated
during the build.

This is done by tracking all dependencies for custom command targets.
After all have been written out we remove all items from the set
that have been seen as a target, custom command output, an alias,
or a file in the source directory. Anything that is left is considered
to be a file that will be generated as a side effect of another
custom command.
2013-07-01 09:01:01 -04:00
Robert Maynard 874e17120d Ninja: GlobalNinjaGenerator WriteBuild and WritePhonyBuild non static
To properly track the usage of dependencies that are generated at
compile time as the side effect of other build steps we need
to make the WriteBuild and WritePhonyBuild commands non static
2013-07-01 08:59:38 -04:00
Alex Neundorf ae8e6543a5 install: do not strip dll import libraries (#14123)
DLL import libraries exist specifically to have symbols.
2013-07-01 08:56:03 -04:00
Kitware Robot 6e77c2b586 CMake Nightly Date Stamp 2013-07-01 00:01:03 -04:00
Kitware Robot 0c8eee4144 CMake Nightly Date Stamp 2013-06-30 00:01:03 -04:00
Kitware Robot e021d33f9c CMake Nightly Date Stamp 2013-06-29 00:01:05 -04:00
Brad King 4e5cb398ae Merge branch 'master' into vs12-generator
Resolve conflicts in Tests/Preprocess/CMakeLists.txt by keeping
the side from 'master'.
2013-06-28 18:29:54 -04:00
Brad King e99d7b1c1f VS12: Generate flag tables from MSBuild v120 tool files
Run cmparseMSBuildXML.py on cl.xml, lib.xml, and link.xml to generate
our flag tables:

 python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/cl.xml" > cmVS12CLFlagTable.h
 python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/lib.xml" > cmVS12LibFlagTable.h
 python cmparseMSBuildXML.py -x ".../MSBuild/Microsoft.Cpp/v4.0/v120/1033/link.xml" > cmVS12LinkFlagTable.h

Fix up the declaration names at the top of each file.  Finally, teach
cmVisualStudio10TargetGenerator to select the version of the table
matching the version of VS.
2013-06-28 18:13:59 -04:00
Brad King 77ac9b8b9c VS12: Add Visual Studio 12 generator (#14251)
Copy cmGlobalVisualStudio11Generator to cmGlobalVisualStudio12Generator
and update version numbers accordingly.  Add the VS12 enumeration value.
Add module CMakeVS12FindMake to find MSBuild.  Look for MSBuild in its
now-dedicated Windows Registry entry.  Teach the platform module
Windows-MSVC to set MSVC12 and document the variable.  Teach module
InstallRequiredSystemLibraries to look for the VS 12 runtime libraries.

Teach tests CheckCompilerRelatedVariables, Preprocess, VSExternalInclude,
and RunCMake.GeneratorToolset to treat VS 12 as they do VS 10 and 11.

Inspired-by: Minmin Gong <minmin.gong@gmail.com>
2013-06-28 18:13:14 -04:00
Brad King e1381b1fc6 Document removal of 'register' from flex/bison output
In each .l and .y input file that has instructions for manual
transformation of the output to include a step to remove the 'register'
storage specifier.
2013-06-28 16:37:59 -04:00
Sean McBride 1399825cf9 Remove some uses of obsolete 'register' storage specifier
Remove the keyword from all Source/* files outside of KWSys.
2013-06-28 16:37:49 -04:00
Alex Neundorf ba0e06f250 automoc: add a global AUTOMOC_TARGETS_FOLDER property
This has been requested, along with a patch, by Shaun Williams
 in http://public.kitware.com/Bug/view.php?id=13788 .
It adds a global property AUTOMOC_TARGETS_FOLDER, which can
be used to group the automoc targets together in a folder e.g.
in Visual Studio.

Alex
2013-06-28 21:40:16 +02:00
Jonas Andersen 6c9712c47b VS: Add Resx configuration to the vcxproj file
In my project group we are using CMake to generate c++/cli winform
projects and I noticed the work done in commit 79ec7868 (VS: Add Windows
Forms Support, 2013-04-29) was in the right direction for solving some
of the problems we were facing.

The changes as submitted was breaking some functionality in our
projects, so I made some changes that fixes our problems and I believe
that it will also work for others.

* Resx files did not link correctly with the winform h-file so I added
  the Resx configuration to the vcxproj file.

* I removed the functionality for setting <CLRSupport> true for the
  project based on if an resx-file is pressent.  This is preventing
  us from using native cpp code.  Also this do not address that some
  projects will need to set other options like clr:pure, clr:safe.
  This could be implemented as a cmake option, so it is possible to
  specify exactly what is needed.  Existing VSWindowsFormsResx Test
  project is updated so it will be working with my changes.
2013-06-28 09:23:41 -04:00
Brad King daaf6283f5 Merge topic 'refactor-compile-options'
d221eac Refactor target COMPILE_OPTIONS and COMPILE_FLAGS handling
b6385ca Escape target flags taken from COMPILE_OPTIONS
0c9cc9a Embarcadero: Use response files only for includes, objects, and libs
2013-06-28 09:04:01 -04:00
Brad King 2ed149caef Merge topic 'update-kwsys'
063617c Merge branch 'upstream-kwsys' into update-kwsys
045fc84 KWSys 2013-06-24 (3d1d4e7c)
2013-06-28 09:03:55 -04:00
Brad King cff1bf48e7 Merge topic 'doc-ENV-syntax'
c293e05 Document ENV syntax as a "variable" (#14245)
2013-06-28 09:03:45 -04:00
Stephen Kelly 47a8db5bcd Add generator expressions for compiler versions.
New generator expressions allow retrieval of the version per language,
as well as equality comparison.
2013-06-28 14:32:58 +02:00
Kitware Robot 055a38bdaf CMake Nightly Date Stamp 2013-06-28 00:01:04 -04:00
Brad King d221eac812 Refactor target COMPILE_OPTIONS and COMPILE_FLAGS handling
Replace the cmLocalGenerator GetCompileOptions method with an
AddCompileOptions method since all call sites of the former simply
append the result to a flags string anyway.

Add a "lang" argument to AddCompileOptions and move the
CMAKE_<LANG>_FLAGS_REGEX filter into it.  Move the call sites in each
generator to a location that has both the language and configuration
available.  In the Makefile generator this also moves the flags from
build.make to flags.make where they belong.
2013-06-27 12:57:32 -04:00
Brad King b6385cabec Escape target flags taken from COMPILE_OPTIONS
Factor appending of individual flags out into an AppendFlagEscape method
in cmLocalGenerator and teach it to use EscapeForShell.  Update all
COMPILE_OPTIONS handling to use AppendFlagEscape.

Override the method in the Xcode generator to use its custom escape
implementation.

Teach the CompileOptions test to add an option that requires escaping
everywhere instead of just with the GNU tools.
2013-06-27 12:57:32 -04:00
Kitware Robot 297b42b0c4 CMake Nightly Date Stamp 2013-06-27 00:01:06 -04:00
Pavel Shramov 551d3343cd cmDependsC: Collapse relative include paths
While calculating dependencies collapse sequences such as

 ../../../a/b/c/../../d/e/../../e/f

to avoid total path lengths over the Windows path length limit as much
as possible.
2013-06-26 10:14:31 -04:00
Brad King 063617cd18 Merge branch 'upstream-kwsys' into update-kwsys 2013-06-26 09:52:46 -04:00
Brad King bef7c0251e Merge topic 'dag-LINKER_LANGUAGE'
ff015ee Genex: Report error if a target file is needed to evaluate link libraries.
b58aff9 Genex: Extend EvaluatingLinkLibraries to also check the top target name.
b1c19ce Genex: Make LINK_LANGUAGE report an error when evaluating link libraries.
0e1cb07 Add missing return after error report.
2013-06-26 09:03:05 -04:00
Brad King c1631efa0e Merge topic 'version-compare-genex'
e605528 Add generator expressions for version comparision.
48bb48e De-duplicate version comparison code.
2013-06-26 09:02:49 -04:00
Brad King 22fbeaa14b Merge topic 'export-COMPILE_OPTIONS-property'
77ff352 Generate INTERFACE_COMPILE_OPTIONS on export.
2013-06-26 09:02:10 -04:00
Brad King 1c51798940 Merge topic 'COMPILER_TARGET'
2d9ec1d Add compiler target compile options.
2013-06-26 09:01:57 -04:00
Brad King c293e05b8e Document ENV syntax as a "variable" (#14245)
Although "ENV" is not a special variable itself, use it to document
the $ENV{VAR} syntax.
2013-06-26 08:41:51 -04:00
Kitware Robot fdd558d6a6 CMake Nightly Date Stamp 2013-06-26 00:01:03 -04:00
Brad King aecacd093b Merge topic '13582_configured_file_regeneration'
ad50250 cmMakefile: Track configured files so we can regenerate them (#13582)
4a6397a Ninja: Track configured files so we can regenerate them.
2013-06-25 08:55:02 -04:00
Brad King 493489665e Merge topic 'makefile_AddCMakeOutputFile_signature'
6dbd4a5 cmMakefile: Refactor AddCMakeDependFile  and AddCMakeOutputFile.
2013-06-25 08:54:52 -04:00
Robert Maynard ad502502df cmMakefile: Track configured files so we can regenerate them (#13582)
Currently when a configured file is removed from the build directory,
running the build command will not regenerate the file. Now detect
this and will rerun cmake properly when a user issues the build
command.
2013-06-25 08:51:20 -04:00
Robert Maynard 4a6397a70c Ninja: Track configured files so we can regenerate them.
Unlike the Makefile generator the ninja generator did not tack any of
its output files, so if they are deleted the generator would not run.
2013-06-25 08:51:20 -04:00
Kitware Robot ade22ea7c6 CMake Nightly Date Stamp 2013-06-25 00:01:03 -04:00
Robert Maynard 6dbd4a5f17 cmMakefile: Refactor AddCMakeDependFile and AddCMakeOutputFile.
AddCMakeDependFile and AddCMakeOutputFile both store as std::string
and all calling sites use std::string. So instead of creating more
temporary objects, lets just use std::strings.
2013-06-24 10:43:20 -04:00
Stephen Kelly ff015ee11e Genex: Report error if a target file is needed to evaluate link libraries.
Constructs such as

 target_link_libraries(foo $<$<STREQUAL:$<TARGET_FILE:foo>,foo.so>:bar>)

segfault before this patch.
2013-06-24 16:22:15 +02:00
Stephen Kelly b58aff90c5 Genex: Extend EvaluatingLinkLibraries to also check the top target name.
This will allow testing whether we are evaluating the link libraries
of a particular target.
2013-06-24 16:22:15 +02:00
Stephen Kelly b1c19ce383 Genex: Make LINK_LANGUAGE report an error when evaluating link libraries. 2013-06-24 16:21:53 +02:00
Stephen Kelly 0e1cb07e84 Add missing return after error report. 2013-06-24 16:21:53 +02:00
Brad King 0bd82cb1a7 Merge topic 'config-dependent-CMAKE_AUTOMOC'
ea4d784 QtAutomoc: Use config-dependent compile definitions and includes.
67f6ceb QtAutomoc: Fix handling of list separator for compile definitions.
2013-06-24 08:47:03 -04:00
Brad King 0fd7d47138 Merge topic 'transitive-property-PP-FOR_EACH'
0d8db25 Use a preprocessor loop to manage the valid transitive properties.
2013-06-24 08:46:46 -04:00
Brad King 6d7b124f7b Merge topic 'find-targets-in-INTERFACE_COMPILE_OPTIONS'
8a3b5be Find targets in INTERFACE_COMPILE_OPTIONS when exporting for try_compile.
2013-06-24 08:46:34 -04:00
Brad King 37e34be0f5 Merge topic 'fix-COMPILE_OPTIONS-transitive-performance-regression'
477e413 Add missing 'seen' check for evaluating COMPILE_OPTIONS.
2013-06-24 08:46:22 -04:00
Brad King b2d70c1a20 Merge topic 'set-sysroot'
de4da66 Use --sysroot when cross compiling.
2013-06-24 08:46:12 -04:00
Brad King 059be4ba3b Merge topic 'add-whitespace'
2331b57 Add whitespace after colons in error messages.
2013-06-24 08:38:12 -04:00
Brad King 1576592d02 Merge topic 'openbsd-elf-parsing'
480e924 OpenBSD: Enable ELF parsing and editing (#14241)
2013-06-24 08:38:02 -04:00
Brad King c5c94269b6 Merge topic 'doc-E-tar-zip'
ae06f80 cmake: Document "-E tar" support for .zip (#14225)
2013-06-24 08:37:42 -04:00
Brad King bd2e3c7766 Merge topic 'add-cmake_host_system_information-command'
bb71a3a Add cmake_host_system_information command
2013-06-24 08:37:37 -04:00
Brad King 7bf42bf9cc Merge topic 'add-try_compile-options'
482f112 try_compile: Add signature to allow multiple SOURCES
2013-06-24 08:37:30 -04:00
Brad King 5b9b141ee6 Merge topic 'doc-search-install-prefix'
a0b37d7 Document CMAKE_INSTALL_PREFIX in CMAKE_SYSTEM_PREFIX_PATH
2013-06-24 08:37:22 -04:00
Brad King b1ef36a20a Merge topic 'split-command-sources'
b9f4383 Split cmBootstrapCommands.cxx into two sources
2013-06-24 08:37:18 -04:00
Brad King 64d14d3ddd Merge topic 'vs-TargetFrameworkVersion'
cfe6300 VS: Add support for .NET target framework version
2013-06-24 08:37:14 -04:00
Kitware Robot 299f50de00 CMake Nightly Date Stamp 2013-06-24 00:01:05 -04:00
Kitware Robot c12208fd79 CMake Nightly Date Stamp 2013-06-23 00:01:04 -04:00
Kitware Robot 8573748041 CMake Nightly Date Stamp 2013-06-22 00:01:04 -04:00
Stephen Kelly 2331b57bec Add whitespace after colons in error messages. 2013-06-21 16:21:44 +02:00
David Coppa 480e924dae OpenBSD: Enable ELF parsing and editing (#14241)
OpenBSD provides ELF ABI declarations in

 #include <stdint.h>
 #include <elf_abi.h>

Teach the platform check and cmELF implementation to use these.
2013-06-21 08:27:40 -04:00
Kitware Robot 9f160c5b0a CMake Nightly Date Stamp 2013-06-21 00:01:04 -04:00
Kitware Robot 7c61c73fbc CMake Nightly Date Stamp 2013-06-20 00:01:05 -04:00
Brad King ae06f80716 cmake: Document "-E tar" support for .zip (#14225)
Through use of libarchive internally we support .zip files as well as
.tar format.  The ExternalProject module makes use of this feature.
Document support officially.
2013-06-19 10:05:44 -04:00
Nils Gladitz bb71a3a0df Add cmake_host_system_information command
Expose the internal system information API to the CMake language.  For
example, it is useful to see how much memory the system has available to
estimate an upper limit of tests that can run in parallel.
2013-06-19 08:46:37 -04:00
Kitware Robot ee59089803 CMake Nightly Date Stamp 2013-06-19 00:01:05 -04:00
Kitware Robot 381c76da07 CMake Nightly Date Stamp 2013-06-18 00:01:04 -04:00
Brad King a0b37d7e3b Document CMAKE_INSTALL_PREFIX in CMAKE_SYSTEM_PREFIX_PATH
Add documentation to both variables to indicate that the install prefix
is also searched.
2013-06-17 08:40:44 -04:00
Kitware Robot dc43f7755d CMake Nightly Date Stamp 2013-06-17 00:01:04 -04:00
Kitware Robot 30d029ddd1 CMake Nightly Date Stamp 2013-06-16 00:01:03 -04:00
Kitware Robot 19df4595e2 CMake Nightly Date Stamp 2013-06-15 00:01:03 -04:00
Brad King dea8271840 Merge topic 'doc-enable_language-scope'
b3b57e7 enable_language: Clarify documentation
2013-06-14 09:01:39 -04:00
Brad King d556631079 Merge topic 'sha2-alignment'
75994d9 cmCryptoHash: Increase alignment of HashFile buffer
2013-06-14 09:01:22 -04:00
Brad King 1f8733a0c2 Merge topic 'FixEclipseCorruptProjects'
22f7934 Eclipse: fix #14204 and #14205: no file links to directories
2013-06-14 09:01:17 -04:00
Brad King bbaae3e421 Merge topic 'minor-cleanup'
e3b7eac Style: Don't put an else after a return.
ad304a2 cmSystemTools: Fix typo in comment.
08319e0 Genex: Fix indentation in docs.
2013-06-14 09:00:26 -04:00
Brad King f247474eb6 Merge topic 'remove_extra_matches'
dc03499 Do not set CMAKE_MATCH_ variables when not neeeded
2013-06-14 09:00:11 -04:00
Brad King bc3a7b61e2 Merge topic 'rpath-on-mac'
ff01f8b OS X: Improvements for getting install name of dylib.
2013-06-14 08:59:54 -04:00
Bill Hoffman dc03499595 Do not set CMAKE_MATCH_ variables when not neeeded
Each call to AddDefinition has overhead for variable watches and such.
Avoid extra calls when not needed.

This decreases the configure time for ParaView by 10 seconds on my
machine.  Without the change about 1,000,000 set-to-empty calls were
being made.  After the change it drops to about 100,000.
2013-06-14 08:46:14 -04:00
Brad King b9f4383f69 Split cmBootstrapCommands.cxx into two sources
The single translation unit has grown too large for some compilers.
Split it into cmBootstrapCommands1.cxx and cmBootstrapCommands2.cxx.
2013-06-14 08:35:52 -04:00
Christian Maaser cfe6300a41 VS: Add support for .NET target framework version
Teach CMake to generate the TargetFrameworkVersion XML node as
documented at

 http://msdn.microsoft.com/en-us/library/vstudio/ff770576.aspx

from target property VS_DOTNET_TARGET_FRAMEWORK_VERSION.
2013-06-14 08:09:00 -04:00
Kitware Robot 3aaf04365c CMake Nightly Date Stamp 2013-06-14 00:01:04 -04:00
Brad King 75994d953e cmCryptoHash: Increase alignment of HashFile buffer
The SHA512_Update implementation accesses input data via 64-bit
integers.  This requires alignment of the input buffer on some
architectures.  Align our stack-allocated buffer for file content to
satisfy this requirement.
2013-06-13 08:40:10 -04:00
Kitware Robot 82771f1862 CMake Nightly Date Stamp 2013-06-13 00:01:02 -04:00
Brad King b3b57e7a31 enable_language: Clarify documentation
Describe explicitly the scope in which enable_language must be
invoked to handle all direct and indirect uses of a language.

While at it, re-word documentation of the OPTIONAL keyword to
avoid confusion over its partial implementation.
2013-06-12 10:58:32 -04:00
Stephen Kelly e6055284b3 Add generator expressions for version comparision. 2013-06-12 14:09:36 +02:00
Stephen Kelly 48bb48e114 De-duplicate version comparison code.
Extend the VersionCompare in cmSystemTools to handle 8 components,
and port the if command to use that.
2013-06-12 14:09:36 +02:00
Stephen Kelly ea4d7848e5 QtAutomoc: Use config-dependent compile definitions and includes.
Instead of always using the includes and defines which are not
config-specific, ensure that the config specific ones can be used.

Task-number: #13589
2013-06-12 12:53:25 +02:00
Stephen Kelly 67f6cebb1e QtAutomoc: Fix handling of list separator for compile definitions. 2013-06-12 07:21:46 +02:00
Kitware Robot 9f460fe408 CMake Nightly Date Stamp 2013-06-12 00:01:03 -04:00
Alex Neundorf 22f7934a6e Eclipse: fix #14204 and #14205: no file links to directories
If a source file name is empty, or if it is a directory,
don't create a linked resource to it.

Alex
2013-06-11 22:50:38 +02:00
Stephen Kelly 2d9ec1dadf Add compiler target compile options.
For clang, this allows passing -target <triple> to the compiler, and
for qcc, -V<arch> using toolchain files containing something like

 set(triple arm-linux-gnueabihf)
 set(CMAKE_C_COMPILER "/usr/bin/clang")
 set(CMAKE_C_COMPILER_TARGET ${triple})
 set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
 set(CMAKE_CXX_COMPILER_TARGET ${triple})

or

 set(arch gcc_ntoarmv7le)
 set(CMAKE_C_COMPILER /opt/qnx650/host/linux/x86/usr/bin/qcc)
 set(CMAKE_C_COMPILER_TARGET ${arch})
 set(CMAKE_CXX_COMPILER /opt/qnx650/host/linux/x86/usr/bin/QCC)
 set(CMAKE_CXX_COMPILER_TARGET ${arch})

Both clang and qcc are inherently cross compiler( driver)s.
2013-06-11 14:41:16 +02:00
Stephen Kelly e3b7eac593 Style: Don't put an else after a return. 2013-06-11 10:50:00 +02:00
Stephen Kelly ad304a2f7d cmSystemTools: Fix typo in comment. 2013-06-11 09:52:30 +02:00
Stephen Kelly 08319e071e Genex: Fix indentation in docs. 2013-06-11 09:52:08 +02:00
Kitware Robot a2021e578c CMake Nightly Date Stamp 2013-06-11 00:01:04 -04:00
Stephen Kelly 77ff352aa7 Generate INTERFACE_COMPILE_OPTIONS on export.
This was missing from commit 80ca9c4b (Add COMPILE_OPTIONS target
property., 2013-05-16).
2013-06-10 16:50:20 +02:00
Stephen Kelly 0d8db250ce Use a preprocessor loop to manage the valid transitive properties.
Hopefully this will prevent regressions when adding further transitive
properties in the future.
2013-06-10 16:13:21 +02:00
Stephen Kelly 8a3b5bede8 Find targets in INTERFACE_COMPILE_OPTIONS when exporting for try_compile.
This was missing from commit 80ca9c4b (Add COMPILE_OPTIONS target
property., 2013-05-16).
2013-06-10 16:12:22 +02:00
Stephen Kelly 477e4136ef Add missing 'seen' check for evaluating COMPILE_OPTIONS.
Commit 089fe1c1 (Optimize genex evaluation for includes and
defines., 2013-02-01) introduced an optimization on DAG processing
to not reprocess properties on targets which have already been seen.

This was refactored slightly in commit 8dfdf1c7 (Fix the tests for
evaluating includes and defines., 2013-02-18), but was not extended
to cover COMPILE_OPTIONS in commit 80ca9c4b (Add COMPILE_OPTIONS target
property., 2013-05-16).

This omission causes the same performance regression in running
cmake on LLVM which 089fe1c1 fixed before, but this time for the
transitive evaluation of the COMPILE_OPTIONS property.
2013-06-10 15:46:51 +02:00
Kitware Robot 9ac601618e CMake Nightly Date Stamp 2013-06-10 00:01:02 -04:00
Kitware Robot adfe9b3805 CMake Nightly Date Stamp 2013-06-09 00:01:03 -04:00
Kitware Robot 63e7137af5 CMake Nightly Date Stamp 2013-06-08 00:01:03 -04:00
Stephen Kelly de4da665d3 Use --sysroot when cross compiling.
As CMAKE_ROOT_FIND_PATH can be a list, a new CMAKE_SYSROOT is
introduced, which is never a list.

The contents of this variable is passed to supporting compilers
as --sysroot. It is also accounted for when processing implicit
link directories reported by the compiler, and when generating
RPATH information.
2013-06-07 13:32:52 +02:00
Kitware Robot e7fc1c600e CMake Nightly Date Stamp 2013-06-07 00:01:04 -04:00
Brad King 482f1122ad try_compile: Add signature to allow multiple SOURCES
Extend the signature

 try_compile(RESULT_VAR <bindir> <srcfile> ...)

to allow multiple sources as

 try_compile(RESULT_VAR <bindir> SOURCES <srcfile>... ...)

Process the sources to generate a CMakeLists.txt that enables all needed
languages.

Teach the TryCompile test to try cases with two sources of the same
language and of mixed languages.  Teach RunCMake.try_compile to cover
error cases for the signature.
2013-06-06 14:35:20 -04:00
Kitware Robot bb879bcf2d CMake Nightly Date Stamp 2013-06-06 00:01:04 -04:00
Clinton Stimpson ff01f8b600 OS X: Improvements for getting install name of dylib.
In the case of a multi-arch dylib where none of the architectures
is the host architecture, otool -D returned multiple install names.
2013-06-05 21:31:11 -06:00
Brad King d3c8688ecd Merge topic 'fix-genex-HEAD-target'
5b22235 Genex: Fix the HEAD target used for evaluated expressions
2013-06-05 09:54:20 -04:00
Brad King aa025cc60a Merge topic 'xcode-framework-paths'
21a0bea Xcode: Fix framework search paths in STATIC library targets (#14191)
2013-06-05 09:39:52 -04:00
Brad King 31a0220397 Merge topic 'update-kwsys'
c91e88d Merge branch 'upstream-kwsys' into update-kwsys
6dc3dd9 KWSys 2013-06-03 (d79a792e)
2013-06-05 09:39:41 -04:00
Brad King bf57982f7b Merge topic 'doc-CMAKE_PARENT_LIST_FILE'
b62d440 Docs: Clarify CMAKE_PARENT_LIST_FILE (#14194)
2013-06-05 09:39:27 -04:00
Brad King 21b1026541 Merge topic 'suppress-unused-cli-with-value-in-cache'
273ecab CLI: Suppress the unused warning if the key value pair is cached.
2013-06-05 09:39:18 -04:00
Brad King 2cd8a6a3c6 Merge topic 'cleanups'
9efe359 Add some spaces to the INCLUDE_DIRECTORIES documentation.
db15713 Remove unused cmAddDefinitionsCommand::ParseDefinition method.
2013-06-05 09:39:12 -04:00
Brad King 93317839b0 Merge topic 'add_compile_options-command'
a984f32 Introduce add_compile_options command.
2013-06-05 09:39:05 -04:00
Brad King ff8917fdd2 Merge topic 'VISIBILITY_PRESET-property'
cd1fa53 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.
0e9f4bc Introduce target property <LANG>_VISIBILITY_PRESET
2013-06-05 09:38:59 -04:00
Stephen Kelly 5b222354de Genex: Fix the HEAD target used for evaluated expressions
If the expression $<TARGET_PROPERTY:prop> appears in the content
of a target property, the target that prop is read from is
the 'head target' of the expression. In contexts such as evaluating
the content of a target property during generation, such
as INCLUDE_DIRECTORIES, the 'head target' is the one on which the
initial request was made.

If evaluating a generator expression which is not a target property
content, the target must be explicitly specified. Such contexts
include add_custom_command and file(GENERATE). The content might
then look like

 $<TARGET_PROPERTY:tgt,prop>

However, as there is no HeadTarget set, any generator expressions
evaluated as part of reading prop from tgt which do not specify
the tgt directly report an error.

Modify the logic of the TARGET_PROPERTY generator expression so
that in such contexts, the 'head target' is set to the appropriate
target which was first encountered.
2013-06-05 09:05:00 -04:00
Kitware Robot 4d15c0b7c6 CMake Nightly Date Stamp 2013-06-05 00:01:08 -04:00
Brad King 21a0beacc1 Xcode: Fix framework search paths in STATIC library targets (#14191)
In commit 2bc22bda (Xcode: Add frameworks search paths from link
dependeny closure, 2012-12-07) we made framework search paths from the
link closure conditional on target type, skipping it on STATIC and
OBJECT library targets that do not actually link.  However, the
framework search paths also influence the compile lines (-F options) so
we need them for all target types.  The Makefile generator already does
this, as did the Xcode generator prior to the above-mentioned commit.
2013-06-04 09:49:40 -04:00
Brad King c91e88d0e1 Merge branch 'upstream-kwsys' into update-kwsys 2013-06-04 09:08:58 -04:00
Brad King d3971ee603 Merge topic 'fix-variable_watch-cases'
647745b variable_watch: Print accesses as "CMake Debug Log" messages
515f9af variable_watch: Remove leftover debugging code (#14187)
c63d300 variable_watch: Add test for MODIFIED_ACCESS report
3d5bb38 variable_watch: Add missing string enumeration entry (#14188)
2013-06-04 09:03:00 -04:00
Brad King 1e15db3662 Merge topic 'update-kwsys'
9d38db5 bootstrap: Compile KWSys SystemTools with UTIME(S|NSAT) values
884e3ed Merge branch 'upstream-kwsys' into update-kwsys
d66f6f3 KWSys 2013-05-31 (dccf7725)
2013-06-04 09:02:52 -04:00
Brad King 05e47f2122 Merge topic 'cfbundle-location'
483e208 OS X:  Fix getting of CFBundle LOCATION property.
2013-06-04 09:02:46 -04:00
Brad King b62d440ea8 Docs: Clarify CMAKE_PARENT_LIST_FILE (#14194)
Fix the wording of the documentation for CMAKE_PARENT_LIST_FILE to
clarify that it only applies to the include stack in the current
directory.  Specify exactly what commands can include files instead of
saying "somehow invoke".
2013-06-04 08:18:15 -04:00
Stephen Kelly 273ecab96d CLI: Suppress the unused warning if the key value pair is cached.
It is common to specify a CMAKE_TOOLCHAIN_FILE and get a warning
for using it despite it not being used.

The WarnUnusedCliUnused test relies on the warning being emitted
each time cmake is run on an existing build. That behavior is changed
by this patch to warn only on the first invokation of CMake, and not
on subsequent invokations (because the variable is in the cache with
the same value). For that test, a clean target is added which clears
the cache and cause the warning to be emitted each time.

As the Ninja generator does not support the feature needed to test
this, it is not tested with that generator.
2013-06-04 12:38:56 +02:00
Stephen Kelly 9efe35906a Add some spaces to the INCLUDE_DIRECTORIES documentation. 2013-06-04 12:00:41 +02:00
Stephen Kelly db15713f05 Remove unused cmAddDefinitionsCommand::ParseDefinition method. 2013-06-04 12:00:32 +02:00
Stephen Kelly a984f3257e Introduce add_compile_options command.
This command is similar to add_definitions, in that it affects
the compile options of all targets which follow it. The implementation
is similar to the implementation of the include_directories command,
in that it is based on populating a COMPILE_OPTIONS directory property
and using that to initialize the same property on targets.

Unlike the include_directories command however, the add_compile_options
command does not affect previously defined targets. That is, in
the following code, foo will not be compiled with -Wall, but bar
will be:

 add_library(foo ...)
 add_compile_options(-Wall)
 add_library(bar ...)
2013-06-04 11:36:55 +02:00
Kitware Robot 00c3840cc8 CMake Nightly Date Stamp 2013-06-04 00:01:05 -04:00
Brad King 647745b3ee variable_watch: Print accesses as "CMake Debug Log" messages
Use makefile->IssueMessage() to print the unprocessed watch message in a
format consistent with other CMake messages and with a more complete
call stack for the access.
2013-06-03 13:19:59 -04:00
Brad King 515f9af0d4 variable_watch: Remove leftover debugging code (#14187)
When a watch does not specify a command to call then variable_watch
prints out a message to stderr.  Remove code after that which collects
all variable values to construct a message that is never printed.
Otherwise such code causes a READ_ACCESS watch to trigger on all
variables in the currents scope.

Reported-by: Yichao Yu <yyc1992@gmail.com>
2013-06-03 13:13:07 -04:00
Brad King 884e3edeb1 Merge branch 'upstream-kwsys' into update-kwsys 2013-06-03 10:23:31 -04:00
Yichao Yu 3d5bb381be variable_watch: Add missing string enumeration entry (#14188)
In commit 9a5b4eba (All variable accesses should produce watch
callbacks, 2007-05-17) we added a new enumeration value but did not
update the list of strings matching them.  Add the missing entry.
Without this, variable_watch prints REMOVED_ACCESS instead of
MODIFIED_ACCESS when set the value of the variable.
2013-06-03 10:20:08 -04:00
Brad King e57b6a2521 Merge topic 'target-COMPILE_OPTIONS'
24466f2 Add target_compile_options command.
80ca9c4 Add COMPILE_OPTIONS target property.
7cb2308 cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries
47f80d9 cmTarget: Rename struct to be more re-usable.
1319a14 Add <LANG>_COMPILER_ID generator expressions.
3549676 Add cmLocalGenerator::GetCompileOptions.
f3ad863 VS6: Rename some variables to correspond to config values.
2013-06-03 09:57:44 -04:00
Brad King bcc29c56a5 Merge topic 'refactor-try_compile-argument-processing'
d06db7e try_compile: Refactor argument processing
b680824 try_compile: Add test for bad call error cases
2013-06-03 09:57:39 -04:00
Brad King 90441b289d Merge topic 'vs-RootNamespace'
cca955a VS: Add VS_GLOBAL_ROOTNAMESPACE target property
2013-06-03 09:57:32 -04:00
Brad King db5f5243b5 Merge topic 'fix-style'
e162326 Fix indentation.
2013-06-03 09:57:27 -04:00
Brad King 6d4e79e2c3 Merge topic 'qt4-qt5-CMAKE_AUTOMOC'
fa55751 QtAutomoc: Get the Qt version through the target link interface
f776316 Use the qt5::moc imported target instead of a variable.
2013-06-03 09:57:01 -04:00
Brad King 3caf565d07 Merge topic 'rpath-on-mac'
dc1d025 OS X: Add test for rpaths on Mac.
8576b3f OS X: Add support for @rpath in export files.
00d71bd Xcode: Add rpath support in Xcode generator.
94e7fef OS X: Add RPATH support for Mac.
2013-06-03 09:56:44 -04:00
Brad King d444fea163 Merge topic 'xcode-shlib-versioning'
cbe3f20 Xcode: Add support for shared library versioning
2013-06-03 09:56:37 -04:00
Brad King b0759da303 Merge topic 'framework-refactor'
373faae Refactor how bundles and frameworks are supported.
2013-06-03 09:56:32 -04:00
Clinton Stimpson 8576b3f978 OS X: Add support for @rpath in export files.
Also expand the IMPORTED_SONAME property for targets
to match the install_name.
2013-06-03 09:42:05 -04:00
Clinton Stimpson 00d71bdd19 Xcode: Add rpath support in Xcode generator. 2013-06-03 09:42:05 -04:00
Clinton Stimpson 94e7fef226 OS X: Add RPATH support for Mac.
RPATH support is activated on targets that have the MACOSX_RPATH
property turned on.
For install time, it is also useful to set INSTALL_RPATH to help
find dependent libraries with an @rpath in their install name.

Also adding detection of rpath conflicts when using frameworks.
2013-06-03 09:42:05 -04:00
Clinton Stimpson 483e208482 OS X: Fix getting of CFBundle LOCATION property.
This fixes bug #13797.
The kinds of changes applied in 373faae5 for frameworks are now
applied to CFBundle.  The prefix and suffix for CFBundles are
now handled in cmTarget::GetFullNameInternal.
2013-06-03 06:29:33 -06:00
Kitware Robot 3c7e09eb8e CMake Nightly Date Stamp 2013-06-03 00:01:05 -04:00
Stephen Kelly cd1fa537a0 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.
This corresponds to the g++ and clang++
option -fvisibility-inlines-hidden on linux. On Windows with MinGW,
this corresponds to -fno-keep-inline-dllexport. That option is
not supported by clang currently.
2013-06-02 12:00:51 +02:00
Stephen Kelly 0e9f4bc00c Introduce target property <LANG>_VISIBILITY_PRESET
This is initialized by CMAKE_<LANG>_VISIBILITY_PRESET. The target
property is used as the operand to the -fvisibility= compile option
with GNU compilers and clang.
2013-06-02 12:00:51 +02:00
Stephen Kelly 24466f22c0 Add target_compile_options command.
This command populates the COMPILE_OPTIONS target property.
2013-06-02 11:56:37 +02:00
Stephen Kelly 80ca9c4b41 Add COMPILE_OPTIONS target property.
This method reads generator expressions from the COMPILE_OPTIONS
target property, as well as INTERFACE_COMPILE_OPTIONS from linked
dependents.
2013-06-02 11:56:37 +02:00
Stephen Kelly 7cb23084b2 cmTarget: Rename LinkInterfaceIncludeDirectoriesEntries
This can be used for COMPILE_OPTIONS too.
2013-06-02 11:56:37 +02:00
Stephen Kelly 47f80d9c43 cmTarget: Rename struct to be more re-usable.
The same struct can be used to represent COMPILE_OPTIONS content.
2013-06-02 11:56:36 +02:00
Stephen Kelly 1319a147bd Add <LANG>_COMPILER_ID generator expressions.
These expressions evaluate to the id of the compiler used to build
the target, or can be used to test if the compiler id matches a
specified value.
2013-06-02 11:56:36 +02:00
Stephen Kelly 35496761a5 Add cmLocalGenerator::GetCompileOptions.
Currently it only adds the contents of the COMPILE_FLAGS target
property, but it can be extended to handle a new COMPILE_OPTIONS
generator expression enabled property.
2013-06-02 11:56:36 +02:00
Stephen Kelly f3ad863ae6 VS6: Rename some variables to correspond to config values.
This simplifies population of the compile flags.
2013-06-02 11:56:36 +02:00
Kitware Robot a4d8c64d10 CMake Nightly Date Stamp 2013-06-02 00:01:03 -04:00
Kitware Robot 86f5460398 CMake Nightly Date Stamp 2013-06-01 00:01:03 -04:00
Brad King d06db7ebe8 try_compile: Refactor argument processing
Process all arguments in a single loop using a simple state machine.
While at it, fix some error message typos.  Also allow LINK_LIBRARIES
with no actual libraries to disable use of the -DLINK_LIBRARIES=...
from the CMAKE_FLAGS.  This was already possible in the old logic if
LINK_LIBRARIES was immediately followed by another keyword argument
instead of the end of the argument list, so allow it in general.
Update the RunCMake.try_compile test cases accordingly.
2013-05-31 10:01:50 -04:00
Brad King 5377ac4289 Merge topic 'fix-try_compile-library-spaces'
e537544 try_compile: Trim whitespace from LINK_LIBRARIES entries
2013-05-31 09:33:54 -04:00
Brad King 7b8a4c3e6f Merge topic 'fix-INCLUDE_DIRECTORIES-genex-read'
3aa9ce4 GenexEval: Fix evaluation of INCLUDE_DIRECTORIES target property.
0b39fef GenexEval: Extract a getLinkedTargetsContent from TargetPropertyNode.
53164ac cmTarget: Remove some hardcoding of transitive property names.
2013-05-31 09:33:22 -04:00
John Farrier cca955a27c VS: Add VS_GLOBAL_ROOTNAMESPACE target property
Add a setting for Visual Studio projects for the root namespace in the
"Globals" PropertyGroup section of the project file.
2013-05-31 09:15:30 -04:00
Kitware Robot 4836c5ab48 CMake Nightly Date Stamp 2013-05-31 00:01:05 -04:00
Stephen Kelly 3aa9ce441f GenexEval: Fix evaluation of INCLUDE_DIRECTORIES target property.
This property should come from the content of the property itself,
plus the INTERFACE_INCLUDE_DIRECTORIES of the link *implementation*.

In contrast, when the INTERFACE_INCLUDE_DIRECTORIES is evaluated for
a target, the INTERFACE_INCLUDE_DIRECTORIES of the link *interface*
is used.

Similar logic applies for the COMPILE_DEFINITIONS target properties.

If the propertyName is already an INTERFACE_ variant of the property,
ie, the expression is similar to

 $<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES>

then the INTERFACE_INCLUDE_DIRECTORIES of the link *interface* of foo
is used.

However, if the propertyName is not an INTERFACE_ variant, and the
interfacePropertyName is, ie, the expression is similar to:

 $<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES>

then the INTERFACE_INCLUDE_DIRECTORIES of the link *implementation*
of foo is used.
2013-05-30 15:43:42 +02:00
Stephen Kelly 0b39fefeac GenexEval: Extract a getLinkedTargetsContent from TargetPropertyNode.
This will be used to process transitive components of properties
which depend on linked targets. Currently only the link interface
of the target can be used as the source of the linked targets, but
in the next commit it will be possible to use the link implementation
as the source of link targets.

This commit does not change the semantics of the code.
2013-05-30 15:43:42 +02:00
Stephen Kelly 53164ac997 cmTarget: Remove some hardcoding of transitive property names. 2013-05-30 15:43:37 +02:00
Brad King d721a9cf6a Merge topic 'update-kwsys'
2c0c59a Merge branch 'upstream-kwsys' into update-kwsys
9270129 KWSys 2013-05-29 (725e541e)
2013-05-30 08:57:23 -04:00
Stephen Kelly e5375442ff try_compile: Trim whitespace from LINK_LIBRARIES entries
Commit e65ef08b (try_compile: Fix quoting of libraries in generated
CMakeLists.txt, 2013-05-24) added quoting to entries specified in
the LINK_LIBRARIES. However, if the input entries contain whitespace
padding, that quoted whitespace causes an error in the generated
CMakeLists.txt at target_link_libraries.

Strictly, it is an error to have space separated entries in the
CMAKE_REQUIRED_LIBRARIES, as it was never properly handled by
CMakeExpandImportedTargets even prior to commit 236133e7 (Handle
targets in the LINK_LIBRARIES of try_compile., 2013-02-09). However,
it is causing a regression in KDE code which tests the next branch.
2013-05-30 13:50:37 +02:00
Kitware Robot fafa66c7f0 CMake Nightly Date Stamp 2013-05-30 00:01:03 -04:00
Clinton Stimpson cbe3f2072b Xcode: Add support for shared library versioning
Add a post-build command to shared library targets to create the
versioning symbolic links.
2013-05-29 09:05:00 -04:00
Brad King 2c0c59a2e1 Merge branch 'upstream-kwsys' into update-kwsys 2013-05-29 08:56:20 -04:00
Stephen Kelly e162326128 Fix indentation. 2013-05-29 08:40:00 +02:00
Kitware Robot 6927b25aff CMake Nightly Date Stamp 2013-05-29 00:01:03 -04:00
Brad King 590a41ba0e Merge topic 'fix-try_compile-library-spaces'
e65ef08 try_compile: Fix quoting of libraries in generated CMakeLists.txt
2013-05-28 10:42:40 -04:00
Brad King be85fa4a89 Merge topic 'genex-generate-file'
b983a58 file: Add GENERATE command to produce files at generate time
2013-05-28 10:42:18 -04:00
Kitware Robot 97c2166de4 CMake Nightly Date Stamp 2013-05-28 00:01:05 -04:00
Stephen Kelly fa55751f83 QtAutomoc: Get the Qt version through the target link interface
In Qt 5.1, Qt5::Core has a INTERFACE_QT_MAJOR_VERSION property
of '5', and since CMake 2.8.11, Qt4::QtCore has an
INTERFACE_QT_MAJOR_VERSION of '4'. This was introduced in
commit 4aa10cd6 (FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for
Qt4::QtCore, 2013-03-16), to produce an error if Qt 4 and Qt 5
are erroneously used by the same target. This can also be used
however to determine the Qt major version, and therefore the
particular moc executable to use during automoc steps. This means
that targets in a single buildsystem can use a selection of Qt 4
and Qt 5, and still take advantage of the CMAKE_AUTOMOC feature
without conflicting.
2013-05-28 01:19:37 +02:00
Stephen Kelly f776316721 Use the qt5::moc imported target instead of a variable.
The variable is provided in the Qt5 config files only for compatibility
with this automoc feature, so use the more-future-proof method instead.
2013-05-27 20:56:07 +02:00
Kitware Robot ab7cd03cea CMake Nightly Date Stamp 2013-05-27 00:01:02 -04:00
Kitware Robot fe1584f276 CMake Nightly Date Stamp 2013-05-26 00:01:05 -04:00
Kitware Robot a3a82b5ed7 CMake Nightly Date Stamp 2013-05-25 00:01:08 -04:00
Brad King e65ef08bf2 try_compile: Fix quoting of libraries in generated CMakeLists.txt
Since commit 236133e7 (Handle targets in the LINK_LIBRARIES of
try_compile, 2013-02-09) libraries passed to the new LINK_LIBRARIES
option of try_compile are not quoted inside the generated CMakeLists.txt
file.  Quote the library names so they re-parse correctly when loaded by
CMake to configure and generate the test project.

Reported-by: Bogdan Cristea <cristeab@gmail.com>
2013-05-24 16:30:26 -04:00
Brad King 14d90d81de Merge topic 'language-generator-expressions'
3241014 Add $<LINK_LANGUAGE> generator expression
2013-05-24 09:19:15 -04:00
Stephen Kelly 32410140a7 Add $<LINK_LANGUAGE> generator expression
They can't be used when evaluating link libraries, but they can be
used for include directories and compile definitions. Later they can
be used for compile options.
2013-05-24 09:06:53 -04:00
Stephen Kelly b983a58bdf file: Add GENERATE command to produce files at generate time
The idea is to write to a temp file which contains generator
expressions, and at generate time, evaluate the generator expressions,
and write the result to a file.

Because executables on Windows are limited in the length of command line
it is possible to use, it is common to write command line arguments to a
file instead and specify the file as a source of arguments.

This new FILE(GENERATE) subcommand allows the use of generator
expressions to create such files so that they can be used with
add_custom_command for example.
2013-05-24 09:02:45 -04:00
Kitware Robot 3cc5d3883e CMake Nightly Date Stamp 2013-05-24 00:01:04 -04:00
Brad King 711073e8c6 Merge topic 'xcode-attributes-variant'
332350b Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)
2013-05-23 10:52:31 -04:00
Brad King 79e40f830f Merge topic 'xcode-shared-linker-flags-per-config'
bcda47d Xcode: Honor CMAKE_(MODULE|SHARED)_LINKER_FLAGS_<CONFIG> (#14161)
2013-05-23 10:52:17 -04:00
Clinton Stimpson 373faae5e1 Refactor how bundles and frameworks are supported.
Make handling of directory separators consistent between
non-bundle and bundle code.

Remove xcode specific flag from cmTarget when getting install_name.

Add (more) consistent convenience functions in cmTarget to get
directories inside of bundles and frameworks to add files to.

This refactor also fixes bug #12263 where frameworks
had the wrong install name when SKIP_BUILD_RPATH.

Also make install_name for frameworks consistent between Makefile
and Xcode generator.
2013-05-23 10:42:49 -04:00
Kitware Robot 5361270c6e CMake Nightly Date Stamp 2013-05-23 00:01:05 -04:00
Cédric OCHS 332350b9c4 Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)
Since commit c519bb2b (XCode: Also qoute [] as needed to set
build-configurations, 2011-04-05) we escape "[]" conditions for
XCODE_ATTRIBUTE_ settings.  However, we need to handle the "variant"
condition with a special case to map it only into the settings for the
matching configuration.
2013-05-22 15:20:10 -04:00
Brad King 3db29d2724 Merge topic 'join-genex'
a7ba452 Add the JOIN generator expression.
96ec314 Make it possible for any genex to have arbitrary content at the end.
bd638ee Rename the method determining if a genex accepts arbitrary content.
dc742fe Extract the ProcessArbitraryContent method.
2013-05-22 13:35:15 -04:00
Brad King ee334b6a0a Merge topic 'LinkLine-typedef'
776225d cmTarget: drop the unused local typedef LinkLine
2013-05-22 13:06:21 -04:00
Brad King 620599e25a Merge topic 'wizard-cleanup'
eca523f wizard: simplify control flow
f1d27bf wizard: fix warnings
2013-05-22 13:06:13 -04:00
Brad King 12eab7420d Merge topic 'ctest-parallel-env'
db43502 CTest: Read CTEST_PARALLEL_LEVEL from environment
2013-05-22 13:05:47 -04:00
Brad King 2da5b51b0c Merge topic 'string-MAKE_C_IDENTIFIER-subcommand'
0ab50ae string: Add MAKE_C_IDENTIFIER subcommand
2013-05-22 13:05:29 -04:00
Brad King fe4c1fb32e Merge topic 'add-EXPORT_NAME-property'
b5d6f5d Add EXPORT_NAME property.
2013-05-22 13:05:17 -04:00
Rolf Eike Beer 776225d379 cmTarget: drop the unused local typedef LinkLine 2013-05-22 12:54:57 -04:00
Rolf Eike Beer eca523fbd4 wizard: simplify control flow
Checking if a byte is 0 before checking it for something else doesn't do
anything useful. Also one can be sure that it can't be anything wanted
if the value was set to 0 immediately before.
2013-05-22 12:52:12 -04:00
Matthew Bentham bcda47d2a0 Xcode: Honor CMAKE_(MODULE|SHARED)_LINKER_FLAGS_<CONFIG> (#14161)
Refactor lookup of CMAKE_(EXE|MODULE|SHARED)_LINKER_FLAGS(|_<CONFIG>)
variables to ensure all combinations are handled.  Use the helper method
AddConfigVariableFlags to simplify the implementation.
2013-05-22 11:48:01 -04:00
Kitware Robot d337cb402f CMake Nightly Date Stamp 2013-05-22 00:01:06 -04:00
Rolf Eike Beer f1d27bf667 wizard: fix warnings
.../Source/cmakewizard.cxx: In member function ‘virtual void cmakewizard::AskUser(const char*, cmCacheManager::CacheIterator&)’:
.../Source/cmakewizard.cxx:31:35: warning: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Wconversion]
   if(!fgets(buffer, sizeof(buffer)-1, stdin))
                                   ^
.../Source/cmakewizard.cxx: In member function ‘virtual bool cmakewizard::AskAdvanced()’:
.../Source/cmakewizard.cxx:70:35: warning: conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Wconversion]
   if(!fgets(buffer, sizeof(buffer)-1, stdin))

The compiler is (partly) right here: sizeof() returns a size_t, which often is
bigger as as int as it is unsigned long or something similar. Add an explicit
cast to get rid of that warning here, the buffer has a size of 4KiB, so the
value will fit into an int on all sane platforms.
2013-05-21 23:33:54 +02:00
Stephen Kelly 0ab50aea4c string: Add MAKE_C_IDENTIFIER subcommand 2013-05-21 15:29:34 -04:00
Stephen Kelly db43502326 CTest: Read CTEST_PARALLEL_LEVEL from environment
If no explicit "-j <n>" option is given on the command line then read
the parallel level from an environment variable.
2013-05-21 15:27:09 -04:00
Brad King 4825d70e83 Merge topic 'fix-include_directories-whitespace-handling'
2f84dfe include_directories: Fix handling of empty or space-only entries
2013-05-21 15:22:27 -04:00
Stephen Kelly 2f84dfec93 include_directories: Fix handling of empty or space-only entries
This is a regression introduced in commit 0d46e9a0 (Store includes
from the same include_directories call together., 2013-01-20).

Reported at

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/46695/focus=7847
2013-05-21 15:20:46 -04:00
Brad King d2cd362c31 Merge topic 'fix-genex-comma-parse'
05bf972 Fix handling of commas in arbitrary content in genexes.
2013-05-21 15:19:26 -04:00
Brad King e41ef3d339 Merge topic 'unused-cleanup'
994dc70 Remove unused vector population.
44258cc Remove unused typedef.
0a4d7d8 Remove unused marker for a variable which is now used.
2013-05-21 15:19:22 -04:00
Brad King bdb0bab8ee Merge topic 'vs-asm-listing-location'
7e0c45e VS: Allow /Fa to set AssemblerListingLocation (#14153)
2013-05-21 15:14:19 -04:00
Brad King 1dbf0aac1b Merge topic 'fix-style'
3c7c332 Fix brace indentation.
c70b9b5 Fix style.
2013-05-21 15:13:49 -04:00
Brad King 5947d03987 Merge topic 'error-on-exported-missing-include-dir'
eabefa8 Error on relative path in INCLUDE_DIRECTORIES target property.
2013-05-21 15:13:26 -04:00
Brad King 52f9b2e803 Merge topic 'shared-libs-with-number-suffix'
342fc04 Recognize shared library files with a numerical suffix
2013-05-21 15:13:10 -04:00
Brad King 02ba802977 Merge topic 'cmake-help-generators-fix'
dea4d26 Docs: cmake -G selects a "build system" generator
2013-05-21 15:13:02 -04:00
Brad King a784e6f9f7 Merge topic 'fix-sublime-source-flags'
8e94767 Sublime: Honor source-level COMPILE_FLAGS property
2013-05-21 15:12:58 -04:00
Brad King f292ffb62c Merge topic 'vs-windows-forms'
79ec786 VS: Add Windows Forms Support
2013-05-21 15:12:48 -04:00
Stephen Kelly eabefa8b02 Error on relative path in INCLUDE_DIRECTORIES target property.
Add policy CMP0021 to preserve existing behavior in projects expecting
it from earlier CMake versions.
2013-05-21 14:59:17 -04:00
Stephen Kelly 342fc04010 Recognize shared library files with a numerical suffix
When processing link line entries we check for matches with known naming
patterns for static and shared libraries.  Teach this logic to recognize
numerical suffixes after shared library names such as "libfoo.so.1".
2013-05-21 14:50:16 -04:00
Stephen Kelly dea4d263d3 Docs: cmake -G selects a "build system" generator
-G is not only for makefile generators.
2013-05-21 14:43:42 -04:00
Stephen Kelly 8e947670cf Sublime: Honor source-level COMPILE_FLAGS property
Make the code match the comment.
2013-05-21 14:42:14 -04:00
Kitware Robot f206cce2ca CMake Nightly Date Stamp 2013-05-21 00:01:03 -04:00
Stephen Kelly 994dc70bc4 Remove unused vector population.
The call to GetEnabledLanguages does not have side-effects.
2013-05-20 17:47:21 +02:00
Brad King 7e0c45e9cf VS: Allow /Fa to set AssemblerListingLocation (#14153)
Generate the default AssemblerListingLocation through the flag map so
that it can be overridden by a user /Fa flag.  Also teach the VS 7-9
generators to map /Fa to AssemblerListingLocation.

While at it, fix the AssemblerListingLocation default value to have a
trailing slash after the configuration name.  This ensures it will be
treated as a directory and not a file name.
2013-05-20 08:40:09 -04:00
Kitware Robot 5261fde940 CMake Nightly Date Stamp 2013-05-20 00:01:03 -04:00
Kitware Robot 03071d30fe CMake Nightly Date Stamp 2013-05-19 00:01:03 -04:00
Stephen Kelly b5d6f5dd5b Add EXPORT_NAME property.
This allows for example, the buildsystem to use names like 'boost_any'
instead of the overly generic 'any', and still be able to generate
IMPORTED targets called 'boost::any'.
2013-05-18 10:00:48 +02:00
Stephen Kelly 3c7c332929 Fix brace indentation. 2013-05-18 09:54:50 +02:00
Kitware Robot cd82e3f8f5 CMake Nightly Date Stamp 2013-05-18 00:01:04 -04:00
Stephen Kelly 44258cc26c Remove unused typedef. 2013-05-17 09:01:01 +02:00
Kitware Robot edeabd18e6 CMake Nightly Date Stamp 2013-05-17 00:01:04 -04:00
Brad King 5e993a2822 Merge topic 'fix-moc-with-empty-COMPILE_DEFINITIONS'
33ed186 automoc: Read target defines unconditionally
2013-05-16 14:48:01 -04:00
Stephen Kelly 33ed186fce automoc: Read target defines unconditionally
Commit 429e3699 (Process COMPILE_DEFINITIONS as generator expressions
in QtAutomoc., 2013-01-25) introduced a check for the existence of the
COMPILE_DEFINITIONS property on the target before processing it.

At the time, compile definitions from linked targets were added to the
COMPILE_DEFINITIONS property by target_link_libraries. The way such
transitive compile definitions worked was changed in subsequent
commit a1c4905f (Use the link information as a source of compile
definitions and includes., 2013-02-12), so that the COMPILE_DEFINITIONS
property may be empty, despite the fact that there are definitions
which should be used.
2013-05-16 14:43:45 -04:00
Brad King a052a79949 Merge topic 'CTest-less-cd'
9969bfb CTest: avoid useless changing of directory
2013-05-16 14:43:44 -04:00
Brad King f122dd3d47 Merge topic 'vs-configurations'
42bb42d VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators
2013-05-16 14:38:40 -04:00
Brad King e477f21af2 Merge topic 'MemChecker-improvements'
10bc50e Tests: ignore Guard Malloc messages in MemChecker tests
159c3e9 Tests: add a test with custom options passed to valgrind
61ddb93 CTest: fix comment documenting cmBoundsCheckerParser class
cbdfcb0 Tests: add test for non-existent Valgrind suppression file
3b5b758 CTest: drop suppression for gcc 2.9.6 errors from default Valgrind flags
7752253 Tests: verify that memory checker output files are always present
abf1df4 Tests: remove code duplication in CTestTestMemCheck tests
f499422 CTest: remove unreachable code and CTestTestMemcheckUnknown test
dde6306 CTest: use an output file for Valgrind (#14110)
bcc0f3f Tests: create output files for all memory checkers
2013-05-16 14:38:35 -04:00
Brad King 62a9bdb466 Merge topic 'only-first-output-regex'
12cf7bc CTest: break after first regex match on output
2013-05-16 14:38:31 -04:00
Brad King 5d6e54ce50 Merge topic 'test_regex_doc'
74228e8 Doc: fix example for FAIL_REGULAR_EXPRESSION
2013-05-16 14:38:28 -04:00
Brad King 07d8492178 Merge topic 'positive-test-times'
e319e32 CTest: make sure never to report negative test times (#14132)
2013-05-16 14:38:20 -04:00
Brad King 0dc0e7d885 Merge topic 'doc-improvements'
7cc2805 Docs: Clarify wording "flag used" => "flag (to|will) be used"
2378a69 Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames
56ca34d Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES)
2bab472 VS10: add detailed comment about MIDL processing
e619111 Explain distribution of Win9x binary on all Windows versions.
5ca4336 FindwxWidgets: add DOC strings with usual style
f57800d Fix spelling and typos (product names)
bf019d7 Fix spelling and typos (non-binary)
ddac8d3 Fix spelling and typos (affecting binary data / module messages)
86832ce Fix spelling and typos (affecting users)
2013-05-16 14:38:07 -04:00
Brad King 07afd4f375 Merge topic 'update-kwsys'
b7593bf Merge branch 'upstream-kwsys' into update-kwsys
d0cdc68 KWSys 2013-05-06 (f4928d44)
0c04428 Merge branch 'upstream-kwsys' into update-kwsys
327c982 KWSys 2013-04-25 (709fb5c1)
2013-05-16 14:37:59 -04:00
Brad King 1843f2e0cd Merge topic 'eclipse-doc-typo'
b9c1f3b Eclipse: Add a missing space in the documentation
2013-05-16 14:37:37 -04:00
Brad King 27e4ddcd3f Merge topic 'EclipseUseGmakeErrorParser_13699'
c46b46b Use GmakeErrorParser instead of deprecated MakeErrorParser (fixes bug 0013699)
2013-05-16 14:37:32 -04:00
Brad King 3e6f5ff33c Merge topic 'QtDialogSearchText2'
f92d7e7 cmake-gui: use shortcut F only for "Find in Output"
6e57724 cmake-gui: Add function for going to next error message in Output window
7be2d8a cmake-gui: Change shortcut of the search field from Ctrl-F to Alt-E
4ce65e8 cmake-gui: Add search functions to the context menu of the Output widget
df3663b cmake-gui: Add search functions for Output window (#9733)
2013-05-16 14:37:21 -04:00
Brad King 8ec007083e Merge topic 'ninja_add_custom_command_windows'
e7c58f6 Ninja: use cd /D to set directory on Windows
2013-05-16 14:37:09 -04:00
Brad King d86d0e622a Merge topic 'xcode-explicitFileType'
5683146 Xcode: Use explicitFileType to mark source types (#14093)
2013-05-16 14:36:54 -04:00
Brad King 7a198773f3 Merge topic 'improve-get_filename_component-names'
7d1590e get_filename_component: Add DIRECTORY option (#14091)
ec1ba9b get_filename_component: Add explicit unit tests
2013-05-16 14:36:49 -04:00
Brad King e1178478b7 Merge topic 'msbuild-targets-in-subdirs'
ac9a5f4 ctest_build: Pass projectDir to GenerateBuildCommand
a6c0299 CTest: Simplify ctest_* command source/build dir lookup
1ca9318 VS: Add test for building MSBuild project in subdir
3cd4000 VS: Use .sln parser to build targets in subdirs with msbuild (#13623)
df035e4 VS: Create parser for Visual Studio .sln files
de8be9e Add projectDir parameter to GenerateBuildCommand
2013-05-16 14:36:27 -04:00
Brad King 9cdb5c0b54 Merge topic 'vs10-preprocessor-semicolons'
4e4688e VS 10: Escape ; as %3B in preprocessor definitions (#14073)
2013-05-16 14:36:19 -04:00
Brad King 1b4b64cd3c Merge topic 'vs-no-compiler-pdb-setting'
87c0d16 Ninja: Fix OBJECT_DIR placeholder path conversion
fb9f73d MSVC: Invoke 'link' directly for executables
42ba1b0 VS: Separate compiler and linker PDB files (#11899, #14062)
2013-05-16 14:36:11 -04:00
Stephen Kelly a7ba4520c7 Add the JOIN generator expression.
This generator expression joins a list with a separator. The separator
may contain arbitrary content, such as commas, which is ordinarily a
delimiter in the generator expression syntax.
2013-05-16 19:36:31 +02:00
Stephen Kelly 96ec3147bb Make it possible for any genex to have arbitrary content at the end. 2013-05-16 19:36:31 +02:00
Stephen Kelly bd638ee20f Rename the method determining if a genex accepts arbitrary content.
The meaning of this will be expanded to generator expressions with
more than a single parameter.
2013-05-16 19:36:31 +02:00
Stephen Kelly dc742fe4be Extract the ProcessArbitraryContent method. 2013-05-16 19:36:31 +02:00
Stephen Kelly 0a4d7d883c Remove unused marker for a variable which is now used. 2013-05-16 19:34:21 +02:00
Stephen Kelly c70b9b51d9 Fix style. 2013-05-16 19:33:13 +02:00
Stephen Kelly 05bf9721e4 Fix handling of commas in arbitrary content in genexes.
As the comma is the parameter separator, it needs to be re-added
when evaluating to reconstruct arbitrary content.
2013-05-16 19:25:06 +02:00
John Farrier 79ec7868d0 VS: Add Windows Forms Support
Add support to maintain designer functionality for Visual Studio C++
Windows Forms projects.  Also add a test project showing how to use
the CMakeLists.txt file and, when successfully configured, will allow
use of the designer for the included form.
2013-05-16 13:06:44 -04:00
Brad King 272431a84f Begin post-2.8.11 development 2013-05-16 12:44:26 -04:00
Robert Maynard 0ad0c37206 CMake 2.8.11 2013-05-15 11:17:10 -04:00
Rolf Eike Beer 9969bfb773 CTest: avoid useless changing of directory
At this point we do not care what the current directory is, as nothing that
requires a specific directory is done. Just make sure that at the end we are
back in the same directory as at the start.
2013-05-15 08:50:22 +02:00
Kitware Robot 5dd8c01429 CMake Nightly Date Stamp 2013-05-15 00:01:03 -04:00
Kitware Robot 26ad32031c CMake Nightly Date Stamp 2013-05-14 00:01:03 -04:00
Brad King 42bb42d197 VS: Always initialize CMAKE_CONFIGURATION_TYPES in IDE generators
Initialize the CMAKE_CONFIGURATION_TYPES cache entry early during
EnableLanguage like the Xcode generator does.  Avoid depending on
the MSVC compiler information module to do it.  Otherwise code like

  project(MyProj NONE)

sets CMAKE_CONFIGURATION_TYPES late (in GenerateConfigurations), and
to only "Debug" and "Release" instead of the standard set of 4.

Reported-by: Paul Smith <paul@mad-scientist.net>
2013-05-13 11:07:46 -04:00
Kitware Robot a3f106dedf CMake Nightly Date Stamp 2013-05-13 00:01:02 -04:00
Kitware Robot 90dad912f8 CMake Nightly Date Stamp 2013-05-12 00:01:03 -04:00
Rolf Eike Beer 12cf7bc507 CTest: break after first regex match on output
PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION both take a list of expressions.
Stop searching if the first of those has matched the output as the result will not
change anymore.
2013-05-11 12:15:38 +02:00
Rolf Eike Beer 74228e8486 Doc: fix example for FAIL_REGULAR_EXPRESSION
The example used PASS_REGULAR_EXPRESSION instead of FAIL...
2013-05-11 12:02:05 +02:00
Kitware Robot 1c575ab72f CMake Nightly Date Stamp 2013-05-11 00:01:06 -04:00
Rolf Eike Beer e319e32b8c CTest: make sure never to report negative test times (#14132)
Because of clock scew between processors or just because of someone changing
the system time the end timestamp may be before the start time. Reporting a
negative time doesn't any sense, just report zero there as it already happens
for really fast tests.
2013-05-10 20:50:22 +02:00
Kitware Robot a3e7c94fd7 CMake Nightly Date Stamp 2013-05-10 00:01:03 -04:00
Rolf Eike Beer 61ddb9319b CTest: fix comment documenting cmBoundsCheckerParser class
This was obviously copied from Source/cmGlobalXCodeGenerator.cxx during
implementation but the comment was forgotten.
2013-05-09 19:25:50 +02:00
Rolf Eike Beer 3b5b758915 CTest: drop suppression for gcc 2.9.6 errors from default Valgrind flags
The --workaround-gcc296-bugs has been part of the default Valgrind flags since
Valgrind support was added in commit 5b232ded15
(ENH: Add initial memory check support which works for Valgrind, 2003-12-15).
The Valgrind manpage says that this option should be avoided if not really
needed as it may cause real errors to get ignored. If someone uses a compiler
that really needs the flag this flag should be set by the user explicitely.
Most users will never set any flags and probably never notice that they use a
flag they shouldn't.
2013-05-09 19:24:53 +02:00
Rolf Eike Beer f4994223bb CTest: remove unreachable code and CTestTestMemcheckUnknown test
The memory checker command can't be quoted at this point, because previously it
has been tested that the given file exists, which will fail if the name is
quoted. The CTestTestMemcheckUnknown test aimed to test this case, has always
failed to do so and serves no useful purpose therefore.
2013-05-09 19:22:29 +02:00
Rolf Eike Beer dde6306a48 CTest: use an output file for Valgrind (#14110)
This makes sure Valgrind output will not screw up tests that match on the
output.
2013-05-09 19:22:01 +02:00
Kitware Robot cf4869ba08 CMake Nightly Date Stamp 2013-05-09 00:01:03 -04:00
Kitware Robot 619fa2cce8 CMake Nightly Date Stamp 2013-05-08 00:01:03 -04:00
Robert Maynard 6162e0ff2d CMake 2.8.11-rc4 2013-05-07 11:56:31 -04:00
Robert Maynard b882ef7565 Merge branch 'release' 2013-05-07 11:33:14 -04:00
Andreas Mohr 7cc2805cd6 Docs: Clarify wording "flag used" => "flag (to|will) be used"
The phrase "flag used" is somewhat imprecise, so extend it to stress
intentions.

Also correct:

- "Flag" => "Flags"
- "[CMAKE_BUILD_TYPE]" => "<CONFIG>"
2013-05-07 08:42:21 -04:00
Andreas Mohr 2378a698a9 Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames
Add "filename" to the descriptions.
2013-05-07 08:42:21 -04:00
Andreas Mohr 56ca34dbbd Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES)
Bring woefully outdated descriptions somewhat up to speed.
2013-05-07 08:42:20 -04:00
Andreas Mohr 2bab472ecb VS10: add detailed comment about MIDL processing 2013-05-07 08:42:20 -04:00
Andreas Mohr e619111d91 Explain distribution of Win9x binary on all Windows versions. 2013-05-07 08:42:20 -04:00
Andreas Mohr f57800d6f5 Fix spelling and typos (product names)
API, Borland, MinGW, UNIX, Mac OS X.
2013-05-07 08:42:20 -04:00
Andreas Mohr bf019d765d Fix spelling and typos (non-binary) 2013-05-07 08:39:19 -04:00
Andreas Mohr ddac8d3d2d Fix spelling and typos (affecting binary data / module messages) 2013-05-07 08:39:19 -04:00
Andreas Mohr 86832cecd5 Fix spelling and typos (affecting users) 2013-05-07 08:39:19 -04:00
Brad King b7593bf3f5 Merge branch 'upstream-kwsys' into update-kwsys 2013-05-07 08:38:10 -04:00
Kitware Robot ff298fff79 CMake Nightly Date Stamp 2013-05-07 00:01:03 -04:00
Brad King 6c6bfe1509 Merge topic 'doc-tll-usage-requirements'
2618e02 target_link_libraries: Update usage requirements documentation
2013-05-06 10:09:44 -04:00
Brad King 0483bf8062 Merge topic 'fix-per-config-tll-include-dirs'
dea1df4 Memoize usage requirement include directories in a config-specific map
26dba6a Fix include dir propagation from conditionally linked targets
b8259c3 Centralize maintenance of usage requirement include directories
2013-05-06 10:09:28 -04:00
Stephen Kelly dea1df4e5e Memoize usage requirement include directories in a config-specific map
Commit 42ebb188 (Memoize includes and defines from interface libraries.,
2013-02-22) introduced caching of the includes.  Fix the memoization to
be configuration-specific so that we do not accumulate entries across
multiple evaluations in a multi-config generator.
2013-05-06 09:59:28 -04:00
Stephen Kelly 26dba6a162 Fix include dir propagation from conditionally linked targets
Generator expressions, including configuration-specific expressions may
be used as link libraries of targets.  The old-style keywords of
target_link_libraries are handled in terms of new generator expressions.
However, the generator expressions expect target names to be valid
against a regular expression, whereas target_link_libraries does not
require validation.  In generator expression constructed without any
action from the user we need to ensure that only valid expressions are
generated.  Ensure that strings which are not valid target names are not
used in generator expressions which validate the argument.

Code like

 target_link_libraries(B debug A)

generates usage requirement references such as "$<$<CONFIG:DEBUG>:A>".
When cmTarget::GetIncludeDirectories uses such references it generates
expressions like:

 $<TARGET_PROPERTY:$<$<CONFIG:DEBUG>:A>,INTERFACE_INCLUDE_DIRECTORIES>

When the conditions are false such references evaluate as an empty
string and the expression fails with an error such as:

 $<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name.

Fix this by teaching cmTarget::GetIncludeDirectories to wrap the above
expression inside a conditional:

 $<$<BOOL:$<$<CONFIG:DEBUG>:A>>:...>

so that $<TARGET_PROPERTY:...> will not be evaluated with an empty
target.
2013-05-06 09:55:45 -04:00
Stephen Kelly b8259c3d69 Centralize maintenance of usage requirement include directories
Maintain a target's internal list of usage requirement include
directories whenever the LINK_LIBRARIES property is set by either
target_link_libraries or set_property.
2013-05-06 09:54:11 -04:00
Kitware Robot b85f691d78 CMake Nightly Date Stamp 2013-05-06 00:01:03 -04:00
Kitware Robot 4cb77c4a0e CMake Nightly Date Stamp 2013-05-05 00:01:02 -04:00
Kitware Robot 21bdeadf00 CMake Nightly Date Stamp 2013-05-04 00:01:02 -04:00
Kitware Robot 41839d6fb6 CMake Nightly Date Stamp 2013-05-03 00:01:03 -04:00
Kitware Robot d94eae4356 CMake Nightly Date Stamp 2013-05-02 00:01:02 -04:00
Jack O'Connor b9c1f3b78a Eclipse: Add a missing space in the documentation 2013-05-01 14:29:01 -04:00
Kitware Robot e9e088a4df CMake Nightly Date Stamp 2013-05-01 00:01:08 -04:00
Brad King 2618e0257e target_link_libraries: Update usage requirements documentation
Re-word the documentation to make clear that CMake integrates usage
requirements during generation and not synchronously during
configuration or execution of target_link_libraries.
2013-04-30 09:15:03 -04:00
Kitware Robot 2ba65cc9d9 CMake Nightly Date Stamp 2013-04-30 00:01:05 -04:00
Kitware Robot c80594ba12 CMake Nightly Date Stamp 2013-04-29 00:01:13 -04:00
Victor Zverovich c46b46b628 Use GmakeErrorParser instead of deprecated MakeErrorParser (fixes bug 0013699) 2013-04-28 15:50:31 +02:00
Kitware Robot 77df4ef5ac CMake Nightly Date Stamp 2013-04-28 00:01:03 -04:00
Kitware Robot 82f5936a8b CMake Nightly Date Stamp 2013-04-27 00:01:11 -04:00
Brad King 0c04428d04 Merge branch 'upstream-kwsys' into update-kwsys 2013-04-26 16:08:35 -04:00
Kitware Robot c8b34729d9 CMake Nightly Date Stamp 2013-04-26 00:01:09 -04:00
Kitware Robot 78185f598c CMake Nightly Date Stamp 2013-04-25 00:01:03 -04:00
Alex Neundorf f92d7e7f95 cmake-gui: use shortcut F only for "Find in Output"
Before it was used also for "Find Next" and "Find Previous"

Alex
2013-04-24 15:32:43 -04:00
Marc Bartholomaeus 6e57724fc3 cmake-gui: Add function for going to next error message in Output window
Using new shortcuts: F8 (Visual Studio) and Ctrl-. (Eclipse)

Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:42 -04:00
Marc Bartholomaeus 7be2d8acc6 cmake-gui: Change shortcut of the search field from Ctrl-F to Alt-E
Ctrl-F is now used by "Find in Output".

Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:42 -04:00
Marc Bartholomaeus 4ce65e82f5 cmake-gui: Add search functions to the context menu of the Output widget
Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:42 -04:00
Marc Bartholomaeus df3663bfab cmake-gui: Add search functions for Output window (#9733)
Signed-off-by: Alex Neundorf <neundorf@kde.org>
2013-04-24 15:32:34 -04:00
Kitware Robot 90bd164193 CMake Nightly Date Stamp 2013-04-24 00:01:07 -04:00
Kitware Robot 2baf851c34 CMake Nightly Date Stamp 2013-04-23 00:01:07 -04:00
Kitware Robot e55b8ce4a4 CMake Nightly Date Stamp 2013-04-22 00:01:04 -04:00
Kitware Robot d37fe5bc5b CMake Nightly Date Stamp 2013-04-21 00:01:05 -04:00
Kitware Robot 50e96802d2 CMake Nightly Date Stamp 2013-04-20 00:01:03 -04:00
Kitware Robot e6c3595fde CMake Nightly Date Stamp 2013-04-19 00:01:10 -04:00
Ian Monroe e7c58f6c35 Ninja: use cd /D to set directory on Windows
Add_custom_command was unable to handle build and source directories
existing on different drives.
2013-04-18 14:16:46 -04:00
Robert Maynard 573f39cb2a CMake 2.8.11-rc3 2013-04-18 11:55:10 -04:00
Robert Maynard dfca68ce89 Merge branch 'release' 2013-04-18 11:53:22 -04:00
Kitware Robot 6a3ee5dd4e CMake Nightly Date Stamp 2013-04-18 00:01:08 -04:00
Brad King 52b758b5c2 Merge topic 'doc-get_filename_component'
df71f96 get_filename_component: Document path components more clearly (#14091)
2013-04-17 11:36:30 -04:00
Brad King 8a2763b3ac Merge topic 'missing-fclose-in-trycompile'
ce441fa try_compile: add missing fclose() to recently added error case
2013-04-17 11:35:26 -04:00
Brad King 5b5a365aa6 Merge topic 'fix-clear-INCLUDE_DIRECTORIES-prop'
5a5e0fa Fix clearing of the INCLUDE_DIRECTORIES DIRECTORY property.
2013-04-17 11:35:14 -04:00
Kitware Robot f2958ff984 CMake Nightly Date Stamp 2013-04-17 00:01:08 -04:00
Brad King 5683146185 Xcode: Use explicitFileType to mark source types (#14093)
Replace use of lastKnownFileType with explicitFileType to insist
that Xcode treat the file as we ask.
2013-04-16 15:44:48 -04:00
Brad King 7d1590e6f9 get_filename_component: Add DIRECTORY option (#14091)
The name "PATH" is not precise so add equivalent option "DIRECTORY".
Document the latter as preferred and the former as a legacy alias.
2013-04-16 09:37:37 -04:00
Brad King df71f968cd get_filename_component: Document path components more clearly (#14091)
Organize component names in a table to explain each in more detail.
Clearly state that PATH is the directory name.
2013-04-16 09:02:40 -04:00
Rolf Eike Beer ce441fac07 try_compile: add missing fclose() to recently added error case
In commit 236133e7 (Handle targets in the LINK_LIBRARIES of try_compile,
2013-02-09) an error return case was added without closing the file in
progress.  Add the missing fclose() call.

Spotted by sevenhill.
2013-04-16 08:38:33 -04:00
Kitware Robot 201db269b8 CMake Nightly Date Stamp 2013-04-16 00:01:10 -04:00
Kitware Robot 51e4424df6 CMake Nightly Date Stamp 2013-04-15 00:01:14 -04:00
Kitware Robot ee62ac4f1a CMake Nightly Date Stamp 2013-04-14 00:01:03 -04:00
Kitware Robot edd90f9911 CMake Nightly Date Stamp 2013-04-13 00:01:16 -04:00
Petr Kmoch ac9a5f4d94 ctest_build: Pass projectDir to GenerateBuildCommand
This allows the ctest_build command's TARGET option to name a target
in a subdirectory and still build properly with msbuild.
Add test case covering use of ctest_build() with such a TARGET.
2013-04-12 11:35:36 -04:00
Brad King a6c0299c40 CTest: Simplify ctest_* command source/build dir lookup
In cmCTestHandlerCommand::InitialPass call InitializeHandler after setting
the CTest "SourceDirectory" and "BuildDirectory" configuration values
instead of before.  This makes the values available to InitializeHandler
methods in subclasses, so also drop the duplicate configuration of those
values from cmCTestConfigureCommand::InitializeHandler.
2013-04-12 11:35:36 -04:00
Petr Kmoch 3cd4000601 VS: Use .sln parser to build targets in subdirs with msbuild (#13623)
Use cmVisualStudioSlnParser in GenerateBuildCommand() to provide correct
command line for MSBuild even when target project is stored in a
subdirectory.
2013-04-12 11:35:36 -04:00
Petr Kmoch df035e4825 VS: Create parser for Visual Studio .sln files
Create class cmVisualStudioSlnParser as a generic parser for Visual
Studio .sln files. Implement minimum functionality but keep class
extensible.  Add tests for the class.
2013-04-12 11:35:35 -04:00
Petr Kmoch de8be9ef7d Add projectDir parameter to GenerateBuildCommand
Extend the cmGlobalGenerator::GenerateBuildCommand virtual method
signature with a "projectDir" parameter specifying the top of the
project build tree for which the build command will be generated.
Populate it from call sites in cmGlobalGenerator::Build where a
fully-generated build tree should be available.
2013-04-12 11:35:35 -04:00
Kitware Robot 1513dd399c CMake Nightly Date Stamp 2013-04-12 00:01:08 -04:00
Brad King 4e4688e469 VS 10: Escape ; as %3B in preprocessor definitions (#14073)
Use the suggestion from http://support.microsoft.com/kb/2262855 to escape
semicolons in preprocessor definitions for VS >= 10.  Update the
COMPILE_DEFINITIONS documentation disclaimer list of known limitations
accordingly.  Update our "Preprocess" test to cover the case.

Suggested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
2013-04-11 11:41:15 -04:00
Brad King 87c0d16ab7 Ninja: Fix OBJECT_DIR placeholder path conversion
Transform the path using ConvertToNinjaPath just as we do for all other
paths.  This fixes the OutOfSource test for objects in the ../OutOfBinary
directory by computing the proper full path for the /Fd option.
2013-04-11 10:23:33 -04:00
Kitware Robot 6bfa3d8668 CMake Nightly Date Stamp 2013-04-11 00:01:08 -04:00
Stephen Kelly 5a5e0fa9d3 Fix clearing of the INCLUDE_DIRECTORIES DIRECTORY property.
This was broken by commit 18a3195a (Keep track of INCLUDE_DIRECTORIES
as a vector of structs., 2012-11-19).
2013-04-10 18:12:56 +02:00
Kitware Robot c6253fba41 CMake Nightly Date Stamp 2013-04-10 00:01:09 -04:00
Kitware Robot a5b39fd3c6 CMake Nightly Date Stamp 2013-04-09 00:01:09 -04:00
Kitware Robot a96452ec06 CMake Nightly Date Stamp 2013-04-08 00:01:05 -04:00
Kitware Robot 4336fadff0 CMake Nightly Date Stamp 2013-04-07 00:01:04 -04:00
Kitware Robot 88073c8e08 CMake Nightly Date Stamp 2013-04-06 00:01:09 -04:00
Robert Maynard 83e0fd0d1c CMake 2.8.11-rc2 2013-04-05 15:29:39 -04:00
Robert Maynard dfe8e4b9f0 Merge branch 'release' 2013-04-05 14:00:35 -04:00
Brad King 42ba1b08f3 VS: Separate compiler and linker PDB files (#11899, #14062)
The MS tools create two types of PDB files as explained here:

 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.71%29.aspx
 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.80%29.aspx
 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.90%29.aspx
 http://msdn.microsoft.com/en-us/library/yd4f8bd1%28v=vs.100%29.aspx

One is created by the compiler (/Fd) and the other by the linker (/pdb).
The two options should not specify the same file.  Split them up.

In the VS IDE generators, simply drop ProgramDataBaseFileName to
take the VS default "/Fd$(IntDir)vc$(PlatformToolsetVersion).pdb".

In the Makefile generators, set "/Fd" on the compile line to be
the directory containing object files (with a trailing slash the
compiler will add the "vc$(PlatformToolsetVersion).pdb" filename
automatically).  Drop the /Fd option from the exe link command
line and add "/pdb" instead (already done for dll linking).
Update these rules for both MSVC and Intel tools.

Drop support for PDB_OUTPUT_DIRECTORY and PDB_NAME in STATIC
libraries because the generated .pdb files are only from /Fd
and not real linker-generated .pdb files.  Update documentation to
clarify that the PDB_* properties are only for linker .pdb files.

This regresses the PDBDirectoryAndName test for STATIC libraries.
Since it is not clear at this time what should be done for STATIC
library .pdb files, comment out the relevant portion of the test
and leave a TODO comment.
2013-04-05 11:25:09 -04:00
Kitware Robot 2d88085204 CMake Nightly Date Stamp 2013-04-05 00:01:10 -04:00
Brad King 9cccd2c29c Merge topic 'usr-move-relocatable'
6c613b4 Handle usr-move without forcing absolute paths (#14041)
2013-04-04 14:20:21 -04:00
Kitware Robot af79291fb4 CMake Nightly Date Stamp 2013-04-04 00:01:08 -04:00
Brad King 6c613b433c Handle usr-move without forcing absolute paths (#14041)
In commit 0c727b90 (install(EXPORT): Force absolute paths for usr-move,
2013-03-08) and commit d4774140 (configure_package_config_file: force
absolute paths for usr-move, 2013-01-24) we supported Linux
distributions implementing the "/usr move" by assuming that installation
to (/usr)?/lib(64)? represents a non-relocatable system package.

When cross-compiling one may prepare a package for installation into a
system location on a target machine but install the package files on the
*host* machine inside another path for use with CMAKE_FIND_ROOT_PATH.
In this case the package development files must still be relocatable.

Handle "/usr move" with a new approach that works with relocatable
files.  Teach configure_package_config_file and install(EXPORT) to
generate special logic in a package configuration file or targets file
for installation under (/usr)?/lib(64)?.  Teach the file to recognize
when it is loaded through a symlink that refers to the same realpath as
its original install destination.  In such a case, use the original
install prefix.  Otherwise, compute the prefix relative to the current
file location to make it relocatable.
2013-04-03 11:19:47 -04:00
Kitware Robot 99f7cc127a CMake Nightly Date Stamp 2013-04-03 00:01:08 -04:00
Brad King 972ae90fc6 Merge topic 'automoc-vs11-workaround'
20c99b1 automoc: Use a pre-build event in VS >= 7
2013-04-02 14:07:02 -04:00
Brad King ec0b84576b Merge topic 'clarify-add_dependencies-error'
de13d68 add_dependencies: Distinguish target v. file dependencies in error (#14050)
2013-04-02 14:06:55 -04:00
Kitware Robot 3423915720 CMake Nightly Date Stamp 2013-04-02 00:01:09 -04:00
Kitware Robot 8869c0febd CMake Nightly Date Stamp 2013-04-01 00:01:04 -04:00
Kitware Robot 8fe0f2be83 CMake Nightly Date Stamp 2013-03-31 00:01:08 -04:00
Kitware Robot f1502d2f88 CMake Nightly Date Stamp 2013-03-30 00:01:15 -04:00
Brad King 20c99b1dbc automoc: Use a pre-build event in VS >= 7
In VS IDE generators add a pre-build event to perform automoc instead of
using a separate custom target.  This reduces the number of targets in the
.sln that need to be loaded by the IDE.

This also works around a VS 11 bug as discussed in issue 13900.

Suggested-by: Hauke Heibel <hauke.heibel@gmail.com>
2013-03-29 15:58:21 -04:00
Brad King de13d68d11 add_dependencies: Distinguish target v. file dependencies in error (#14050)
When called with a non-existent LHS target name the user may be trying
to add file-level dependencies.  Clarify the error message to explain
the difference between target-level and file-level dependencies.  Point
the reader at the commands and options needed for the latter.
2013-03-29 15:00:33 -04:00
Kitware Robot 969a7fde7a CMake Nightly Date Stamp 2013-03-29 00:01:08 -04:00
Brad King 1f16bd24ee Merge topic 'SystemTools-TrimWhitespace-all'
674f918 cmSystemTools: Generalize TrimWhitespace to all whitespace
2013-03-28 10:43:22 -04:00
Brad King 2afcbe3090 Merge topic 'error-on-exported-missing-include-dir'
634bb33 Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIES
2013-03-28 10:42:42 -04:00
Kitware Robot 6a03ea4725 CMake Nightly Date Stamp 2013-03-28 00:01:11 -04:00
Petr Kmoch 674f918a1a cmSystemTools: Generalize TrimWhitespace to all whitespace
Modify cmSystemTools::TrimWhitespace() to remove all leading and
trailing whitespace, not just spaces.
2013-03-27 08:46:55 -04:00
Kitware Robot eb462356cf CMake Nightly Date Stamp 2013-03-27 00:01:09 -04:00
Stephen Kelly 634bb33f3a Error if linked target has relative paths in INTERFACE_INCLUDE_DIRECTORIES
We can do this check only if the TargetName is non-empty, which means
that we're evaluating INTERFACE_INCLUDE_DIRECTORIES from a linked
dependency which was set using target_link_libraries.

It is possible to have relative paths in INCLUDE_DIRECTORIES already
in CMake 2.8.10.2, so that part will require a policy to fix.
2013-03-26 19:56:10 +01:00
Brad King b9e4a5abb4 Merge topic 'error-on-exported-missing-include-dir'
28051f1 Report an error on IMPORTED targets with a faulty INTERFACE
af81a3c install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIES
2013-03-26 14:36:45 -04:00
Brad King c20f4dd620 Merge topic 'vs-sln-header'
c677838 VS: Fix VS 10/11 .sln headers (#14038)
2013-03-26 14:36:32 -04:00
Brad King a3872ba5f9 Merge topic 'fix-new-target-commands-docs'
2e80f9f Fix new target commands documentation.
2013-03-26 14:36:26 -04:00
Brad King 0261bdfc1d Merge topic 'fix-COMPILE_DEFINITIONS-config'
1703b00 Test evaluation of per-config COMPILE_DEFINITIONS (#14037)
a6286e9 Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)
2013-03-26 14:36:07 -04:00
Stephen Kelly 28051f1150 Report an error on IMPORTED targets with a faulty INTERFACE
It is considered an error if the INTERFACE_INCLUDE_DIRECTORIES contains
a directory which does not exist, which indicates a programmer error
by the upstream, or a packaging error.

One of the RunCMake.CompatibleInterface tests also needs to be updated
due to this change. Non-existant includes were used in the test, but
are not needed.
2013-03-26 10:45:28 -04:00
Stephen Kelly af81a3c31b install(EXPORT): Ensure clean INTERFACE_INCLUDE_DIRECTORIES
Check that source and binary directories are not part of the
INTERFACE_INCLUDE_DIRECTORIES for installed IMPORTED targets.

This is limited to directories which do not contain generator
expressions to evaluate. Such paths can only be checked at time
of use of the imported target, which will be done in a follow up
patch.
2013-03-26 10:45:07 -04:00
Kitware Robot 2fcb06039d CMake Nightly Date Stamp 2013-03-26 00:01:08 -04:00
Brad King c677838c1a VS: Fix VS 10/11 .sln headers (#14038)
The VS version we generate in the .sln header is used by VS when opening
the file through Windows Explorer and possibly elsewhere.  Fix our
generators to use version strings known to VS to avoid a drop-down box.

For VS 10, since commit 4f96af44 (Fix VS 10 .sln files for Windows
Explorer, 2009-10-22) we use "Visual Studio 2010" instead of just
"Visual Studio 10".  This is correct except that for the Express edition
we need "Visual C++ Express 2010".

For VS 11, since commit f0d66ab4 (VS11: Fix comment generated at the top
of *.sln files, 2011-10-20) we use "Visual Studio 11" in the .sln header
but the preferred value is "Visual Studio 2012" (just as the first
commit mentioned above fixed for VS 10).  Also for the Express edition
we need "Visual Studio Express 2012 for Windows Desktop".
2013-03-25 14:25:14 -04:00
Stephen Kelly 2e80f9f21f Fix new target commands documentation.
The target_include_directories and target_compile_defintions commands
accepted targets as arguments until commit f6b16d4b (Don't allow
targets args in the new target commands., 2013-01-29). This followed
from discussion on the mailing list (target_include_directories() accepts
only absolute paths ?, 2013-01-28):

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5925/focus=5948

 http://public.kitware.com/pipermail/cmake-developers/2013-January/006301.html

It was also decided to allow relative paths in target_include_directories().
2013-03-25 19:23:01 +01:00
Stephen Kelly a6286e92c9 Fix the evaluation of per-config COMPILE_DEFINITIONS (#14037)
The API for retrieving per-config COMPILE_DEFINITIONS has long
existed because of the COMPILE_DEFINITIONS_<CONFIG> style
properties. Ensure that the provided configuration being generated
is also used to evaluate the generator expressions
in cmTarget::GetCompileDefinitions.

Both the generic COMPILE_DEFINITIONS and the config-specific
variant need to be evaluated with the requested configuration. This
has the side-effect that the COMPILE_DEFINITIONS does not need to
be additionally evaluated with no configuration, so the callers can
be cleaned up a bit too.
2013-03-25 10:49:22 -04:00
Brad King ddbe2e1d7d Merge topic 'compile-object-TARGET-placeholder'
0b7ad3f Replace <TARGET> in CMAKE_<LANG>_COMPILE_OBJECT rule variables
2013-03-25 10:08:10 -04:00
Brad King 365ada46ce Merge topic 'rename-include-current-dir-in-interface-var'
fc43477 Rename variable for including current directory in interfaces
2013-03-25 10:08:05 -04:00
Brad King 33c2254aef Merge topic 'update-kwsys'
3ed2d03 Merge branch 'upstream-kwsys' into update-kwsys
83a9f09 KWSys 2013-03-21 (2d263bc3)
2013-03-25 10:08:00 -04:00
Brad King 40e677e785 Merge topic 'cpack-printf-format-warnings'
0fca154 CPack: Avoid "format expects 'unsigned int'" warnings
2013-03-25 10:07:57 -04:00
Brad King 1cc637da20 Merge topic 'doc-string-regex'
763a6dc string: Fix regex documentation of '^' and '$' (#14028)
2013-03-25 10:07:52 -04:00
Kitware Robot 1a60115bf5 CMake Nightly Date Stamp 2013-03-25 00:01:04 -04:00
Kitware Robot 19700735d5 CMake Nightly Date Stamp 2013-03-24 00:01:03 -04:00
Kitware Robot d4a94b8be4 CMake Nightly Date Stamp 2013-03-23 00:01:08 -04:00
Paul Kunysch 0fca154344 CPack: Avoid "format expects 'unsigned int'" warnings
Cast sprintf uid and gid arguments to match the type expected by their
"%-6u" format strings.
2013-03-22 08:53:58 -04:00
Brad King 3ed2d03ee9 Merge branch 'upstream-kwsys' into update-kwsys 2013-03-22 08:08:03 -04:00
Brad King 0b7ad3f091 Replace <TARGET> in CMAKE_<LANG>_COMPILE_OBJECT rule variables
In some languages the compiler may need to know the path of the final
target file for which an object is being compiled.  Honor the <TARGET>
placeholder for compilation rules to support such cases.

Note that this cannot work with OBJECT library targets because the final
target path is not known during compilation (there can even be more than
one final target).

Suggested-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2013-03-22 07:52:54 -04:00
Kitware Robot 8bffce955d CMake Nightly Date Stamp 2013-03-22 00:01:08 -04:00
Kitware Robot aa16a433d3 CMake Nightly Date Stamp 2013-03-21 00:01:10 -04:00
Kitware Robot 2557e84d67 CMake Nightly Date Stamp 2013-03-20 00:01:10 -04:00
Brad King 3efede0ccc Merge topic 'automoc-append-implicit-dirs'
753b905 Automoc: append implicit includes after user-specified dirs
2013-03-19 19:37:49 -04:00
Stephen Kelly 753b905ec8 Automoc: append implicit includes after user-specified dirs
The commit d2536579 (Automoc: fix regression #13667, broken build in
phonon, 2012-11-19) changed Automoc to try to re-add the Qt header dir
if it was stripped out as an implicit include from the moc command
line. When invoking a compiler, those directories are stripped out
because they are built-in, but for moc, there are no built-in directories.

The follow-up commit acc22400 (Automoc: get include dirs without
stripping implicit include dirs off, 2012-12-07) went further by not
removing the implicit include dirs, if they were specified specifically
by the user.

This had the remaining problem that the implicit include dirs appeared
in a different order of precedence for moc compared to the compiler.
Resolve that by stripping out the include dirs, where specified for
the moc command line to, and then appending them at the end. Note that
the order of the appended implicit include directories is the order
they are specified in the CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES, not
the order specified by the user.
2013-03-19 19:36:42 -04:00
Brad King fc43477de0 Rename variable for including current directory in interfaces
Rename the variable added by commit 9ce1b9ef (Add
CMAKE_BUILD_INTERFACE_INCLUDES build-variable, 2012-11-25) to
CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE to be more consistent with the
existing CMAKE_INCLUDE_CURRENT_DIR variable.

Suggested-by: Alex Neundorf <neundorf@kde.org>
2013-03-19 16:44:17 -04:00
Brad King 017478570e Merge topic 'expand-version-of-Qt5-gui-fix'
6387f6d cmake-gui: Use the QStandardItemModel workaround until 5.1.0.
2013-03-19 15:20:37 -04:00
Brad King 16695a6d77 Merge topic 'fix-genex-preprocess'
7a619fa Fix cmGeneratorExpression::Preprocess for interleaved inputs.
2013-03-19 15:20:27 -04:00
Stephen Kelly 6387f6d85c cmake-gui: Use the QStandardItemModel workaround until 5.1.0.
If there is a Qt 5.0.3 release, it may or may not contain the patch
that fixes this issue.

 http://thread.gmane.org/gmane.comp.lib.qt.releasing/882

Just use the workaround until 5.1.0 which certainly will contain the
fix. Don't use the workaround before Qt 5.0.0.
2013-03-19 15:14:46 -04:00
Brad King 763a6dcd33 string: Fix regex documentation of '^' and '$' (#14028)
They match at the beginning and end of the input, not by line.

Reported-by: Martin Perzl <martin.perzl@web.de>
2013-03-19 13:14:22 -04:00
Kitware Robot 5dfa6240eb CMake Nightly Date Stamp 2013-03-19 00:01:07 -04:00
Stephen Kelly 7a619fa6fb Fix cmGeneratorExpression::Preprocess for interleaved inputs.
We can't find both preprocessing expressions at once, because then
the BUILD_INTERFACE will always be favored if both are present, even
if INSTALL_INTERFACE appears first.

This was affecting the behavior of install(EXPORT) because the
INTERFACE_INCLUDE_DIRECTORIES contained entries like

 /foo/include;$<INSTALL_INTERFACE:/bar/include>

As the INSTALL_INTERFACE always evaluates to '0', it always needs
to be preprocessed properly.
2013-03-18 15:09:47 +01:00
Brad King 85f7caabbb Merge topic 'CMAKE_AUTOMOC-Qt5-docs'
1b386b3 Document that CMAKE_AUTOMOC works with Qt 5.
2013-03-18 09:41:55 -04:00
Brad King a402bc4d5a Merge topic 'TI_DSP_to_TI'
27e6f6e TI compiler: add automatic detection of prefix and suffixes
b301586 rename TI_DSP toolchain to TI, since it works also for the ARM compiler
12b25df Determine C/CXX/Fortran compiler: fix indentation
7baa55a Determine C/CXX/Fortran compiler: minor restructuring
2013-03-18 09:41:37 -04:00
Kitware Robot ef63fa592a CMake Nightly Date Stamp 2013-03-18 00:01:04 -04:00
Kitware Robot d7a2a9c319 CMake Nightly Date Stamp 2013-03-17 00:01:13 -04:00
Stephen Kelly 1b386b3407 Document that CMAKE_AUTOMOC works with Qt 5. 2013-03-16 19:31:04 +01:00
Kitware Robot 253a913654 CMake Nightly Date Stamp 2013-03-16 00:01:09 -04:00
Kitware Robot 03b0ceebe5 CMake Nightly Date Stamp 2013-03-15 00:01:08 -04:00
Alex Neundorf b3015862e5 rename TI_DSP toolchain to TI, since it works also for the ARM compiler
Additionally, look for a special ar and strip

Alex
2013-03-14 21:47:59 +01:00
Robert Maynard db87209b6d CMake 2.8.11-rc1 2013-03-14 12:54:08 -04:00
Kitware Robot ae84d24b21 CMake Nightly Date Stamp 2013-03-14 00:01:10 -04:00
Brad King a95968fec9 Merge topic 'ninja-escape-line-breaks'
3b4436a Ninja: escape line breaks in literals
2013-03-13 13:42:00 -04:00
Brad King 0c1621ff95 Merge topic 'qt5-fixes'
404e1d6 cmake-gui: Workaround bug in Qt 5.0.0 to 5.0.3 QStandardItemModel
5144f6f cmake-gui: Use -fPIE if required by Qt.
2013-03-13 13:34:41 -04:00
Brad King 8128940ac1 Merge topic 'cleanup-early-include-CTest-failure'
d90f49b CTest: Fail early without PROJECT_BINARY_DIR (#14005)
2e1c2bd build_command: Fail early without CMAKE_MAKE_PROGRAM (#14005)
4e5cb37 Refactor RunCMake.build_command test to allow more cases
2013-03-13 13:34:36 -04:00
Brad King 26bfece1af Merge topic 'fix-automoc-no-qt'
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
2013-03-13 13:34:24 -04:00
Brad King 9a02a26702 Merge topic 'property-link-depends-no-crash'
ab079ee Avoid crash when checking property compatibility without link info
92a2ab7 Avoid crash when checking property link dependencies without link info
2013-03-13 13:34:20 -04:00
Brad King 7d9d0efc7b Merge topic 'genex-SEMICOLON'
7f3bb8b Add $<SEMICOLON> generator expression.
2013-03-13 13:34:16 -04:00
Brad King 0707e0d422 Merge topic 'add_subdirectory-trailing-slashes'
1df4928 add_subdirectory: Compute output dir with consistent slashes (#10072)
2013-03-13 13:34:02 -04:00
Brad King 26436346fb Merge topic 'doc-fixes'
3cf2f67 Documentation: Clarify a few subtleties
2013-03-13 13:33:53 -04:00
Kitware Robot a9c83592bf CMake Nightly Date Stamp 2013-03-13 00:01:11 -04:00
Stephen Kelly 404e1d675a cmake-gui: Workaround bug in Qt 5.0.0 to 5.0.3 QStandardItemModel
The commit in qtbase 9dfba89c (Add implementations of QAIM::sibling in
public APIs., 2012-09-26) added a buggy implementation of sibling(), and
the commit f136701b (Use the base implementation of
QAbstractItemModel::sibling in QSIM., 2013-02-21) resolves it.
Workaround the bug for Qt releases that have it.
2013-03-12 18:41:26 -04:00
Stephen Kelly 5144f6fb11 cmake-gui: Use -fPIE if required by Qt. 2013-03-12 18:41:15 -04:00
Brad King 2e1c2bd2dd build_command: Fail early without CMAKE_MAKE_PROGRAM (#14005)
If CMAKE_MAKE_PROGRAM is not set fail with an error message instead of
crashing.  Suggest calling project() or enable_language() first to
ensure that CMAKE_MAKE_PROGRAM is set.
2013-03-12 18:17:40 -04:00
Stephen Kelly a223a3b65f Automoc: Don't create automoc targets if Qt is not used (#13999)
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.
2013-03-12 17:42:02 -04:00
Brad King 65b5c1e064 Merge branch 'property-link-depends-no-crash' into fix-automoc-no-qt 2013-03-12 17:39:03 -04:00
Brad King ab079ee682 Avoid crash when checking property compatibility without link info
Teach the compatibility check added by commit 042ecf04 (Add API to
calculate link-interface-dependent bool properties or error, 2013-01-06)
to return early if no link information is available.  This avoids
crashing in a case that should fail with an error message.
2013-03-12 17:25:59 -04:00
Brad King 92a2ab70b6 Avoid crash when checking property link dependencies without link info
Teach the isLinkDependentProperty helper added by commit e9879910 (Make
INTERFACE determined properties readable in generator expressions,
2013-01-19) to return early if no link information is available.
2013-03-12 17:17:24 -04:00
Jean-Christophe Fillion-Robin 7f3bb8b392 Add $<SEMICOLON> generator expression.
This expression is useful to put a ';' in a command line argument
without dividing the argument during CMake list expansion.
2013-03-12 16:46:03 -04:00
Brad King 451ddcbf73 Merge topic 'ninja-mingw-lang'
2271ca3 Ninja: the Ninja generator does not support Fortran yet.
751f712 Ninja: use MinGW generator code in EnableLanguage()
2013-03-12 13:46:55 -04:00
Brad King 556ae30717 Merge topic 'install-export-usr-move'
0c727b9 install(EXPORT): Force absolute paths for usr-move
2013-03-12 13:46:51 -04:00
Brad King 32fb1f2371 Merge topic 'vs7-empty-groups'
545fdec VS: Avoid empty source groups in some cases (#3474)
2013-03-12 13:46:47 -04:00
Brad King 19922ac1d2 Merge topic 'cpack-nsis-no-release-version'
7947890 CPack: Fix NSIS version check without release version (#9721)
2013-03-12 13:46:43 -04:00
Brad King 950541618c Merge topic 'fix-transitive-target-names'
1bdd167 Restore support for target names with '+' (#13986)
254687d Only process transitive interface properties for valid target names.
2013-03-12 13:46:40 -04:00
Brad King d74d154704 Merge topic 'update-find_package-docs'
b73e05d Mention that IMPORTED targets may be created by a find_package call.
2013-03-12 13:46:31 -04:00
Stephen Kelly 1bdd167577 Restore support for target names with '+' (#13986)
Extend the range of valid target names with the + sign.  This character
can commonly be used for target names, such as those containing 'c++'.
Add a test but skip it for Borland and Watcom tools which do not support
the character.

Suggested-By: Benjamin Kloster
2013-03-12 13:39:11 -04:00
Brad King 1df49282a5 add_subdirectory: Compute output dir with consistent slashes (#10072)
When the command is invoked without an explicit build directory path we
compute it from the source directory path.  When either the source or
build tree is the root of a Windows drive letter it will have a trailing
slash.  Handle slashes consistently when substituting the current output
directory for the current source directory.

While at it, use cmSystemTools::IsSubDirectory instead of FindLastString
to verify that the source directory is a subdirectory.

Inspired-by: Graham Menhennitt <graham@menhennitt.com.au>
2013-03-12 11:52:52 -04:00
Petr Kmoch 3cf2f67adc Documentation: Clarify a few subtleties
* Clarify accepted values of <LANG> suffix in CMAKE_COMPILER_IS_GNU<LANG>.

* Clarify fact that target property GENERATOR_FILE_NAME usually cannot be
  used at configure time.

* Clarify that enable_language() can only be used in global scope of
  top-level project using language.

* State that enable_language(... OPTIONAL) currently doesn't work.

* Document regular expression operator precedence.
2013-03-12 09:29:55 -04:00
Kitware Robot 51fc4fb3c1 CMake Nightly Date Stamp 2013-03-12 00:01:18 -04:00
Kitware Robot 5990a5637e CMake Nightly Date Stamp 2013-03-11 00:01:12 -04:00
Peter Kümmel 2271ca3496 Ninja: the Ninja generator does not support Fortran yet. 2013-03-10 11:36:57 +01:00
Kitware Robot 2e0229ae0a CMake Nightly Date Stamp 2013-03-10 00:01:11 -05:00
Peter Kümmel 3b4436aa90 Ninja: escape line breaks in literals
BUG: 13591
2013-03-09 12:06:24 +01:00
Peter Kümmel 751f712e1a Ninja: use MinGW generator code in EnableLanguage() 2013-03-09 11:28:45 +01:00
Kitware Robot 2e80f10763 CMake Nightly Date Stamp 2013-03-09 00:01:10 -05:00
Brad King 0c727b906a install(EXPORT): Force absolute paths for usr-move
If the absolute install(EXPORT) destination for the CMAKE_INSTALL_PREFIX
used during configuration is under (/usr)?/lib(64)? then assume the
current build is for a system package installation instead of a
relocatable distribution.  Generate an absolute path for _IMPORT_PREFIX
in the target exports file instead of generating code to compute the
value relative to the file location.  This is necessary for
distributions implementing a move to /usr such as:

 https://wiki.archlinux.org/index.php/DeveloperWiki:usrlib
 "All files in the /lib directory have been moved to /usr/lib and now
  /lib is a symlink to usr/lib."

The relative path computation is not reliable because the targets file
could be installed through cross-prefix a symlink and loaded without it
or vice versa.

A similar change was made for package configuration file generation by
commit d4774140 (configure_package_config_file: force absolute paths for
usr-move, 2013-01-24).
2013-03-08 09:55:18 -05:00
Anton Helwart 545fdec4f8 VS: Avoid empty source groups in some cases (#3474)
Teach the WriteGroup method return true if a group or any of its
children have source files.  Have children write their output to a
temporay cmOStringStream.  Add it to the real output only if not empty.
2013-03-08 08:27:12 -05:00
Gerald Hofmann 794789047d CPack: Fix NSIS version check without release version (#9721)
Only check a release version for the minimum required version.  If NSIS
returns a CVS build version string (as when built by Macports), skip the
version check altogether and assume a sufficiently new version.  Also
correctly handle the case where the version check fails and the
CPACK_TOPLEVEL_DIRECTORY option is not set.

Co-Author: Graham Menhennitt <graham@menhennitt.com.au>
2013-03-08 08:17:05 -05:00
Kitware Robot aa027af9af CMake Nightly Date Stamp 2013-03-08 00:01:09 -05:00
Kitware Robot 06a45e8169 CMake Nightly Date Stamp 2013-03-07 00:01:10 -05:00
Stephen Kelly b73e05d7c9 Mention that IMPORTED targets may be created by a find_package call. 2013-03-06 21:35:20 +01:00
Stephen Kelly 254687d31f Only process transitive interface properties for valid target names.
Commit a1c4905f (Use the link information as a source of compile
definitions and includes., 2013-02-12) introduced the use of link
information as the source of target properties via the TARGET_PROPERTY
generator expression. This generator expression has a strict
interpretation of a valid target name and emits a fatal error for
invalid names.

Ensure that only targets with names valid for use with TARGET_PROPERTY
or targets which are determined by generator expressions are processed
by it. This means that at worst, invalid target names do not participate
in the transitive evaluation of properties, but the validation
generator expression can be extended where needed to resolve that.
2013-03-06 17:42:08 +01:00
Kitware Robot efdf152fe1 CMake Nightly Date Stamp 2013-03-06 00:01:10 -05:00
Brad King 631b7b8e15 Merge topic 'vs10-stack-size'
308c5a2 VS 10: Fix CMAKE_<LANG>_STACK_SIZE implementation (#13968)
2013-03-05 14:10:55 -05:00
Kitware Robot 4871960ea0 CMake Nightly Date Stamp 2013-03-05 00:01:11 -05:00
Brad King e6b4641bfa Merge topic 'fix-genex-RPATH-handling'
dcb5907 Fix RPATH information when only a genex is used as a link library.
2013-03-04 15:40:20 -05:00
Brad King 91d86838a9 Merge topic 'fix-genex-split-duplication'
f93a388 Fix the cmGeneratorExpression::Split when leading chars are present.
2013-03-04 15:40:14 -05:00
Brad King 8106570606 Merge topic 'ctest_update-Git-HEAD'
78b81b7 CTest: Fix ctest_update with 'HEAD' file in source tree
2013-03-04 15:40:08 -05:00
Brad King f954bb3d99 Merge topic 'xcode-COMBINE_HIDPI_IMAGES'
10d7bf4 Xcode: Generate recommended artwork setting (#13954)
2013-03-04 15:39:57 -05:00
Brad King b4bb074d8b Merge topic 'remove-TARGET_DEFINED-genex'
cbf0756 Revert "Add the TARGET_DEFINED generator expression"
21a342c Remove use of TARGET_DEFINED from the target_link_libraries test.
47b8d32 Remove use of TARGET_DEFINED from the ExportImport test.
2e39d21 Remove use of TARGET_DEFINED from target_include_directories test.
2013-03-04 15:39:45 -05:00
Brad King 308c5a2670 VS 10: Fix CMAKE_<LANG>_STACK_SIZE implementation (#13968)
Use the /STACK: flag to pass the value through flag parsing so that the
generator converts it to the StackReserveSize project file option.  The
option was accidentally left out by commit 7491f529 (first pass at VS
10, 2009-06-25).

Suggested-by: goatboy160@yahoo.com
2013-03-04 08:18:28 -05:00
Kitware Robot 2ea18eb0c7 CMake Nightly Date Stamp 2013-03-04 00:01:04 -05:00
Kitware Robot 368bd3d346 CMake Nightly Date Stamp 2013-03-03 00:01:04 -05:00
Kitware Robot 0d85927210 CMake Nightly Date Stamp 2013-03-02 00:01:06 -05:00
Kitware Robot 567a7af311 CMake Nightly Date Stamp 2013-03-01 00:01:09 -05:00
Stephen Kelly dcb5907ed6 Fix RPATH information when only a genex is used as a link library.
As of commit 1da75022 (Don't include generator expressions in
old-style link handling., 2012-12-23), such entries are not
included in the LinkLibraries member. Generator expressions in
LinkLibraries are not processed anyway, so port to the new way
of getting link information.
2013-02-28 18:25:33 +01:00
Stephen Kelly f93a388c9c Fix the cmGeneratorExpression::Split when leading chars are present.
In the case of input like

 foo$<1:bar>

the preGenex should be 'foo'. In that case, the search for a ';'
will not find one, and there is no preceding input to process as a
non-genex list.

Previously, the result of 'splitting' such a string would instead
be a vector containing the same string two times.
2013-02-28 17:54:11 +01:00
Brad King 78b81b773c CTest: Fix ctest_update with 'HEAD' file in source tree
Add the '--' command-line separator to make the HEAD reference
unambiguous.  Extend the CTest.UpdateGIT test to cover this case.
2013-02-28 11:52:30 -05:00
Kitware Robot 42c56c824c CMake Nightly Date Stamp 2013-02-28 00:01:01 -05:00
Kitware Robot 2929768541 CMake Nightly Date Stamp 2013-02-27 00:01:12 -05:00
Brad King 10d7bf4e62 Xcode: Generate recommended artwork setting (#13954)
Add the COMBINE_HIDPI_IMAGES = YES setting to all Xcode project targets.
Otherwise Xcode may ask the user to "Update to recommended settings".
2013-02-26 12:54:01 -05:00
Kitware Robot 793bf3fdac CMake Nightly Date Stamp 2013-02-26 00:01:08 -05:00
Brad King b74c35f57e Merge topic 'memoize-link-iface-includes-defines'
42ebb18 Memoize includes and defines from interface libraries.
2013-02-25 13:12:16 -05:00
Brad King 57072c12d2 Merge topic 'interface-property-external-read'
8dfdf1c Fix the tests for evaluating includes and defines.
98a6725 Fix constness of accessors.
7e70744 Expand includes and defines transitively in 'external' genexes.
d1a2729 Fix DAG checker finding cycling dependencies.
e72eaad Workaround broken code where a target has itself in its link iface.
ec2c67b Strip stray semicolons when evaluating generator expressions.
2013-02-25 13:12:12 -05:00
Brad King 990c440ddd Merge topic 'ide-compiler-vars-Fortran'
9f94181 VS: Restore CMAKE_GENERATOR_FC variable
2013-02-25 13:12:09 -05:00
Brad King b887bca6ee Merge topic 'try_compile-targets'
236133e Handle targets in the LINK_LIBRARIES of try_compile.
1c0597c Add a new Export generator for IMPORTED targets.
f2ab17d Keep track of all targets seen while evaluating a genex.
2013-02-25 13:12:02 -05:00
Brad King 6e567cabea Merge topic 'fix-automoc-linker-language'
79568f9 automoc: Add source file to target early to set the linker language
2013-02-25 13:11:55 -05:00
Brad King e674af906a Merge topic 'ExportFileGenerator_GenerateNicerErrorCheckingCode'
11d0c66 export files: rewrite the code for checking required targets
2013-02-25 13:11:44 -05:00
Brad King 05529c7109 Merge topic 'cmLocalGenerator_RemoveVirtuals'
f497dbc cmLocalGenerator: remove "virtual" where not used
2013-02-25 13:11:34 -05:00
Stephen Kelly cbf07569ed Revert "Add the TARGET_DEFINED generator expression"
This reverts commit 2bee6f5ba5.

This expression is not used, and has a semantic which is not completely
optimal (namely considering utility targets to be targets, though
usually we are interested in linkable targets).

Remove it so that we have more freedom to define better expressions in
the future.

Conflicts:
        Source/cmGeneratorExpressionEvaluator.cxx
        Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt
        Tests/CMakeCommands/target_compile_definitions/consumer.cpp
2013-02-25 15:35:11 +01:00
Kitware Robot e597ba2928 CMake Nightly Date Stamp 2013-02-25 00:01:07 -05:00
Stephen Kelly 42ebb1886f Memoize includes and defines from interface libraries.
This is similar in spirit to commit e48d8420 (Cache context-independent
includes on evaluation., 2013-02-03), but it is needed since commit
a1c4905f (Use the link information as a source of compile definitions
and includes., 2013-02-12), which changed how includes and defines
are determined. As they are now determined through the link interface,
we need to cache the result of evaluating them through that.

In the case of the includes, the result was already being cached
and then immediately disposed. Store the result as a member variable
instead to make use of the caching.
2013-02-24 22:04:20 +01:00
Kitware Robot 2de047669f CMake Nightly Date Stamp 2013-02-24 00:01:07 -05:00
Stephen Kelly 8dfdf1c734 Fix the tests for evaluating includes and defines.
We should also check whether the INTERFACE_ variant of a property
is being read, and in the case of the compile definitions, we should
test the _<CONFIG> suffixed variants. That is already available
through the use of the methods.

This way, we use the ALREADY_SEEN optimization when evaluating
the includes of a target in 'external' generator expressions, ie, those
used in a add_custom_command invokation, as opposed to evaluating the
INCLUDE_DIRECTORIES of a target itself via GetIncludeDirectories.
2013-02-23 09:42:24 +01:00
Stephen Kelly 98a672528d Fix constness of accessors. 2013-02-23 09:42:24 +01:00
Stephen Kelly 7e707444be Expand includes and defines transitively in 'external' genexes.
This means that we can use expressions of the form

 $<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES>

to get a list of the interface include directories of foo, including
those coming from dependencies.

We can't have a test of a target which has a single include directory in
its INCLUDE_DIRECTORIES because the shell on the MSYS platforms transforms
a single include directory to include a prefix, which is not what the test
expects. We test a target with two directories instead as a means to
test a target with no link dependencies.
2013-02-23 09:42:24 +01:00
Stephen Kelly d1a2729b1a Fix DAG checker finding cycling dependencies.
Before this patch, the following is reported falsely as a self-reference:

 target_link_libraries(empty2 LINK_PUBLIC empty3)
 target_link_libraries(empty3 LINK_PUBLIC empty2)

 add_custom_target(...
    -DINCLUDES=$<TARGET_PROPERTY:empty2,INTERFACE_INCLUDE_DIRECTORIES>
 )

The reason is that the existing code assumed that all reading of
include directories would be done through cmTarget::GetIncludeDirectories()
and would therefore be initialized with a DagChecker. That is not the case
if reading the property with an 'external' generator expression.
2013-02-23 09:42:06 +01:00
Stephen Kelly e72eaadc42 Workaround broken code where a target has itself in its link iface.
There is a test for this since commit 8e756d2b (Tolerate cycles in
shared library link interfaces (#12647), 2012-01-12), so make sure
it continues to pass, even as we require no self-references in new
INTERFACE_ property generator expressions.
2013-02-23 09:41:22 +01:00
Kitware Robot 976cdf5488 CMake Nightly Date Stamp 2013-02-23 00:01:12 -05:00
Brad King 9f94181634 VS: Restore CMAKE_GENERATOR_FC variable
In commit bed6c388 (VS,Xcode: Remove unused CMAKE_GENERATOR_* variables,
2013-02-19) we removed this variable among others from the VS generator
claiming they were all not used.  In fact the Fortran compiler detection
module CMakeDetermineFortranCompiler.cmake uses CMAKE_GENERATOR_FC even
for the Visual Studio IDE generators because it does not use the full
IDE compiler id detection like the C and C++ language files do.
2013-02-22 16:12:48 -05:00
Stephen Kelly 236133e79e Handle targets in the LINK_LIBRARIES of try_compile.
Imported targets are re-exported so that they can be used by the
try_compile generated code with target_link_libraries.

This makes the use of the cmake_expand_imported_targets macro
obsolete. The macro is not able to expand the generator expressions
which may appear in the IMPORTED_LINK_INTERFACE_LIBRARIES content.
Instead it just sees them as 'not a target'.
2013-02-22 08:35:39 -05:00
Stephen Kelly 1c0597c25b Add a new Export generator for IMPORTED targets.
This is to be used during try_compile using LINK_LIBRARIES in the
srcfile signature and, in the future, TARGETS in the binary dir
signature.
2013-02-22 08:35:38 -05:00
Stephen Kelly f2ab17d4db Keep track of all targets seen while evaluating a genex.
As dependencies of the generator expression, these will re-exported
in try_compile generated code.
2013-02-22 08:35:29 -05:00
Stephen Kelly 79568f95ab automoc: Add source file to target early to set the linker language
Previously, GetIncludeDirectories was called before calling
target->AddSourceFile(mocCppSource). Since commit a1c4905f (Use the
link information as a source of compile definitions and
includes., 2013-02-12), the include directories are determined by
the link information.

Valid link information requires that the linker language can be
determined, which depends on the source files languages and the
dependent targets languages. In the case of the no_link_languages
target in the unit test, there are no dependencies and the additional
source file no_link_languages_automoc.cpp is added to the target
at generate-time. That file can be used to determine the linker
language, but it must be added to the target before calling
GetIncludeDirectories.
2013-02-22 08:29:33 -05:00
Kitware Robot 3bb57bab7b CMake Nightly Date Stamp 2013-02-22 00:01:09 -05:00
Kitware Robot f7474f3a01 CMake Nightly Date Stamp 2013-02-21 00:01:08 -05:00
Alex Neundorf 11d0c66206 export files: rewrite the code for checking required targets
Instead of generating a whole bunch of repeated if-statements
now a foreach()-loop is generated in the targets-file.
Also now a comment is inserted in the generated file if no
targets from other export sets are used, so if somebody looks
at the file he can see whether the information about missing
imported targets has been generated or not.

Alex
2013-02-20 20:09:45 +01:00
Alex Neundorf f497dbce93 cmLocalGenerator: remove "virtual" where not used
This patch makes several functions of cmLocalGenerator which are marked
as virtual non-virtual, since they are not reimplemented anywhere.

Alex
2013-02-20 19:48:39 +01:00
Brad King f7029572ca Merge topic 'xcode-target-depends'
b005140 Xcode: Each target dependency edge needs a unique object (#13935)
781ea6d Xcode: Drop check for circular target dependencies
2013-02-20 08:09:47 -05:00
Brad King fc7b4d5cf3 Merge topic 'compiler-change-cleanup'
e83e6a1 Test Unix Makefiles generator support for changing compilers
c307e1c Tests/RunCMake: Allow tests to control build tree behavior
2963c98 Merge branch 'empty-compiler-crash' into compiler-change-cleanup
1df09e5 Delete entire CMakeFiles directory when deleting CMakeCache.txt (#13756)
2013-02-20 08:09:40 -05:00
Brad King f1cd42f818 Merge topic 'ide-compiler-vars-cleanup'
bed6c38 VS,Xcode: Remove unused CMAKE_GENERATOR_* variables
2013-02-20 08:09:34 -05:00
Brad King 414658f057 Merge topic 'xcode-organize-sources'
f6a8983 Xcode: Sort source files
0816cae Xcode: Fix nested source group handling (#12943)
2013-02-20 08:09:17 -05:00
Kitware Robot 4515b09731 CMake Nightly Date Stamp 2013-02-20 00:01:08 -05:00
Brad King b005140451 Xcode: Each target dependency edge needs a unique object (#13935)
Generate a unique PBXTargetDependency and PBXContainerItemProxy for
every edge in the dependency graph as required by the Xcode format.
Xcode only accidentally loads project files that re-use the same
PBXTargetDependency for every edge leading to a single target.  If one
is removed by hand in the IDE then Xcode may crash due to dangling
references from the others.

Since cmGlobalXCodeGenerator::AddDependTarget is called exactly once for
every edge in the target dependency graph we do not need to keep track
of which edges have been visited to avoid generating duplicates.
2013-02-19 16:45:58 -05:00
Brad King 781ea6d1ca Xcode: Drop check for circular target dependencies
The modern cmComputeTargetDepends guarantees there will by no cycles.
Drop the Xcode generator's check which only handled length 1 and 2
cycles anyway.
2013-02-19 16:06:38 -05:00
Brad King 6535fcefeb Merge topic 'ninja-custom-command-implicit'
bbea30e Ninja: remove implicit dependency on custom command outputs
2013-02-19 14:58:56 -05:00
Brad King 71b217ecc9 Merge topic 'sublime-text-2-generator'
f616ff2 Update generator to use new cmGeneratorTarget api.
674bd6e Merge branch 'master' into sublime-text-2-generator
4760ead Remove ability to generate sublime clang files.
da0898e Correct missing parameter to CMP0018Flags call.
badb40d Merge branch 'master' into sublime-text-2-generator
b3ae61f Merge branch 'master' into sublime-text-2-generator
089d9cc SublimeText 2 Gen: Set the sublimeclang_options_script property.
44c2eee Merge branch 'master' into sublime-text-2-generator
304b885 Sublime Text 2 Gen: Per-source Compile flags are now saved in a separate file.
5b2aa3d SublimeText2 Gen: Fixed the issue where include directory flags used -D
90bcb77 SublimeText2 Gen: Improved use of define, include flags from CMAKE_C(XX)_FLAGS
cc84072 Merge branch 'master' into sublime-text-2-generator
8670cbe Define flags in CMAKE_C(XX)_FLAGS are now included in SublimeClang settings.
d022d4e Merge branch 'master' into sublime-text-2-generator
9cd3e70 Fixed Sublime Text project generation for in-source builds
44f35f7 Added a CMAKE_SUBLIMECLANG_DISABLED variable that disables SublimeClang.
...
2013-02-19 14:58:42 -05:00
Robert Maynard f616ff2c25 Update generator to use new cmGeneratorTarget api. 2013-02-19 14:45:18 -05:00
Robert Maynard 674bd6e778 Merge branch 'master' into sublime-text-2-generator 2013-02-19 14:44:57 -05:00
Robert Maynard 4760eade42 Remove ability to generate sublime clang files.
SublimeClang is a optional plugin to SublimeText and I felt it
shouldn't be part of the generator for the following reasons:

1. Reduces the amount of sublime and sublimeClang specific
   code we have to maintain inside CMake.
2. In testing the SublimeClang commands generated did not work
   for the VTK project.

For people that do want this feature I recommend that they
looking into https://gist.github.com/robertmaynard/4724705 for a
way to use CMAKE_EXPORT_COMPILE_COMMANDS to generate JSON files
that can be used by SublimeClang.
2013-02-19 14:43:20 -05:00
Robert Maynard da0898e0a2 Correct missing parameter to CMP0018Flags call. 2013-02-19 14:42:43 -05:00
Robert Maynard badb40d0f8 Merge branch 'master' into sublime-text-2-generator
Resolve conflict in Source/cmDocumentVariables.cxx by adding both
variables.
2013-02-19 14:42:00 -05:00
Brad King bed6c38896 VS,Xcode: Remove unused CMAKE_GENERATOR_* variables
Since the topic merged to master by commit 34a02846 (Merge topic
'ide-compiler-id', 2012-08-24), these variables are not used by
CMakeDetermine*Compiler.cmake for VS and Xcode generators.  Drop the
code that sets them.
2013-02-19 09:29:11 -05:00
Kitware Robot dea92c2f39 CMake Nightly Date Stamp 2013-02-19 00:01:10 -05:00
Brad King 2963c9828c Merge branch 'empty-compiler-crash' into compiler-change-cleanup 2013-02-18 10:07:03 -05:00
Brad King 1df09e5773 Delete entire CMakeFiles directory when deleting CMakeCache.txt (#13756)
Since commit e015df7d (...delete CMakeFiles directory when cache is
deleted, 2006-02-20) we deleted the files in the CMakeFiles directory
when deleting CMakeCache.txt in order to reset the build tree to a fresh
state.  This allowed commit fd33bf93 (fix for bug 6102, allow users to
change the compiler, 2007-12-13) to delete CMakeCache.txt when the user
changes the compiler and CMakeFiles/CMake<lang>Compiler.cmake and other
platform information files would go with it to allow a fresh start.

Then commit 7195aca5 (Make platform information files specific to the
CMake version, 2012-08-24) moved the platform information files to a
subdirectory e.g. CMakeFiles/<version>/CMake<lang>Compiler.cmake where
<version> is the current CMake version.  This causes the compiler change
logic to fail to remove all old compiler information.  Then on the next
configuration CMake<lang>Compiler.cmake would set CMAKE_<lang>_COMPILER
back to the old value and re-trigger the compiler change logic.  This
causes an infinite loop of cache deletion and compiler reset.

Fix this simply by teaching cmCacheManager::DeleteCache to remove the
entire CMakeFiles directory recursively whenever it removes an existing
CMakeCache.txt.  This fully resets the build tree to configure with a
fresh compiler.
2013-02-18 09:58:34 -05:00
Alexander Chehovsky f6a8983db4 Xcode: Sort source files
Since Xcode doesn't sort the files on its own, let's sort them in our
generator to make navigation easier.  Visual Studio, QtCreator, and
kdevelop all display files sorted.
2013-02-18 08:47:14 -05:00
Alexander Chehovsky 0816caecac Xcode: Fix nested source group handling (#12943)
Teach the code path for nested sources build the group map key in the
same way as non-nested code path does.
2013-02-18 08:47:10 -05:00
Stephen Kelly ec2c67bcf3 Strip stray semicolons when evaluating generator expressions. 2013-02-18 12:07:32 +01:00
Kitware Robot a0ac2c59fe CMake Nightly Date Stamp 2013-02-18 00:01:04 -05:00
Kitware Robot 0ad58af444 CMake Nightly Date Stamp 2013-02-17 00:01:06 -05:00
Peter Kümmel bbea30eec8 Ninja: remove implicit dependency on custom command outputs
Revert aa2e1e9cae
With this commit all files are rebuild when only one moc file has changed.

BUG 0013874
2013-02-16 13:45:28 +01:00
Kitware Robot 77eccc20ee CMake Nightly Date Stamp 2013-02-16 00:01:10 -05:00
Brad King 5698d9b865 Merge topic 'vs-atomic-generated-stamp'
2dc17f8 VS: Replace generation timestamp file atomically
2013-02-15 13:13:14 -05:00
Brad King e85f1c28d4 Merge topic 'rpath-use-implicit-link-dirs'
95a9c80 Merge topic 'LINK_LIBRARIES-property' into rpath-use-implicit-link-dirs
baa33ac AIX-GNU: Put implicit link directories in runtime libpath (#13909)
171b099 Avoid duplicate RPATH entries
2013-02-15 13:12:31 -05:00
Brad King bc6b0326b3 Merge topic 'windows-ce-vs-subsystem'
cf82d1e VS: Specify WinCE subsystems correctly in VS 9 2008
8f4cae7 VS: Specify WinCE subsystem also for DLLs
2013-02-15 13:12:08 -05:00
Brad King c1dc807494 Merge topic 'file-REMOVE_RECURSE-symlink'
f123367 file: Do not remove symlinked directories recursively (#10538)
2013-02-15 13:11:27 -05:00
Brad King 0e2ed9b097 Merge topic 'linked-usage-cleanup'
fde949d Don't add target-specific interface includes and defines to Qt 4 targets.
79ae968 Revert "Add a way to exclude INTERFACE properties from exported targets."
71bf96e Revert "find_package: Reword <package>_NO_INTERFACES documentation"
3df36b5 Revert "Add the $<LINKED:...> generator expression."
e1f9080 Don't populate INTERFACE includes and defines properties in tll.
567c8d1 Revert "Don't allow utility or global targets in the LINKED expression."
a1c4905 Use the link information as a source of compile definitions and includes.
5c9f5e3 Don't use LINKED where not needed.
5b88504 Rename the IncludeDirectoriesEntry to be more generic.
b030323 Fix determination of when we're evaluating compile definitions.
2013-02-15 13:11:04 -05:00
Kitware Robot 57833095ff CMake Nightly Date Stamp 2013-02-15 00:01:22 -05:00