875 Commits

Author SHA1 Message Date
Ben Boeckel
7abf4e313d stringapi: Use strings for dependency information 2014-03-08 13:05:39 -05:00
Ben Boeckel
94fc63e2d5 stringapi: Use strings for cache iterator values 2014-03-08 13:05:39 -05:00
Ben Boeckel
1a1b737c99 stringapi: Use strings for generator names 2014-03-08 13:05:38 -05:00
Ben Boeckel
24b5e93de2 stringapi: Use strings for directories 2014-03-08 13:05:38 -05:00
Ben Boeckel
3def29da3c stringapi: Use strings for feature arguments 2014-03-08 13:05:37 -05:00
Ben Boeckel
84fdc9921c stringapi: Pass configuration names as strings 2014-03-08 13:05:36 -05:00
Ben Boeckel
270eb96df0 strings: Remove cmStdString references
Casts from std::string -> cmStdString were high on the list of things
taking up time. Avoid such implicit casts across function calls by just
using std::string everywhere.

The comment that the symbol name is too long is no longer relevant since
modern debuggers alias the templates anyways and the size is a
non-issue since the underlying methods are generated since it's
inherited.
2014-03-08 13:05:35 -05:00
Ben Boeckel
4c53997f38 stringapi: Take strings for utility command names 2014-03-08 13:05:34 -05:00
Ben Boeckel
8d60da0cb5 cmTarget: Remove the project argument to FindTarget
All callers passed 0 in, so just remove the branch.
2014-03-08 13:05:34 -05:00
Ben Boeckel
c3833c7da4 stringapi: Use strings for VS project names 2014-03-08 13:05:33 -05:00
Ben Boeckel
f3efa3cd16 stringapi: Use strings for cache paths as arguments 2014-03-08 13:05:32 -05:00
Ben Boeckel
adcd812917 stringapi: Use strings for AddSubdirectory paths 2014-03-08 13:05:32 -05:00
Ben Boeckel
30bc251b65 stringapi: Use strings for output names in AddCustomCommandToOutput 2014-03-08 13:05:32 -05:00
Ben Boeckel
fabf1fbabb stringapi: Use strings in target name 2014-03-08 13:05:31 -05:00
Ben Boeckel
ce5114354c stringapi: Use strings for the languages 2014-03-08 13:05:30 -05:00
Ben Boeckel
83a5e453f8 stringapi: Use strings for test names 2014-03-08 13:05:30 -05:00
Ben Boeckel
310ef08fed stringapi: Use strings for source names 2014-03-08 13:05:29 -05:00
Ben Boeckel
22c54a1090 makefile: Remove an unused method 2014-03-08 13:05:29 -05:00
Ben Boeckel
3742bb0d32 stringapi: Use strings for variable names
Variable names are always generated by CMake and should never be NULL.
2014-03-08 13:05:28 -05:00
Ben Boeckel
ec97ed7d0c stringapi: Use strings for property names
Property names are always generated by CMake and should never be NULL.
2014-03-08 13:05:28 -05:00
Brad King
7e187eeacd CMP0017: Fix check when including from CMake source tree
When running CMake from the build tree the CMAKE_ROOT is the
entire source tree.  Fix the CMP0017 check to be specific to
the Modules/ directory under CMAKE_ROOT so that Tests/ does
not count.  Fix the FindPackageTest modules to include FPHSA
by full path from CMAKE_ROOT so that they do not include the
local FPHSA which reports an error meant to test that CMP0017
works.
2014-03-04 09:35:00 -05:00
Stephen Kelly
f054201d12 cmMakefile: Return containers by const reference.
They are not implicitly shared.
2014-02-02 10:52:35 +01:00
Stephen Kelly
d1ac6ffd4a cmMakefile: Fix minor indentation inconsistency. 2014-02-02 10:49:33 +01:00
Stephen Kelly
bde0dab15d cmMakefile: Make ConfigureString const. 2014-01-22 21:28:42 +01:00
Stephen Kelly
bf1e1bf1d0 cmMakefile: Make FindSourceGroup const.
Return a pointer instead of a reference.  This allows making the accessor
const with the least impact.
2014-01-22 21:28:41 +01:00
Stephen Kelly
01d7ceda5d cmMakefile: Trivially constify some methods. 2014-01-22 15:16:53 +01:00
Stephen Kelly
c6c0bd9d2f cmMakefile: Consify custom command API. 2014-01-22 15:16:40 +01:00
Stephen Kelly
d6d4eaac06 cmMakefile: Constify policies accessors. 2014-01-22 15:16:40 +01:00
Stephen Kelly
2a6e56e078 cmCacheManager: Consify version accessors. 2014-01-22 15:16:40 +01:00
Stephen Kelly
5cc9fb0234 cmSourceGroup: Fix method name capitalization.
Adhere to the dominant style.
2014-01-22 15:16:40 +01:00
Stephen Kelly
fe8b0330eb cmMakefile: Constify some cmSourceGroup related code. 2014-01-22 15:16:40 +01:00
Stephen Kelly
b33ea5783a cmMakefile: Make GetProperty const. 2014-01-22 15:16:40 +01:00
Brad King
82d4317503 Allow projects to specify extra inputs to CMake
Define a new 'CMAKE_CONFIGURE_DEPENDS' directory property that projects
can use to specify input files to the CMake configuration process.
Extend the RunCMake.Configure test to verify that the build system
re-runs CMake when this input changes.
2014-01-21 14:14:49 -05:00
Rolf Eike Beer
c768e398f9 cmMakefile: make some methods take const std::string& instead of const char*
Most callers already have a std::string, on which they called c_str() to pass it
into these methods, which internally converted it back to std::string. Pass a
std::string directly to these methods now, avoiding all these conversions.
Those methods that only pass in a const char* will get the conversion to
std::string now only once.
2014-01-16 09:28:29 -05:00
Stephen Kelly
5bb53f6b73 cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy. 2014-01-08 16:41:34 +01:00
Brad King
3a024ce0d8 Merge topic 'unicode-fstream'
5730710 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
2014-01-07 09:39:17 -05:00
Clinton Stimpson
5730710c86 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
Also use SystemTools::Fopen() instead of fopen().
This is to eventually support utf-8 filenames.
2014-01-07 09:27:44 -05:00
Stephen Kelly
272a20f8e5 cmTarget: Don't update IMPORTED target compilation properties
The include_directories() and add_compile_options() commands
should not append to the corresponding target property for IMPORTED
targets.  This is already the case for add_definitions().
2014-01-04 11:28:57 +01:00
Stephen Kelly
0bfcb450e6 INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.
As an INTERFACE_LIBRARY has no direct link dependencies, we can
short-circuit in cmGeneratorExpressionEvaluator and
in cmGlobalGenerator::CheckLocalGenerators.

