Commit Graph

15409 Commits

Author SHA1 Message Date
Stephen Kelly 02a545c534 Don't generate subdir convenience rules for IMPORTED targets.
This was missing from commit c34968a9 (Port some of the generator
API to cmGeneratorTarget., 2012-10-10). The generator targets
stored with the cmMakefile include IMPORTED targets, unlike the
accessor for resgular targets. Before this patch, rules would
be generated for Qt5::Core for example, which result in broken
makefiles.
2013-11-29 12:57:24 +01:00
Kitware Robot f0b3502a65 CMake Nightly Date Stamp 2013-11-29 00:01:07 -05:00
Kitware Robot 93d2322e89 CMake Nightly Date Stamp 2013-11-28 00:01:09 -05:00
Stephen Kelly 98093c45db QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property.
Transitively consume the property from linked dependents.

Implement configuration-specific support by following the pattern
set out for compile definitions and includes in cmQtAutoGenerators.

Implement support for origin-tracking with CMAKE_DEBUG_TARGET_PROPERTIES.

This is motivated by the needs of KDE, which provides a separate
translation system based on gettext instead of the Qt linguist
translation system. The Qt uic tool provides command line options
for configuring the method used to translate text, and to add an
include directive to the generated file to provide the method.

 http://thread.gmane.org/gmane.comp.kde.devel.frameworks/7930/focus=7992

Implement the interface to provide the uic options as a usage-requirement
on the KI18n target, as designed for KDE.
2013-11-27 19:06:12 +01:00
Stephen Kelly 02542b4cc7 QtAutoUic: Handle new -include command line parameter. 2013-11-27 19:06:12 +01:00
Stephen Kelly 1242f4e569 Genex: Add {UPPER,LOWER}_CASE and MAKE_C_IDENTIFIER. 2013-11-27 19:06:12 +01:00
Stephen Kelly 754b321272 QtAutogen: Use config without prefix in map key.
This is used by IDE generators to select config-specific includes
and defines.
2013-11-27 19:06:12 +01:00
Kitware Robot d05e0aa845 CMake Nightly Date Stamp 2013-11-27 00:01:12 -05:00
Nils Gladitz 7b390f75e8 CPackWiX: add CPack component support
Creates a hierarchy of WiX features from CPack components and component groups.
Switch to the FeatureTree UI in case components have been defined.
Handles the component REQUIRE and HIDDEN options
and the component group EXPANDED option.
2013-11-26 22:15:57 +01:00
Brad King b80ef72b4d Merge topic 'ninja-compile-link-pool'
7605e37 Ninja: job pool support for compiling and linking
2013-11-26 09:52:35 -05:00
Brad King 3eca31f81a Merge topic 'autogen-depends'
1320e07 cmQtAutogen: Allow specifying depends for autogen targets.
2013-11-26 09:38:40 -05:00
Brad King 235c2d26dc Merge topic 'use-generator-target'
a60cd3d cmGeneratorTarget: Use the output directory to order cmTargets.
2013-11-26 09:38:18 -05:00
Brad King 9498344c9d Merge topic 'watcom-no-prompt'
abd2b36 Watcom: Suppress WMake interactive prompt on error
2013-11-26 09:37:52 -05:00
Brad King 3ad5f9a075 Merge topic 'update-kwsys'
2ba2c43 bootstrap: Add KWSys Encoding and FStream
f668112 Merge branch 'upstream-kwsys' into update-kwsys
704ab3d KWSys 2013-11-21 (1010d0e3)
2013-11-26 09:37:24 -05:00
Brad King 779fd10160 Merge topic 'INTERFACE_LIBRARY-property-whitelist'
5ee9e6b cmTarget: Add whitelist of properties on INTERFACE_LIBRARY.
0bfcb45 INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.
2013-11-26 09:36:58 -05:00
Brad King 48e476c3f4 Merge topic 'ninja-quoted-cmd-commands'
b6f1142 Ninja: multiple commands must be quoted
2013-11-26 09:36:04 -05:00
Brad King e1fd64837d Merge topic 'ninja-msvc-deps-for-intel'
76a8888 Ninja: deptype msvc for Intel's compiler on Windows
2013-11-26 09:35:41 -05:00
Stephen Kelly 5838aba1aa Export: Report error on relative include with genex.
Diagnostics which check the sanity of exported include paths
previously skipped over any path containing a generator expression.

Introduce a policy to issue an error message in such cases.

The export files created in the OLD behavior are not usable, because
they contain relative paths or paths to the source or build location
which are not suitable for use on installation. CMake will report an
error on import.
2013-11-26 13:01:55 +01:00
Stephen Kelly 7a3e45b9d4 Export: Prefix relative items with genexes in INSTALL_INTERFACE.
Code such as

 target_include_directories(foo INTERFACE
   $<INSTALL_INTERFACE:include$<FOO>>
 )

