17822 Commits

Author SHA1 Message Date
Stephen Kelly
61fe1919de cmAlgorithms: Update concept requirement to FowardIterator 2015-02-20 21:36:58 +01:00
Stephen Kelly
09d6125bfe cmAlgorithms: Move cmRotate out of 'implementation detail' namespace.
This should be generally usable in cmake.
2015-02-20 21:36:58 +01:00
Stephen Kelly
8ed6ecac3f cmRST: Move two algorithms beside each other. 2015-02-20 21:36:58 +01:00
Stephen Kelly
dfe49c2056 cmRST: Use std::min where appropriate. 2015-02-20 21:36:58 +01:00
Stephen Kelly
21b0654ace cmGlobalGenerator: Convert set insert algorithm to vector algorithms.
Adjust test for new error output.
2015-02-20 21:36:57 +01:00
Stephen Kelly
416df93aa9 Convert some raw loops to cmWrap. 2015-02-20 21:36:57 +01:00
Stephen Kelly
37b88d348a cmAlgorithms: Add cmWrap.
Port some existing cmJoin to use it.

cmJoin is cumbersome to use in cases where the objective is to
somehow 'quote' each item and then join it with a separator.  In that
case, the joiner string is harder to read and reason about.  cmWrap
aims to solve that.

Provide an overload taking char wrappers to simplify the case
of surrounding every element in quotes without needing to escape
the quote character.
2015-02-20 21:35:58 +01:00
Stephen Kelly
a281809384 Use cmJoin where possible. 2015-02-20 21:26:18 +01:00
Stephen Kelly
76207b0861 cmCacheManager: Replace loop with algorithm. 2015-02-20 21:26:18 +01:00
Stephen Kelly
60c3bb73e3 cmGlobalGenerator: Replace loop with algorithm. 2015-02-20 21:26:18 +01:00
Stephen Kelly
05fec779d3 cmTarget: Port loop to algorithm. 2015-02-20 21:26:17 +01:00
Nils Gladitz
dc0f3fb44f CPackWIX: Explicitly list CPack WIX headers for IDE convenience. 2015-02-20 17:51:55 +01:00
André Klitzing
7b582d15ff CPack: Print output from codesign if signing fails 2015-02-20 08:17:53 -07:00
Brad King
57d4e1c776 Merge branch 'private-FindJsonCpp' into release 2015-02-20 08:33:03 -05:00
Brad King
a576844263 FindJsonCpp: Drop new module due to upstream jsoncpp providing package
Since jsoncpp 0.7.0 (2014-11-20) the upstream may provide a CMake
package configuration file such that find_package(jsoncpp) will find a
jsoncppConfig.cmake file.  In order to avoid conflicting with this
(especially on case-insensitive filesystems), and since we always prefer
projects to provide package config files (that they maintain), it is
better to not provide FindJsonCpp publicly.

Move FindJsonCpp into a private source directory that is not installed
so that we can still use it for building CMake itself.