As they do not generate any output directly, any generate- or install-
related code acn also be short-circuited. Many of the local generators
already do this.

Because only INTERFACE related properties make sense on INTERFACE_LIBRARY
targets, avoid setting other properties, for example via defaults.
2013-11-25 16:17:50 +01:00
Brad King
a6080587aa Merge topic 'use-generator-target'
aa29e64 Add a null check to the generator target accessor.
2013-11-22 08:41:03 -05:00
Nils Gladitz
a02f3d2de0 Add policy CMP0040 to disallow custom commands on missing targets 2013-11-21 09:24:08 -05:00
Stephen Kelly
aa29e64d77 Add a null check to the generator target accessor. 2013-11-21 13:21:43 +01:00
Stephen Kelly
37554acf43 cmMakefile: Make FindTarget const. 2013-11-19 20:40:32 +01:00
Stephen Kelly
50d152035d cmTarget: Make custom command accessors API const.
Add specific mutators instead of providing non-const refs.
2013-11-19 20:40:31 +01:00
Brad King
d1526f825e Refactor internal resource location APIs and initialization
Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources.
Teach it to compute the locations of cmake, ctest, cpack, ccmake, and
cmake-gui executables, and the location of CMAKE_ROOT.  Provide this
information from static cmSystemTools::Get<resource>() methods.
Refactor code that needs these locations to use the new APIs.

Teach FindCMakeResources to use the OS X system API to lookup the
executable location.  When running from the CMake build tree itself,
leave a file in the tree that FindCMakeResources can use to read the
location of the source tree.  This avoids the need to compile the source
tree location into a binary that may be installed and used without the
source tree.

Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build
tree next to "cmake" and the other tools, as is already done in the
install tree for the application bundle.  This ensures a consistent set
of executables are available in one directory.
2013-11-12 08:23:35 -05: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
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
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
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
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