should be treated as a relative directory, despite the genex, after
the INSTALL_INTERFACE is stripped away.

Previously, this would generate a relative directory on export, which
would be an error on import, so no policy is needed.
2013-11-26 13:01:53 +01:00
Stephen Kelly f088a32450 Export: Process INSTALL_INTERFACE in INCLUDES DESTINATION.
Code such as

 install(TARGETS ...
   INCLUDES DESTINATION $<INSTALL_INTERFACE:include>
 )

should behave as if the INSTALL_INTERFACE wrapper were not present.
2013-11-26 13:01:50 +01:00
Stephen Kelly 9eedc850eb Export: Process relative includes after genex evaluation.
In code such as

 install(TARGETS ...
   INCLUDES DESTINATION $<FOO>include
 )

the generator expressions are evaluated at generate-time. Delay
determining whether each entry is a relative path until after
the generator expressions are evaluated. Such relative paths
are based relative to the CMAKE_INSTALL_PREFIX.
2013-11-26 13:01:29 +01:00
Stephen Kelly 38afc82e76 target_include_directories: Allow relative path with genex
Treat paths which are relative and which contain a generator
expression which is not at the beginning as relative to the
source directory.

This matches the behavior of paths which are relative but contain
no generator expression at all.

Previously this would generate a relative path with the IMPORTED
target on export(), which would be a reported as a non-existent
path on import. If used directly in the buildsystem, it would be
reported as a relative path, which is also an error. There is no
need for a policy in this case.
2013-11-26 10:30:18 +01:00
Kitware Robot b4727858c4 CMake Nightly Date Stamp 2013-11-26 00:01:08 -05:00
Stephen Kelly 1320e0768e cmQtAutogen: Allow specifying depends for autogen targets.
Test this by generating files with a custom target, which moc
requires to be present when it is run.
2013-11-25 22:41:21 +01:00
Peter Kümmel 7605e37aab Ninja: job pool support for compiling and linking
Could be tested by setting the environment
variable NINJA_STATUS=[%r]
2013-11-25 22:23:24 +01:00
Stephen Kelly a60cd3d3c6 cmGeneratorTarget: Use the output directory to order cmTargets.
The output directory must be unique, but the source directory
of an add_subdirectory call may be re-used.
2013-11-25 21:13:10 +01:00
Brad King abd2b36089 Watcom: Suppress WMake interactive prompt on error
Add the "-e" option to build.make invocations of wmake as part of
the silencing flags.  From "wmake /?":

 -e erase files after error (no prompt)

This prevents test timeouts on error.
2013-11-25 13:14:38 -05:00
Brad King f668112039 Merge branch 'upstream-kwsys' into update-kwsys 2013-11-25 11:19:42 -05:00
Alex Neundorf 9414217b3b kate: insert build targets
This can be used by the build plugin in kate.
Code is quite similar to the one for Eclipse.

Alex
2013-11-25 10:48:34 -05:00
Alex Neundorf 644e012863 kate: add project generator for the Kate project plugin
This patch adds an extra generator for KDE's kate text editor,
or better more specifically, the project plugin.

Alex
2013-11-25 10:48:33 -05:00
Stephen Kelly 5ee9e6bc11 cmTarget: Add whitelist of properties on INTERFACE_LIBRARY. 2013-11-25 16:23:11 +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 da9bde676c Merge topic 'use-generator-target'
c34968a Port some of the generator API to cmGeneratorTarget.
abb13ea Order cmGeneratorTargetsType elements deterministically.
2013-11-25 08:37:29 -05:00
Brad King e620ede898 Merge topic 'make-cpack-options-boolean'
5bc6444 CPack: use IsOn instead of IsSet for boolean CPack options
2013-11-25 08:37:20 -05:00
Peter Kümmel b6f1142c8b Ninja: multiple commands must be quoted
Bug 14370
2013-11-25 12:08:10 +01:00
Peter Kümmel 76a88888bc Ninja: deptype msvc for Intel's compiler on Windows 2013-11-25 09:08:40 +01:00
Kitware Robot ac2acd22dd CMake Nightly Date Stamp 2013-11-25 00:01:06 -05:00
Kitware Robot 9e952fbf18 CMake Nightly Date Stamp 2013-11-24 00:01:07 -05:00
Kitware Robot 26ccafea46 CMake Nightly Date Stamp 2013-11-23 00:01:08 -05:00
Stephen Kelly c34968a9aa Port some of the generator API to cmGeneratorTarget.
Just enough to reach the BuildMacContentDirectory method and the
NeedRelinkBeforeInstall methods.