Reported-by: Ryan Pavlik <ryan.pavlik@gmail.com>
2015-02-20 08:22:02 -05:00
Brad King
c4c570f9cc Merge topic 'find-command-prefix-from-PATH'
ffc06c12 Teach find_(library|file|path) to get prefixes from PATH (#15370)
2015-02-20 08:10:50 -05:00
Brad King
b7351d8e14 Merge topic 'cmake-gui-reset-generator-toolset-and-platform'
1ade687d cmake-gui: Reset generator platform and toolset on configure (#15411)
2015-02-20 08:10:48 -05:00
Kitware Robot
14713eebfb CMake Nightly Date Stamp 2015-02-20 00:01:16 -05:00
Brad King
ffc06c1239 Teach find_(library|file|path) to get prefixes from PATH (#15370)
The find_package command already knows how to compute installation
prefixes from PATH.  Use the same approach to establish prefixes for
find_library, find_file, and find_path to use to look in directories
like "<prefix>/lib[/<arch>]" and "<prefix>/include" for libraries and
headers.  This will reduce the amount of configuration end users need to
do to establish a work environment rooted under a specific prefix.
2015-02-19 10:03:17 -05:00
Brad King
1ade687d8d cmake-gui: Reset generator platform and toolset on configure (#15411)
At the start of each configure step we already reset the generator
selection (CMAKE_GENERATOR) to match that loaded for the current
project.  Add missing code to reset the generator platform and toolset
(CMAKE_GENERATOR_PLATFORM and CMAKE_GENERATOR_TOOLSET) also so that they
do not leak across projects.
2015-02-19 09:14:38 -05:00
Kitware Robot
f7fc99cec6 CMake Nightly Date Stamp 2015-02-19 00:01:10 -05:00
Stephen Kelly
9c22576787 cmGlobalGenerator: Replace set::insert algorithm with cmRemoveDuplicates. 2015-02-19 00:59:19 +01:00
Stephen Kelly
ee5bc006eb cmGeneratorTarget: Replace set insert algorithm with cmRemoveDuplicates. 2015-02-19 00:59:19 +01:00
Stephen Kelly
b3a0c6e08f cmLocalGenerator: Convert loop to algorithm. 2015-02-19 00:59:19 +01:00
Stephen Kelly
f20a4257f2 cmMakefile: Add flag to result and manipulate in place.
Rather than creating a string, manipulating it, and then
copying it to the result.
2015-02-18 23:57:59 +01:00
Stephen Kelly
ee269f4f16 cmMakefile: Replace two loops with std::replace. 2015-02-18 23:45:19 +01:00
Stephen Kelly
470cff497b cmMakefile: Replace loop with composed algorithm. 2015-02-18 23:45:18 +01:00
Stephen Kelly
e6ca1b8274 cmCTest: Convert loop to member insert. 2015-02-18 21:36:35 +01:00
Brad King
93a38a2abc Merge topic 'minor-cleanups'
6652afe6 CTest: Use clear instead of erase-all.
75661fdf cmListCommand: Move size variable out of loop.
10e53e23 cmAlgorithms: Add missing const to functors.
74906322 cmAlgorithms: Remove sort of already-sorted container.
2acd04c9 cmcmd: Remove some comment copy-pasta.
2d833232 cmCoreTryCompile: Remove variable assignment.
26602cf5 cmLocalGenerator: Move variable population inside of condition.
cfb84834 Update comment to match recent dashboard testing.
6010f936 Revert "cmGlobalGenerator: Fix value type pushed into autogens vector"
0550b9e3 Revert "Attempt to fix the compile of cmake on Sun CC."
1ee4721f Help: Fix formatting of command parameter.
62429a1e cmGlobalGenerator: Remove unneeded pointer check.
c697c1fa cmTarget: Remove template argument workaround.
2015-02-18 12:49:29 -05:00
Kitware Robot
4fb9e847c0 CMake Nightly Date Stamp 2015-02-18 00:01:09 -05:00
Stephen Kelly
6652afe669 CTest: Use clear instead of erase-all. 2015-02-17 20:18:59 +01:00
Stephen Kelly
75661fdfd9 cmListCommand: Move size variable out of loop.
Re-use it where possible in two instances.
2015-02-17 20:18:58 +01:00
Stephen Kelly
10e53e2308 cmAlgorithms: Add missing const to functors. 2015-02-17 20:18:57 +01:00
Stephen Kelly
7490632258 cmAlgorithms: Remove sort of already-sorted container.
The indices is populated by an increasing number.
2015-02-17 20:18:57 +01:00
Stephen Kelly
2acd04c966 cmcmd: Remove some comment copy-pasta. 2015-02-17 20:18:56 +01:00
Stephen Kelly
2d833232a3 cmCoreTryCompile: Remove variable assignment.
The variable is not a reference, and we return in the same scope
after assigning, so it has no effect.
2015-02-17 19:23:27 +01:00
Stephen Kelly
26602cf56c cmLocalGenerator: Move variable population inside of condition.
It is only used in the condition, so no need to look for uses
elsewhere when reading the code.
2015-02-17 19:21:36 +01:00
Stephen Kelly
cfb8483412 Update comment to match recent dashboard testing. 2015-02-17 19:20:23 +01:00
Stephen Kelly
6010f93632 Revert "cmGlobalGenerator: Fix value type pushed into autogens vector"
This reverts commit ae6fc555a7e8929f6d96545bd1137c8bd378566d.

Use the more-natural make_pair algorithm.  The compiler motivating
the need for this is not supported as a host anymore.
2015-02-17 19:19:06 +01:00
Stephen Kelly
0550b9e330 Revert "Attempt to fix the compile of cmake on Sun CC."
This reverts commit a573a856581118d7a9d8dd7be1f613ba7b1ddb04.

The workaround is not needed on supported SolarisStudio compilers.
2015-02-17 19:18:12 +01:00
Stephen Kelly
62429a1e54 cmGlobalGenerator: Remove unneeded pointer check.
Deleting nullptr is ok.
2015-02-17 19:18:11 +01:00
Stephen Kelly
c697c1fafe cmTarget: Remove template argument workaround.
Pre-C++98 compilers required that the template argument be
used in the function parameters.  Those compilers are no longer
supported as hosts, so drop the workaround.
2015-02-17 19:18:11 +01:00
Brad King
5c635fa624 Merge topic 'vs7-OutputDirectory'
fa8b30eb VS: Fix .vcproj and .vfproj file OutputDirectory generation
aa2ba121 VS: Use $(ConfigurationName) as CMAKE_CFG_INTDIR in VS 7, 8, 9
2015-02-17 10:09:13 -05:00
Kitware Robot
034f8e0bd9 CMake Nightly Date Stamp 2015-02-17 00:01:08 -05:00
Brad King
fa8b30ebb5 VS: Fix .vcproj and .vfproj file OutputDirectory generation
Teach cmLocalVisualStudio7Generator to set 'OutputDirectory' using the
same method as is used to set the 'OutputFile' in the generated project
file.  Also, OutputDirectory only needs to be set for targets that run the
linker or librarian.  These two changes make the VS 7 OutputDirectory
consistent with what cmVisualStudio10TargetGenerator generates for OutDir.

Without this, since the VS Intel Fortran plugin for VS >= 10 still uses
the VS 7 .vfproj file format, when executing test VSGNUFortran using
Intel Fortran Compiler 15.xx, the following warning is issued just
before compilation:

  TargetPath(...) does not match the Linker's OutputFile property value (...).
  This may cause your project to build incorrectly.
  To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt)
  property values match the value specified in %(Link.OutputFile).

Subsequently, an error is reported during linking.

Inspired-by: Vincent Newsum <vynewsum@gmail.com>
2015-02-16 11:48:16 -05:00
Brad King
aa2ba12164 VS: Use $(ConfigurationName) as CMAKE_CFG_INTDIR in VS 7, 8, 9
This will allow us to use a value other than just the config name
for the project OutputDirectory setting used for $(OutDir).

Also use $(ConfigurationName) instead of $(OutDir) for the link
directory configuration suffix since that is a hard-coded instance of
a use case for CMAKE_CFG_INTDIR.
2015-02-16 11:48:04 -05:00
Brad King
ec1ec47193 Merge topic 'cmListCommand-algorithms'
116459d3 cmListCommand: Avoid needlessly erasing from vectors.
1c7c35c3 cmListCommand: Replace remove duplicates loop with algorithm.
cebeed24 cmAlgorithms: Add cmRemoveDuplicates algorithm.
3cfe7a4c cmListCommand: Implement REMOVE_ITEM in terms of cmRemoveMatching.
050958a3 cmAlgorithms: Add cmRemoveMatching algorithm.
a77af8f1 cmListCommand: Replace joining loop with cmJoin algorithm.
6a22e401 cmListCommand: Use cmRemoveIndices for REMOVE_AT subcommand.
0b5cf0da cmAlgorithms: Implement algorithm for removing indexes.
069f2440 cmListCommand: Convert loop to find algorithm.
67a26764 cmListCommand: Implement REVERSE subcommand with std::reverse.
1cecd3a5 cmListCommand: Use std::find algorithm for FIND subcommand.
2015-02-16 09:44:44 -05:00
Brad King
7747e1a7f6 Merge topic 'wix-product-fragment'
a2ccbffd CPackWIX: Extend the patching mechanism to allow adding content to <Product>.
2015-02-16 09:44:40 -05:00
Kitware Robot
f724ab5e78 CMake Nightly Date Stamp 2015-02-16 00:01:09 -05:00
Stephen Kelly
116459d34f cmListCommand: Avoid needlessly erasing from vectors.
The entire vector will be destroyed at once at the end of the scope,
and the remove algorithms already give us the end of the range of
interesting values, so just use those sentinals.
2015-02-15 20:47:51 +01:00