In the future, those methods can be moved to cmGeneratorTarget.
2013-11-22 15:06:25 +01:00
Stephen Kelly abb13ea565 Order cmGeneratorTargetsType elements deterministically.
Define a custom ordering functor to deterministically and strictly
order the cmTarget* key. Otherwise the order would be dependent on
runtime pointer values, which breaks assumptions of some generators.

The functor orders first by target name, and then by directory. Multiple
global targets may have the same name, such as edit_cache, but their
directory differentiates them.
2013-11-22 15:06:25 +01:00
Brad King 1744ad9257 Merge topic 'add-cmHasLiteralPrefix'
4fe963f Use new cmHasLiteralPrefix function
7d4b2b2 cmStandardIncludes: Add new cmHasLiteralPrefix function.
2013-11-22 08:41:30 -05:00
Brad King d121a8cb66 Merge topic 'cmake-credits'
8ad8a9b cmake-gui: Reference LGPLv2.1 when redistributing Qt
2013-11-22 08:41:16 -05: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
Brad King 3013a11826 Merge topic 'cross-compiling-toolchain-variables'
7521da2 Introduce CMAKE_STAGING_PREFIX variable.
2013-11-22 08:40:50 -05:00
Brad King ed0b342603 Merge topic 'qt-dialog-reconfigure'
b566987 cmake-gui: Configure again if a variable is changed before Generate is pushed.
2013-11-22 08:40:29 -05:00
Kitware Robot 851e77a4fc CMake Nightly Date Stamp 2013-11-22 00:01:12 -05:00
Stephen Kelly 4fe963f656 Use new cmHasLiteralPrefix function 2013-11-21 20:53:15 +01:00
Stephen Kelly 7d4b2b2ef3 cmStandardIncludes: Add new cmHasLiteralPrefix function.
This allows avoiding error-prone hard-coding of literal
string lengths.

Borland is not able to process the template version of this
method. Make it use the macro version instead. This means
that Borland will also use the macro versions of cmArray*.
2013-11-21 20:53:15 +01:00
Brad King 8ad8a9b1a6 cmake-gui: Reference LGPLv2.1 when redistributing Qt
Download http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt and place
it as Licenses/LGPLv2.1.txt in our source tree.  When building cmake-gui,
use option CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL to enable notification
in the "About" dialog of how the distribution of Qt is licensed.
Install the license file as ${CMAKE_ROOT}/Licenses/LGPLv2.1.txt so that
the dialog can display a path to it.
2013-11-21 11:04:24 -05:00
Brad King d46dfd32c6 Merge topic 'missing-target-error'
a02f3d2 Add policy CMP0040 to disallow custom commands on missing targets
2013-11-21 09:39:39 -05:00
Brad King 392932fb30 Merge topic 'cmake-credits'
6fc4ab9 Credit Kitware and csimsoft for their maintenance roles
2013-11-21 09:39:21 -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 7521da2852 Introduce CMAKE_STAGING_PREFIX variable.
This variable can be useful in cross-compiling contexts where the
sysroot is read-only or where the sysroot should otherwise remain
pristine.

If the new CMAKE_STAGING_PREFIX variable is set, it is used instead
of CMAKE_INSTALL_PREFIX when generating the installation rules in
cmake_install.cmake.

This way, the CMAKE_INSTALL_PREFIX variable
always refers to the installation prefix on the target device, regardless
of whether host==target.

If any -rpath paths passed to the linker contain the CMAKE_STAGING_PREFIX,
the matching path fragments are replaced with the CMAKE_INSTALL_PREFIX.
Matching paths in the -rpath-link are not transformed.

The cross-prefix usr-move workaround is assumed not to require extension
regarding CMAKE_STAGING_PREFIX. The staging area is a single prefix, so
there is no scope for cross-prefix symlinks. The CMAKE_INSTALL_PREFIX
is still used to determine the workaround path, and that variable
remains the relevant one even if CMAKE_STAGING_PREFIX is used. If the
generated export files are deployed to the target, the workaround
will still be in place, and still be employed if required.
2013-11-21 11:48:03 +01:00
Kitware Robot 75bfe4cbd0 CMake Nightly Date Stamp 2013-11-21 00:01:08 -05:00
Clinton Stimpson b566987374 cmake-gui: Configure again if a variable is changed before Generate is pushed. 2013-11-20 21:24:54 -07:00
Brad King a61025135b Merge topic 'constify'
15eeace cmTarget: Trivially make more API const.
be9dfb6 cmTarget: Make GetExportMacro const.
0794c13 cmTarget: Make NameResolvesToFramework const.
1c27521 cmGlobalGenerator: Make NameResolvesToFramework const.
37554ac cmMakefile: Make FindTarget const.
8841d73 cmMakefile: Make IsAlias const.
36e31cd cmTarget: Make GetInterfaceLinkLibraries const.
04d398d cmTarget: Make GetTargetSourceFileFlags const.
50d1520 cmTarget: Make custom command accessors API const.
0f87643 cmGeneratorTarget: Make GetIncludeDirectories const.
2013-11-20 09:08:47 -05:00
Brad King 7df3a10a5e Merge topic 'dev/better-eclipse-language-support'
a990722 eclipse: Support custom natures via a global property
51726cc eclipse: Add natures for Eclipse based on enabled languages
4a352d4 Notify extra generators about languages
2013-11-20 09:08:34 -05:00
Brad King 483b7e7093 Merge topic 'remove-LOCATION-property-use'
a247911 Tests: Don't read the LOCATION property from build targets.
cffcdd8 KDevelop: Use GetLocation(0) instead of LOCATION property.
2013-11-20 09:08:25 -05:00
Brad King b20f4d4dee Merge topic 'fix-help-format-warning-exit'
e7434d4 cmDocumentation: Fix exit after help output format warnings
2013-11-20 09:08:10 -05:00
Brad King a20fd85519 Merge topic 'vs9-map-Fd'
bf1db49 VS: Map /Fd to ProgramDataBaseFileName for VS 7,8,9 (#14577)
2013-11-20 09:07:52 -05:00
Kitware Robot b7cecfcb21 CMake Nightly Date Stamp 2013-11-20 00:01:09 -05:00
Brad King 6fc4ab9b28 Credit Kitware and csimsoft for their maintenance roles
Add maintenance credit to command-line "--version" output and the
cmake-gui "About" dialog.
2013-11-19 18:12:58 -05:00
Nils Gladitz 5bc64440e1 CPack: use IsOn instead of IsSet for boolean CPack options
The CPackComponent macros specifically set CPack options to FALSE
which CPack previously interpreted to mean "true".
2013-11-19 23:52:39 +01:00
Stephen Kelly 15eeacefc5 cmTarget: Trivially make more API const. 2013-11-19 20:40:32 +01:00
Stephen Kelly be9dfb6b2e cmTarget: Make GetExportMacro const.
The std::string member is only used for memory management.
2013-11-19 20:40:32 +01:00
Stephen Kelly 0794c1360d cmTarget: Make NameResolvesToFramework const. 2013-11-19 20:40:32 +01:00
Stephen Kelly 1c2752169c cmGlobalGenerator: Make NameResolvesToFramework const. 2013-11-19 20:40:32 +01:00
Stephen Kelly 37554acf43 cmMakefile: Make FindTarget const. 2013-11-19 20:40:32 +01:00
Stephen Kelly 8841d738cc cmMakefile: Make IsAlias const. 2013-11-19 20:40:32 +01:00
Stephen Kelly 36e31cd127 cmTarget: Make GetInterfaceLinkLibraries const. 2013-11-19 20:40:31 +01:00
Stephen Kelly 04d398d356 cmTarget: Make GetTargetSourceFileFlags const. 2013-11-19 20:40:31 +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 46ec48c93d Merge topic 'cross-compiling-toolchain-variables'
7cd65c9 Add CMAKE_SYSROOT variable to set --sysroot when cross compiling.
5096967 Allow toolchain files to specify an external toolchain.
76552d5 Add compiler target compile options.
f41ecd1 CMakeDetermineCompilerId: Look for internal file only on host
2013-11-19 12:41:57 -05:00
Stephen Kelly 7cd65c97fa Add CMAKE_SYSROOT variable to set --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-11-19 12:39:39 -05:00
Stephen Kelly 5096967ecd Allow toolchain files to specify an external toolchain.
Clang can compile code, but uses the gcc tools for other tasks such
as linking. The -gcc-toolchain option can be used for that, but
generalize so that other compilers can be treated the same.

If such a location is specified, use it as a hint for finding
the binutils executables.
2013-11-19 12:39:34 -05:00
Stephen Kelly 76552d595d 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.

When cross-compiling with clang, use the CMAKE_${lang}_COMPILER_TARGET
as the _CMAKE_TOOLCHAIN_PREFIX to find the appropriate binutils.

When cross-compiling with QNX qcc, use the CMAKE_${lang}_COMPILER_TARGET
to set the appropriate _CMAKE_TOOLCHAIN_PREFIX.
2013-11-19 12:38:53 -05:00
Stephen Kelly cffcdd8331 KDevelop: Use GetLocation(0) instead of LOCATION property.
This can be migrated to use cmGeneratorTarget later.
2013-11-19 18:07:27 +01:00
Stephen Kelly 0f876439e9 cmGeneratorTarget: Make GetIncludeDirectories const. 2013-11-19 18:07:04 +01:00
Ben Boeckel a990722b5a eclipse: Support custom natures via a global property
This is useful for enabling natures not recognized by the Eclipse
generator directly in a project.
2013-11-19 11:48:19 -05:00
Ben Boeckel 51726cce64 eclipse: Add natures for Eclipse based on enabled languages
Also adds support for the Java nature if Java is being used.
2013-11-19 11:48:19 -05:00
Ben Boeckel 4a352d43bb Notify extra generators about languages
Some generators can use the any enabled languages to add extra support
in the relevant build tool. One such is Eclipse since there are many
plugins available for various languages.
2013-11-19 11:48:18 -05:00
Brad King e7434d43ab cmDocumentation: Fix exit after help output format warnings
After warning that a help output format is no longer supported, fix the
return value from cmDocumentation::CheckOptions to indicate that it was
still a help option that was parsed.  Otherwise CMake moves on to treat
the help output file name as a source tree and complains that it does
not exist.
2013-11-19 10:58:16 -05:00
Brad King 1da77bf1ee Merge topic 'cleanup-build-commands'
4cce44b Help: Document the CMAKE_MAKE_PROGRAM variable in more detail
558c74d VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generators
5229f2d Tests: Do not use an explicit make program for VS generators
72dd738 Tests: Fix MFC test heuristic for empty CMAKE_TEST_MAKEPROGRAM
fd6076d Tests: Pass CMAKE_MAKE_PROGRAM instead of --build-makeprogram
68031ab Tests: Configure SubProject-Stage2 test more robustly
003d10c Tests: Simplify VSExcludeFromDefaultBuild configuration
e47d934 Tests: Simplify VSProjectInSubdir configuration
e965cb1 Tests: Simplify CTest.BuildCommand.ProjectInSubdir configuration
72bf255 Tests: Pass --build-options to every test
4d1d772 ctest: Teach --build-options to allow zero options
96966b5 ctest: Make the --build-makeprogram optional for --build-and-test
91a0211 Simplify some calls to cmGlobalGenerator::Build
123a060 Teach GenerateBuildCommand to find its own make program
5f5c92b VS: Add internal APIs to find MSBuild, devenv/VCExpress, and msdev
4ac75fd Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL (#14548)
...
2013-11-19 10:55:39 -05:00
Brad King 6574d3d1d1 Merge topic 'forbid-reserved-targets'
3900fcf CMP0037: Extend policy to reserved names and custom targets
2013-11-19 09:47:32 -05:00
Brad King e752a02368 Merge topic 'fix-remove-forbidden-flags'
3a8f34b Makefile: Remove "forbidden" flags only as a whole
2013-11-19 09:46:59 -05:00
Nils Gladitz 3900fcf4a8 CMP0037: Extend policy to reserved names and custom targets
Teach add_custom_target to check the policy too.  Extend the policy to
disallow reserved target names that we use for builtin targets like
"all".

Extend the RunCMake.CMP0037 test to cover these cases.
2013-11-19 09:44:22 -05:00
Nils Gladitz 3a8f34b98c Makefile: Remove "forbidden" flags only as a whole
Fix CMAKE_<LANG>_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS implementation to
only remove whole flags.  Without this n the Mac we were incorrectly
removing -w from -Wno-write-strings.
2013-11-19 09:39:50 -05:00
Kitware Robot 4bb41b30d6 CMake Nightly Date Stamp 2013-11-19 00:01:07 -05:00
Brad King bf1db4963f VS: Map /Fd to ProgramDataBaseFileName for VS 7,8,9 (#14577)
Since commit 42ba1b08 (VS: Separate compiler and linker PDB files,
2013-04-05) the VS generators no longer add ProgramDataBaseFileName.
Therefore we should allow projects to do so by mapping the /Fd option.
For VS >= 10 our flag tables map /Fd to ProgramDataBaseFileName already.
Add the mapping for VS 7, 8, and 9.
2013-11-18 11:48:38 -05:00
Brad King 558c74d0ab VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generators
Drop the "Modules/CMakeVS*FindMake.cmake" files.  Override the
cmGlobalGenerator::FindMakeProgram method for VS generators to use their
internal APIs to locate the build tool.  Set the CMAKE_MAKE_PROGRAM as a
normal variable for use by project code, but do not cache it.  This will
allow CMake and CTest to select the proper tool at build time.
2013-11-18 11:30:50 -05:00
Brad King 4d1d7725f3 ctest: Teach --build-options to allow zero options
The --build-options option consumes all following arguments until either
--build-target or --test-command.  Fix the logic to allow this to be
zero options.
2013-11-18 11:30:49 -05:00
Brad King 96966b5c80 ctest: Make the --build-makeprogram optional for --build-and-test
GenerateBuildCommand now knows how to lookup CMAKE_MAKE_PROGRAM or
choose a generator-provided default build tool.  Therefore the
--build-makeprogram can now be optional and simply override the
default selection when provided.

Note that with --build-nocmake we now need to load the cache in order to
make the CMAKE_MAKE_PROGRAM entry available to GenerateBuildCommand.
2013-11-18 11:30:49 -05:00
Brad King 91a021146c Simplify some calls to cmGlobalGenerator::Build
Code paths that look up CMAKE_MAKE_PROGRAM from the cache only to
pass it to Build, which only passes it to GenerateBuildCommand,
no longer need to do so.  GenerateBuildCommand now knows how to
look up CMAKE_MAKE_PROGRAM in the cache when no explicit value
is given, so simply pass 0 now.
2013-11-18 11:30:48 -05:00
Brad King 123a0608df Teach GenerateBuildCommand to find its own make program
Add a cmGlobalGenerator::SelectMakeProgram method to select a
caller-provided make program, the CMAKE_MAKE_PROGRAM cache entry, or a
generator-provided default.  Call it from all implementations of the
GenerateBuildCommand method with the corresponding generator's default,
if any.
2013-11-18 11:30:48 -05:00
Brad King 5f5c92b9a2 VS: Add internal APIs to find MSBuild, devenv/VCExpress, and msdev
Teach the VS generators to compute the locations of these tools directly
from registry entries.  Add internal APIs to get the locations on demand.
2013-11-18 08:26:24 -05:00
Brad King 4ac75fdfe6 Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL (#14548)
Historically these were both added for the Makefile and Visual Studio
generators, respectively.  Later the VS generators started using the
CMAKE_MAKE_PROGRAM cache entry to find the IDE build tool, and the
CMAKE_BUILD_TOOL was simply set as an alias.

Fix the documentation to explain that CMAKE_MAKE_PROGRAM is the modern
variable and that CMAKE_BUILD_TOOL is the compatibility alias, not the
other way around.  Replace uses of CMAKE_BUILD_TOOL with
CMAKE_MAKE_PROGRAM in CMake-provided modules.  Nothing needs to lookup
CMAKE_BUILD_TOOL in the cache, so simply set it as a normal variable.
2013-11-18 08:26:23 -05:00
Brad King 0a7f17b870 Tests: Remove unused Source/cmaketest.h.in file
This file has not been used since commit 2c2291bb (add new feature to
ctest so that it can cmake, build and run a test executable, 2004-01-07).
2013-11-18 08:26:22 -05:00
Brad King 8904d1410b cmGlobalGenerator: Cleanup GenerateBuildCommand API
All cmGlobalGenerator::GenerateBuildCommand call sites that need to
produce a string now generate "cmake --build" commands.  The remaining
call sites immediately pass the result to cmSystemTools::RunSingleCommand.
Avoid the intermediate string and argument parsing by directly producing a
vector of strings.  Also drop the ignoreErrors argument because no call
sites remain that use it.
2013-11-18 08:26:21 -05:00
Kitware Robot e099a37afa CMake Nightly Date Stamp 2013-11-18 00:01:10 -05:00
Kitware Robot 89f6857192 CMake Nightly Date Stamp 2013-11-17 00:01:07 -05:00
Kitware Robot c524bdc458 CMake Nightly Date Stamp 2013-11-16 00:01:07 -05:00
Brad King 0814d0a655 cmSystemTools: Add PrintSingleCommand method
Add a method to print a command line for human reference by simply
double-quoting every argument.
2013-11-15 14:40:55 -05:00
Brad King ee6e4ac841 cmSystemTools: Add RunSingleCommand overload for std::vector<std::string> 2013-11-15 14:40:55 -05:00
Brad King 2d072069e2 ctest_build: Use "cmake --build" to launch the native build tool
This avoids requiring cmGlobalGenerator::GenerateBuildCommand to produce
a string so that it can be later refactored to produce a vector with no
quoting or escaping.  It also makes the ctest_build command match what
"ctest -T Build" would run in a build tree configured with the new
build_command() command behavior.  It also ensures that the native build
tool used matches that selected by the configuration of the tree to be
built.
2013-11-15 14:40:04 -05:00
Brad King bca67c710f build_command: Return a "cmake --build" command-line
Re-implement the build_command() command to use "cmake --build" instead
of generating a native build tool invocation directly.  This command
will internally invoke the proper native build tool.

This avoids requiring cmGlobalGenerator::GenerateBuildCommand to produce
a string so that it can be later refactored to produce a vector with no
quoting or escaping.  It will also allow us to later teach CMake to
delay the decision about which build tool to invoke until after the
project build system is generated to disk.  For example, on Visual
Studio 10 and above the preferred command-line tool is MSBuild, but we
need to fall back to devenv if the .sln has Intel Fortran .vfproj files.
2013-11-15 14:38:18 -05:00
Kitware Robot 958367e10c CMake Nightly Date Stamp 2013-11-15 00:01:08 -05:00
Brad King 05923172f9 cmGlobalGenerator: Add method to compute "cmake --build" command line
Create a GenerateCMakeBuildCommand method to generate a command-line
string invoking "cmake --build" for a given target and configuration.
Optionally allow the "-i" make flag and additional native options.
2013-11-14 16:25:31 -05:00
Brad King 1befbfad3d cmGlobalGenerator: Drop unused GenerateBuildCommand implementation
This is a virtual method that is overridden by every generator
subclass.  The base class implementation should never be called,
so replace it with a dummy implementation.
2013-11-14 16:25:31 -05:00
Brad King bd082a29a9 Merge topic 'msvc-encoding'
58e3d49 MSVC: Fix encoding of Visual Studio 10+ project files.
2013-11-14 11:28:19 -05:00
Brad King 15872a3c30 Merge topic 'set_emptyvar_PARENT_SCOPE'
bf755c7 set: Add unit tests for set/unset PARENT_SCOPE
bc280f1 set: Fix handling of empty value with PARENT_SCOPE
20afbd5 set: Handle value-less PARENT_SCOPE explicitly
2013-11-14 11:28:12 -05:00
Clinton Stimpson 58e3d4948d MSVC: Fix encoding of Visual Studio 10+ project files.
Use Windows-1252, which is the same encoding as older
Visual Studio project files.
2013-11-14 11:24:06 -05:00
Kitware Robot becc689127 CMake Nightly Date Stamp 2013-11-14 00:01:10 -05:00
Brad King d592fc48cd Merge topic 'cmake-distribution-config'
06b0dbe OS X: Drop version number from CMake.app bundle name (#11693)
84af42b Configure NSIS-packaged CMake version and install destination
7655029 Configure NSIS-packaged CMake documentation link in Start Menu
2013-11-13 11:36:46 -05:00
Daniele E. Domenichelli bc280f1c81 set: Fix handling of empty value with PARENT_SCOPE
Just as

  set(VAR "")

sets VAR to an empty string in the current scope, the code

  set(VAR "" PARENT_SCOPE)

is documented to set the variable to an empty string in the parent
scope.  Fix the implementation to make it so.
2013-11-13 10:15:56 -05:00
Daniele E. Domenichelli 20afbd5e03 set: Handle value-less PARENT_SCOPE explicitly
The code "set(VAR PARENT_SCOPE)" unsets VAR in the parent scope.
Implement this case explicitly next to where "set(VAR)" is explicitly
handled to unset VAR in the current scope.
2013-11-13 10:14:21 -05:00
Brad King 558a6f1f92 Merge topic 'cmake-copyright-year'
3bade75 Help: Parse Copyright.txt instead of using current year
2bbf6bd Copyright.txt: Add test to check year range
3ee67d0 Copyright.txt: Update year range to end in 2013
621ba1f cmake-gui: Parse Copyright.txt instead of duplicating notice
993b685 bootstrap: Parse Copyright.txt instead of duplicating notice
2013-11-13 09:59:12 -05:00
Brad King 978d796e8d Merge topic 'policy-summary-periods'
49cbca6 CMP0038: Add missing '.' to policy summary line
7390002 CMP0039: Add missing '.' to policy summary line
2013-11-13 09:58:50 -05:00
Brad King 3c4071bec4 Merge topic 'fix-INTERFACE-with-no-SHARED-libs'
64f73b0 add_library: Fix INTERFACE on platforms with no shared libs (#14561)
2013-11-13 09:57:20 -05:00
Brad King 3822f5bcac Merge topic 'wix-custom-arguments'
096591b CPackWiX: Add variables for custom tool extensions and flags
2013-11-13 09:56:30 -05:00
Brad King 11fe43422f Merge topic 'cleanup-edit_cache-target'
684063c Refactor tool selection for edit_cache (#14544)
eaf5b7a cmGlobalGenerator: Do not propagate const through GetCMakeInstance
2013-11-13 09:55:17 -05:00
Kitware Robot 706aab0418 CMake Nightly Date Stamp 2013-11-13 00:01:08 -05:00
Brad King 621ba1fd04 cmake-gui: Parse Copyright.txt instead of duplicating notice
Set the cmake-gui MACOSX_BUNDLE_COPYRIGHT property by parsing the
copyright notice line out of Copyright.txt instead of duplicating it.
2013-11-12 16:35:17 -05:00
Brad King 06b0dbe061 OS X: Drop version number from CMake.app bundle name (#11693)
Always name the application bundle "CMake.app".  Users can rename it
after installation if they wish.  This is the typical approach used by
OS X applications, including Xcode.  It allows CMake to be upgraded
without manually re-running CMake in every build tree to update the path
to CMake.  It also makes the executable location in the CMake build tree
more predicatable.
2013-11-12 15:47:06 -05:00
Nils Gladitz 096591b96a CPackWiX: Add variables for custom tool extensions and flags 2013-11-12 14:10:01 -05:00
Daniele E. Domenichelli 7390002964 CMP0039: Add missing '.' to policy summary line 2013-11-12 11:54:14 -05:00
Stephen Kelly 64f73b0fb6 add_library: Fix INTERFACE on platforms with no shared libs (#14561) 2013-11-12 09:07:10 -05:00
Brad King 684063c036 Refactor tool selection for edit_cache (#14544)
Refactor edit_cache tool selection to ask each global generator for its
preference.  Teach the Ninja generator to always use cmake-gui because
Ninja by design cannot run interactive terminal dialogs like ccmake.
Teach the Makefile generator to use cmake-gui when also using an "extra"
generator whose IDE has no terminal to run ccmake, and otherwise fall
back to CMAKE_EDIT_COMMAND selection for normal Makefile build systems.
2013-11-12 08:47:19 -05:00
Brad King eaf5b7a776 cmGlobalGenerator: Do not propagate const through GetCMakeInstance
Combine the const and non-const GetCMakeInstance to a const one and
return a pointer to non-const cmake from it.
2013-11-12 08:43:33 -05:00
Brad King d3f7fa22ed Merge topic 'pp-transitive-property-handling'
77a0fd5 Genex: Use a preprocessor foreach to follow transitive properties.
1464933 Genex: Simplify the preprocessor looper for interface properties.
2013-11-12 08:32:13 -05:00
Brad King a4b9adec89 Merge topic 'constify'
dcac9be Make accessors for compile-related information const.
19a8a3c cmTarget: Don't finalize include directories in GetIncludeDirectories.
3305364 cmGlobalGenerator: Rename the FinalizeCompileDefinitions method.
2013-11-12 08:32:08 -05:00
Brad King a1e22f6917 Merge topic 'cmake-internal-locations'
d1526f8 Refactor internal resource location APIs and initialization
2013-11-12 08:31:56 -05:00
Brad King cb4a4686ac Merge topic 'clear-generator-data'
00055ce cmExportSetMap: Override clear() to delete held resources
2013-11-12 08:31:39 -05: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
Kitware Robot 4a762aa312 CMake Nightly Date Stamp 2013-11-12 00:01:07 -05:00
Kitware Robot 13da9f0024 CMake Nightly Date Stamp 2013-11-11 00:01:11 -05:00
Kitware Robot 6f2ec64504 CMake Nightly Date Stamp 2013-11-10 00:01:08 -05:00
Stephen Kelly 77a0fd5135 Genex: Use a preprocessor foreach to follow transitive properties. 2013-11-09 20:31:35 +01:00
Stephen Kelly 146493363e Genex: Simplify the preprocessor looper for interface properties.
By removing the INTERFACE_ prefix, we can use this in more contexts.
2013-11-09 20:31:35 +01:00
Stephen Kelly dcac9be6aa Make accessors for compile-related information const.
These can be moved to cmGeneratorTarget in CMake 4.0.
2013-11-09 20:30:46 +01:00
Kitware Robot 781467bf42 CMake Nightly Date Stamp 2013-11-09 00:01:10 -05:00
Brad King 2053e0cd51 Merge topic 'tll-target-policies'
596b2a8 Disallow linking to utility targets (#13902).
301bb5c Disallow link-to-self (#13947).
05f5fde Disallow invalid target names (#13140)
2013-11-08 10:33:14 -05:00
Brad King 00055ce76d cmExportSetMap: Override clear() to delete held resources
Replace the std::map<>::clear() method with one that first deletes
the cmExportSet instances held by each map entry, and then clears.
Otherwise the cmGlobalGenerator::ClearGeneratorMembers added by
commit 5cf1120f (cmGlobalGenerator: Refactor member cleanup between
configures, 2013-11-04) leaks the cmExportSet instances.
2013-11-08 09:35:56 -05:00
Kitware Robot 4d76bcc817 CMake Nightly Date Stamp 2013-11-08 00:01:19 -05:00
Stephen Kelly 19a8a3c4c8 cmTarget: Don't finalize include directories in GetIncludeDirectories.
Rely on that having been done by the cmGlobalGenerator.
2013-11-07 14:11:31 +01:00
Stephen Kelly 3305364f83 cmGlobalGenerator: Rename the FinalizeCompileDefinitions method.
This will soon also finalize include directories.
2013-11-07 14:11:30 +01:00
Stephen Kelly 596b2a8c08 Disallow linking to utility targets (#13902). 2013-11-07 11:06:40 +01:00
Stephen Kelly 301bb5cdda Disallow link-to-self (#13947). 2013-11-07 11:06:39 +01:00
Stephen Kelly 05f5fde0eb Disallow invalid target names (#13140)
Exclude Borland and NMake from the CMP0037 test. They do not accept
the colon in a target name.
2013-11-07 11:06:39 +01:00