Commit Graph

17254 Commits

Author SHA1 Message Date
Brad King 58d3898083 Merge branch 'target-sources-error-conditions' into release 2014-12-01 08:55:45 -05:00
Brad King baa283f922 Merge branch 'fix-transitive-OBJECT_SOURCES-context' into release 2014-12-01 08:51:59 -05:00
Kitware Robot b9d437a292 CMake Nightly Date Stamp 2014-12-01 00:01:08 -05:00
Kitware Robot 9e4e0a2307 CMake Nightly Date Stamp 2014-11-30 00:01:08 -05:00
Stephen Kelly e134805666 Export: Disallow export of targets with INTERFACE_SOURCES
This can be allowed in the next release, but it needs to have some
features present and tested such as

* Ensuring that relative paths do not appear in the generated property.
* Ensuring that paths to the source or build directories do not appear.
* Generating a check in the file for CMake 3.1 or later so that the
    resulting property will be consumed.
* Ensuring that any referenced targets are part of an export set and
    generating a check for them.
* INSTALL_INTERFACE and BUILD_INTERFACE content.

All of these checks are already done for INTERFACE_INCLUDE_DIRECTORIES,
but it is too late to add them for INTERFACE_SOURCES for CMake 3.1.
As the checks introduce some new error conditions, it is better to
disallow exporting fully for this case and introduce proper error
conditions later instead of policies.
2014-11-29 12:24:59 +01:00
Stephen Kelly bb5905bb13 cmTarget: Don't allow relative paths in INTERFACE_SOURCES
Follow the pattern of checks that are made for INTERFACE_INCLUDE_DIRECTORIES.
Existence is already checked by cmSourceFile::GetFullPath.  Add a check
to disallow relative paths in source directories. Otherwise code such as

 target_sources(lib1 INTERFACE foo.cpp)

would fail if consumed by a target in a different directory.

Unlike the INTERFACE_INCLUDE_DIRECTORIES behavior, we don't care whether
the entry comes from an IMPORTED target or not.  In the include directories
case, the directory for a non-imported target might not exist yet but
might be created.  In the sources case, a file which does not yet
exist in the filesystem must be explicitly marked with the GENERATED
property.

Adjust existing tests and add a new test for the error.
2014-11-29 12:24:59 +01:00
Kitware Robot 584d625a04 CMake Nightly Date Stamp 2014-11-29 00:01:08 -05:00
Kitware Robot 0963fb64c6 CMake Nightly Date Stamp 2014-11-28 00:01:08 -05:00
Kitware Robot 3fae1f9265 CMake Nightly Date Stamp 2014-11-27 00:01:14 -05:00
Brad King d7e4bd34e0 Merge branch 'fix-source-case-matching' into release 2014-11-26 17:17:41 -05:00
Brad King 84d124e8f0 Fix lookup of source names after conversion to their actual case (#15259)
Since commit v3.1.0-rc1~688^2~15 (cmTarget: Add a method to obtain list of
filenames for sources, 2014-03-17) we have code paths that lookup sources by
strings containing their own full path after normalization to the actual case
on disk.  This fails in the case that a cmSourceFile has already been created
with a different case in the filename.  The comparison of the directory works
because it is always normalized.  Only the comparison of the file name fails.

Fix this by using a case-insensitive comparison of source file names on
platforms that do not have case-sensitive filesystems.
2014-11-26 17:03:40 -05:00
Stephen Kelly 672f1001c0 Genex: Fix evaluation context propagation for TARGET_OBJECTS.
Extract a new method to encapsulate the requirements of evaluating
dependent-expressions, namely, propagation of the
EvaluateForBuildsystem setting, which is missing from the
getLinkedTargetsContent implementation.

Commit v3.1.0-rc1~688^2 (Genex: Only evaluate TARGET_OBJECTS to determine
target sources., 2014-03-20) introduced an error case for use of
TARGET_OBJECTS outside of the context of generating the buildsystem,
as the path to object files may be dependent on buildsystem
variables (See bug #15226).

Commit v3.1.0-rc1~314^2 (Allow INTERFACE_SOURCES to specify
$<TARGET_OBJECTS> (#14970), 2014-07-09) made it possible to
propagate such content to dependent targets.

While that commit propagated the EvaluateForBuildsystem setting
for the case of a TARGET_PROPERTY expression, as generated for
direct dependencies of a target in
cmTargetInternals::AddInterfaceEntries, it did not add propagation
for content from further transitive target dependencies, as determined
by getLinkedTargetsContent.
2014-11-26 22:16:15 +01:00
Brad King 808c77e231 Merge branch 'revert-cached-regex-clear' into revert-cached-regex-clear-for-master
Resolve conflict in Source/cmMakefile.h by integrating both changes.
2014-11-26 13:53:06 -05:00
Brad King 82582c96bd Merge topic 'break-command-strictness'
d54617d0 break: Add policy CMP0055 to check calls strictly
bae604d9 Track nested loop levels in CMake language with a stack of counters
2014-11-26 13:50:47 -05:00
Ben Boeckel 7d674b5f0b Revert "ClearMatches: Only clear matches which were actually set" (#15261)
This reverts commit v3.1.0-rc1~557^2~2 (ClearMatches: Only clear matches
which were actually set, 2014-03-12).  The optimization did not track
the match count in the same scope as the variables, allowing possible
inconsistency.

Resolve conflicts in Source/cmIfCommand.cxx, Source/cmMakefile.cxx,
and Source/cmMakefile.h by moving the changes to the new location
of the code involved.
2014-11-26 13:45:06 -05:00
Brad King 57a77fbe69 Merge topic 'ccmake-system-form'
6b045c3b ccmake: Add CMAKE_USE_SYSTEM_FORM option to use libform instead of cmForm
2014-11-26 10:37:51 -05:00
Kitware Robot 94c7ff9fef CMake Nightly Date Stamp 2014-11-26 00:01:14 -05:00
Gregor Jasny d54617d006 break: Add policy CMP0055 to check calls strictly
Reject break() without loop scope or any arguments.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-11-25 14:14:20 -05:00
Gregor Jasny bae604d9a8 Track nested loop levels in CMake language with a stack of counters
It gets incremented while entering a loop block (e.g. foreach or while)
and gets decremented when leaving the block. Because scope borders for
example at function borders must be taken into account the counter is
put into a stack. With every new scope an empty counter is pushed on the
stack, when leaving the scope the original value is restored.

This will allow easy querying if the break command is properly nested
within a loop scope.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-11-25 14:14:15 -05:00
Ådne Hovda 6b045c3ba8 ccmake: Add CMAKE_USE_SYSTEM_FORM option to use libform instead of cmForm 2014-11-25 11:29:58 -05:00
Brad King c7b9fad117 Merge topic 'remove-ancient-msvc-workarounds'
12cb0b86 Help: Update developer manual with some C++ features now permitted.
ba74465f cmGeneratorTarget: Remove MSVC7 workaround
41363c0c VisualStudio: Remove MSVC6 compatibility macro.
4efcfe52 cmSystemTools: Remove MSVC6 compatibility define.
5f4695cd cmStandardIncludes: Remove MSVC6 condition for cmArrayBegin macro.
7a064337 cmFindCommon: Remove MSVC6 workaround for nested struct private access.
fdb73547 cmTarget: Remove std::min and std::max MSVC6 compatibility code.
2014-11-25 10:28:57 -05:00
Brad King 4987b37165 Merge topic 'remove-c_str'
5eb4d759 Remove some unneeded c_str calls.
2014-11-25 10:18:49 -05:00
Brad King 2fefe9e575 Merge topic 'fortran-linker-flags'
17b0fe03 Fix incremental linking setting for Fortran + VS
2014-11-25 10:18:45 -05:00
Brad King ce64e3607f Merge topic 'cmTarget-null_ptr-everywhere'
32a191ce cmTarget: Use null_ptr code path on all platforms
2014-11-25 10:18:35 -05:00
Brad King 6a2c7e1e0d Merge topic 'file-GENERATE-rerun'
26e98c34 file(GENERATE): Re-run cmake when appropriate.
2014-11-25 10:18:29 -05:00
Brad King c8da86a094 Merge topic 'clean-autogen'
3bd59b60 QtAutogen: Use cmHasLiteral{Prefix,Suffix} where possible.
bf00f528 QtAutogen: Don't take a reference to temporary.
2014-11-25 10:18:23 -05:00
Brad King a5531950cc Merge topic 'ccmake-hpux'
7a687292 ccmake: Cleanup and simplify conditional blocks for HP-UX
44f02b42 ccmake: Use standard getmaxyx instead of non-standard getmax[xy]
ee3d06a4 ccmake: Remove incomplete support for cur_colr on old HP-UX
2014-11-25 10:18:21 -05:00
Brad King 0f19208076 Merge topic 'custom-command-byproducts'
557aef0b ExternalProject: Add options to specify BYPRODUCTS (#14963)
e15a7075 Add an option for explicit BYPRODUCTS of custom commands (#14963)
2014-11-25 10:18:16 -05:00
Kitware Robot c5ac0fce5c CMake Nightly Date Stamp 2014-11-25 00:01:13 -05:00
Kitware Robot 7e8fe68e9c CMake Nightly Date Stamp 2014-11-24 00:01:08 -05:00
Stephen Kelly 5eb4d7590e Remove some unneeded c_str calls. 2014-11-23 11:09:54 +01:00
Kitware Robot 2a0c654858 CMake Nightly Date Stamp 2014-11-23 00:01:08 -05:00
Kitware Robot 2ed0088b2a CMake Nightly Date Stamp 2014-11-22 00:01:07 -05:00
Zack Galbreath 17b0fe0305 Fix incremental linking setting for Fortran + VS
This commit fixes a bug where it was impossible to specify
/INCREMENTAL to Fortran projects built with Visual Studio.

The problem was due to the fact that .vfproj files expect
the value of this flag to be "linkIncremental{No,Yes},
whereas .vcproj files expect this value to be 0, 1, or 2.

The implementation of this fix adds a new data structure for
Visual Studio linker flags specific to Fortran.  This can
easily be extended in the future if more such discrepencies
between C/C++ and Fortran linking are discovered.
2014-11-21 13:32:45 -05:00
Kitware Robot a075777ca1 CMake Nightly Date Stamp 2014-11-21 00:01:11 -05:00
Stephen Kelly ba74465fbc cmGeneratorTarget: Remove MSVC7 workaround
Use partial specialization everywhere.
2014-11-20 23:07:22 +01:00
Stephen Kelly 41363c0c61 VisualStudio: Remove MSVC6 compatibility macro. 2014-11-20 22:25:44 +01:00
Stephen Kelly 4efcfe52f4 cmSystemTools: Remove MSVC6 compatibility define. 2014-11-20 22:24:27 +01:00
Stephen Kelly 5f4695cd06 cmStandardIncludes: Remove MSVC6 condition for cmArrayBegin macro. 2014-11-20 22:22:45 +01:00
Stephen Kelly 7a0643379b cmFindCommon: Remove MSVC6 workaround for nested struct private access. 2014-11-20 22:22:00 +01:00
Stephen Kelly fdb7354722 cmTarget: Remove std::min and std::max MSVC6 compatibility code.
CMake is no longer required to build with MSVC6.
2014-11-20 22:17:16 +01:00
Brad King 32a191ce4b cmTarget: Use null_ptr code path on all platforms
This reduces conversions asked of the compiler.  Also drop 'static' from
the declaration of the local null_ptr helper.
2014-11-20 10:22:07 -05:00
Kitware Robot b6f6b0a983 CMake Nightly Date Stamp 2014-11-20 00:01:08 -05:00
Kitware Robot f7b6f3d967 CMake Nightly Date Stamp 2014-11-19 00:01:08 -05:00
Stephen Kelly 26e98c34dc file(GENERATE): Re-run cmake when appropriate.
Re-run if the input file changes or if the output file is removed.

This only works with the Makefile generators currently.  The limitation
of the Ninja generator is tracked as issue #15256.  The IDE
generators will need larger refactoring as they currently rely on
being able to determine the depends and output files at the start of
generate-time, which is too early for the file(GENERATE) case.
2014-11-19 00:19:09 +01:00
Stephen Kelly 3bd59b6014 QtAutogen: Use cmHasLiteral{Prefix,Suffix} where possible. 2014-11-18 23:20:40 +01:00
Stephen Kelly bf00f5287b QtAutogen: Don't take a reference to temporary.
While a const reference to a temporary is standard conformant,
it doesn't seem to be necessary or advantageous here.
2014-11-18 23:20:40 +01:00
Ådne Hovda 7a68729223 ccmake: Cleanup and simplify conditional blocks for HP-UX 2014-11-18 10:03:35 -05:00
Ådne Hovda 44f02b42fb ccmake: Use standard getmaxyx instead of non-standard getmax[xy]
Swap out getmax[xy]() calls for single call to getmaxyx(), to support
strict X/Open conformant curses implementations, e.g. HP-UX Xcurses.
2014-11-18 10:02:33 -05:00
Ådne Hovda ee3d06a41e ccmake: Remove incomplete support for cur_colr on old HP-UX
Enable support for the more modern Xcurses.
2014-11-18 10:02:08 -05:00
Brad King d526ebc603 Merge topic 'vs-check-phone-store-tools'
689cd0d4 VS: Do not produce WinMD file for OBJECT libraries (#15228)
b20a32ac VS: Improve error messages when compiler is not detected (#15228)
2014-11-18 09:12:34 -05:00
Kitware Robot 52fd5775d1 CMake Nightly Date Stamp 2014-11-18 00:01:08 -05:00
Brad King bea609ac2a Merge branch 'vs-check-phone-store-tools' into release 2014-11-17 15:39:17 -05:00
Brad King 3609fceee7 Merge topic 'ninja-minor-refactoring'
67bd514a Ninja: Refactor restat to be a string internally
ef42e57d Ninja: Use a TARGET_FILE variable to hold the link output file
592644c4 Tests/BuildDepends: Drop unneeded help for Ninja
2014-11-17 11:35:45 -05:00
Brad King 598a316154 Merge branch 'vs14-is-2015' into release 2014-11-17 09:44:52 -05:00
Brad King ec34b4b8f7 Merge branch 'kwsys-SharedForward-vs14' into release 2014-11-17 09:44:45 -05:00
Brad King afc557d10e Merge branch 'upstream-kwsys' into update-kwsys 2014-11-17 09:41:57 -05:00
Brad King 444f61e044 Merge topic 'console-pool'
2d75d7e5 Help: Add notes for topic 'console-pool'
f42d86f0 Ninja: Implement USES_TERMINAL using the console pool if available
f281ae01 Ninja: Remove unused declaration
d5eae556 Ninja: factor out the test for console pool support
4d1fedf4 Give the interactive cache editor the USES_TERMINAL property
fe5d6e8c Add USES_TERMINAL option for custom commands
ad6ee426 Rename doing_verbatim to doing_nothing
2014-11-17 09:40:56 -05:00
Brad King e943fa8a19 Merge topic 'vs14-is-2015'
f5afb90d VS: Rename VS 14 generator to 'Visual Studio 14 2015'
2014-11-17 09:40:51 -05:00
Brad King c61efbd684 Merge topic 'fix-vs2015-warnings'
b138be07 cmVisualStudio10TargetGenerator: fix a narrowing warning
8d379cd7 cmCallVisualStudioMacro: fix a shadowing warning
2014-11-17 09:40:47 -05:00
Brad King 545d10cc67 Merge topic 'string-SUBSTRING-truncate'
474bbb9d string: Tolerate SUBSTRING length exceeding end index
2014-11-17 09:40:44 -05:00
Gilles Khouzam 689cd0d43e VS: Do not produce WinMD file for OBJECT libraries (#15228)
They are implemented as static libraries for the IDE so treat them the
same.
2014-11-17 08:57:14 -05:00
Kitware Robot d42e314900 CMake Nightly Date Stamp 2014-11-17 00:01:07 -05:00
Kitware Robot f1cd1434a4 CMake Nightly Date Stamp 2014-11-16 00:01:07 -05:00
Kitware Robot 08348aec48 CMake Nightly Date Stamp 2014-11-15 00:01:17 -05:00
Brad King 67bd514adc Ninja: Refactor restat to be a string internally
This will allow values other than "" and "1" to be generated in
the rules.ninja file.
2014-11-14 16:16:00 -05:00
Brad King e15a7075b5 Add an option for explicit BYPRODUCTS of custom commands (#14963)
A common idiom in CMake-based build systems is to have custom commands
that generate files not listed explicitly as outputs so that these
files do not have to be newer than the inputs.  The file modification
times of such "byproducts" are updated only when their content changes.
Then other build rules can depend on the byproducts explicitly so that
their dependents rebuild when the content of the original byproducts
really does change.

This "undeclared byproduct" approach is necessary for Makefile, VS, and
Xcode build tools because if a byproduct were listed as an output of a
rule then the rule would always rerun when the input is newer than the
byproduct but the byproduct may never be updated.

Ninja solves this problem by offering a 'restat' feature to check
whether an output was really modified after running a rule and tracking
the fact that it is up to date separately from its timestamp.  However,
Ninja also stats all dependencies up front and will only restat files
that are listed as outputs of rules with the 'restat' option enabled.
Therefore an undeclared byproduct that does not exist at the start of
the build will be considered missing and the build will fail even if
other dependencies would cause the byproduct to be available before its
dependents build.

CMake works around this limitation by adding 'phony' build rules for
custom command dependencies in the build tree that do not have any
explicit specification of what produces them.  This is not optimal
because it prevents Ninja from reporting an error when an input to a
rule really is missing.  A better approach is to allow projects to
explicitly specify the byproducts of their custom commands so that no
phony rules are needed for them.  In order to work with the non-Ninja
generators, the byproducts must be known separately from the outputs.

Add a new "BYPRODUCTS" option to the add_custom_command and
add_custom_target commands to specify byproducts explicitly.  Teach the
Ninja generator to specify byproducts as outputs of the custom commands.
In the case of POST_BUILD, PRE_LINK, and PRE_BUILD events on targets
that link, the byproducts must be specified as outputs of the link rule
that runs the commands.  Activate 'restat' for such rules so that Ninja
knows it needs to check the byproducts, but not for link rules that have
no byproducts.
2014-11-14 16:16:00 -05:00
Brad King ef42e57d47 Ninja: Use a TARGET_FILE variable to hold the link output file
Use an explicit "$TARGET_FILE" variable instead of "$out" so that
we can have multiple output files while still only referencing the
main one in command lines.
2014-11-14 16:16:00 -05:00
Brad King f5afb90d7c VS: Rename VS 14 generator to 'Visual Studio 14 2015'
Now that we know the year component of this VS version we
can add it to the generator name.  For convenience, map
the name without the year to the name with the year.
2014-11-14 14:23:36 -05:00
Brad King 480ed9cdec KWSys SharedForward: Hard-code the ldpath buffer size to below VS 14 limit
Visual Studio 14 (2015) complains if a static character array is
declared with more than 65535 elements.  This limit should be large
enough for SharedForward clients, so just hard-code that instead of
trying to compute a limit.
2014-11-14 13:56:58 -05:00
Peter Collingbourne f42d86f0b8 Ninja: Implement USES_TERMINAL using the console pool if available 2014-11-14 11:56:33 -05:00
Peter Collingbourne f281ae01a2 Ninja: Remove unused declaration 2014-11-14 11:56:33 -05:00
Peter Collingbourne d5eae5563f Ninja: factor out the test for console pool support 2014-11-14 11:56:33 -05:00
Peter Collingbourne 4d1fedf46e Give the interactive cache editor the USES_TERMINAL property 2014-11-14 11:56:33 -05:00
Peter Collingbourne fe5d6e8c0f Add USES_TERMINAL option for custom commands
Teach the add_custom_command and add_custom_target commands a new
USES_TERMINAL option.  Use it to tell the generator to give the command
direct access to the terminal if possible.
2014-11-14 11:55:09 -05:00
Peter Collingbourne ad6ee42627 Rename doing_verbatim to doing_nothing
We are about to introduce another property here, so give this
a better name.
2014-11-14 11:48:47 -05:00
Brad King fbefaaba20 Merge topic 'vs-nsight-tegra-version'
bb3c87f1 VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9
2014-11-14 10:56:44 -05:00
Brad King 810ef59a42 Merge topic 'no-cmake-self-install-when-cross-compiling'
15f55cca Do not use just-built CMake to install itself when cross-compiling (#15248)
2014-11-14 10:56:39 -05:00
Gilles Khouzam b20a32ac73 VS: Improve error messages when compiler is not detected (#15228)
CMake requires both the Desktop SDK and the correct platform SDK
(Windows Phone or Windows Store) to be installed when targeting the
Windows mobile platforms.  Verify that the right platform components are
installed and give a more detailed error message when something is
wrong.
2014-11-14 09:13:27 -05:00
Kitware Robot 0700f2ef19 CMake Nightly Date Stamp 2014-11-14 00:01:13 -05:00
Brad King 6a16d9c7df Merge branch 'vs-nsight-tegra-version' into release 2014-11-13 14:07:10 -05:00
Dmitry Polyanitsa bb3c87f1da VS: Change Nsight Tegra 2.0 Project Revision Number from 8 to 9
A hotfix to Nsight Tegra 2.0 needed to increase the project number.
Teach CMake to generate the newer number for this version.
2014-11-13 14:05:12 -05:00
Ben Boeckel b138be07b4 cmVisualStudio10TargetGenerator: fix a narrowing warning
0xAA literals are integers which doesn't fit into a char array. C++11
says this is an error and VS2015 now warns about it.
2014-11-13 13:28:08 -05:00
Ben Boeckel 8d379cd7ac cmCallVisualStudioMacro: fix a shadowing warning 2014-11-13 13:27:56 -05:00
Domen Vrankar 474bbb9dbc string: Tolerate SUBSTRING length exceeding end index
string SUBSTRING command now ignores length if it points
past end of string and uses end of string instead.
String SUBSTRING tests now cover more corner cases.
2014-11-13 11:04:52 -05:00
Brad King 0d047e81f3 Merge branch 'no-cmake-self-install-when-cross-compiling' into release 2014-11-13 10:22:06 -05:00
Brad King cddb5002b5 Merge topic 'file-GENERATE-source'
b80557c7 file(GENERATE): Evaluate early to allow generating source files
0019d54b Genex: Fix whitespace issue.
2014-11-13 10:08:32 -05:00
Brad King dd89506c1e Merge topic 'refactor-search-path-construction'
1abd7cd9 Use containers of labeled search paths instead of individual members
2a9ac4bd Encapsulate search path manipulation functions into a seperate class.
32922840 Refactor and seperate search path construction for find commands
2014-11-13 10:08:27 -05:00
Brad King 15f55cca59 Do not use just-built CMake to install itself when cross-compiling (#15248)
The special case added by commit v2.4.0~3051 (When building CMake
itself, use the new cmake to install so that the current cmake can be
overwritten, 2004-06-09) does not make sense when cross-compiling.
2014-11-13 08:58:16 -05:00
Kitware Robot e41799d574 CMake Nightly Date Stamp 2014-11-13 00:01:15 -05:00
Stephen Kelly b80557c7bd file(GENERATE): Evaluate early to allow generating source files
The evaluation files must be known before cmTargetTraceDependencies
attempts to find them, but we must actually generate the files after
cmTargetTraceDependencies, as that can add to target SOURCES.  The
limitation is that the generated output name must not depend on the
SOURCES of a target if the generated file is used by that target.

Mark the output files as GENERATED so that trace dependencies does
not expect them to already exist in the filesystem.

Move the invokation of ForceLinkerLanguage in the Generate logic
to after the generated file names are known.  ForceLinkerLanguage
tries to determine the sources of a target (in order to determine
an already-known language) and otherwise fails to get information
about the generated file.

Test that the output of file(GENERATE) can be used as a target source
file and that accessing the target SOURCES in the name of the output
file is an error.  Accessing the TARGET_OBJECTS would be a similar
error if it was legal to use that generator expression in this
context.  That is not currently possible and is a different error
condition, so test the current error output as a reminder to change
the expected output if that becomes possible in the future.  Test
that generated rule files resulting from cmTargetTraceDependencies
appear in the SOURCES generated in the output file.
2014-11-12 22:36:45 +01:00
Brad King 433c6d4689 CMake 3.1.0-rc2 2014-11-12 09:41:58 -05:00
Brad King 7d9611433b Merge topic 'fix-vs12-GetVersionEx-warning'
3a6c3599 Suppress deprecation warnings for GetVersionEx
2014-11-12 09:35:49 -05:00
Brad King 9a4afc1f9f Merge topic 'update-kwsys'
75009e4b Merge branch 'upstream-kwsys' into update-kwsys
35ecc355 KWSys 2014-11-12 (5843f590)
2014-11-12 09:35:48 -05:00
Brad King 5bed08a06d Merge branch 'kwsys-SystemInformation-AIX-_SC_AIX_REALMEM' into release 2014-11-12 09:17:13 -05:00
Brad King 75009e4bcd Merge branch 'upstream-kwsys' into update-kwsys 2014-11-12 08:58:42 -05:00
Chuck Atkins 1abd7cd930 Use containers of labeled search paths instead of individual members
Manage classes of search paths in labeled containers.  This removes the
need to have a seperate member variable for each type of search path, but
also allows path types to be grouped togethor in various different ways
and manipulated as subsets of the full set of search paths.
2014-11-12 08:21:46 -05:00
Kitware Robot 3fdaf78afe CMake Nightly Date Stamp 2014-11-12 00:01:10 -05:00
Stephen Kelly 0019d54b6e Genex: Fix whitespace issue. 2014-11-11 21:20:55 +01:00
Chuck Atkins 2a9ac4bd83 Encapsulate search path manipulation functions into a seperate class.
The functions for adding the various different types of paths have been
factored out into a new class, cmSearchPath.  It is to be used as a helper
container class for the various find_* commands.
2014-11-11 13:39:51 -05:00
Chuck Atkins 32922840e7 Refactor and seperate search path construction for find commands
Prior to this commit, the set of search paths to traverse for find commands
was incrementally constructed.  This change allows each group of paths, i.e.
CMakeVariablePaths, UserHintsPaths, SystemEnvironmentPaths, etc. to be
constructed and manipulated independently, and then all combined togethor.
2014-11-11 13:39:51 -05:00
Brad King ec893d9a26 Merge branch 'fix_link-line-dedup_regression' into release 2014-11-11 12:46:27 -05:00
Brad King 70c2432887 Merge topic 'fix_link-line-dedup_regression'
4db31095 Fix link line order when shared libraries are de-duplicated
2014-11-11 12:45:54 -05:00
Ådne Hovda a234bcafd2 KWSys SystemInformation: Check for _SC_AIX_REALMEM before using it
Add a check for supported flag when querying for system memory on
AIX 5.1.
2014-11-11 09:16:46 -05:00
Brad King 3a6c359906 Suppress deprecation warnings for GetVersionEx
Visual Studio 12 (2013) deprecated GetVersionEx:

  warning C4996: 'GetVersionExW': was declared deprecated

in favor of either "versionhelpers.h" or VerifyVersionInfo, neither of
which exist in some of the older compilers we support.  Rather than
try to port conditionally to VerifyVersionInfo, simply suppress the
warning for now.
2014-11-11 08:55:58 -05:00
Kitware Robot dd563e1eb3 CMake Nightly Date Stamp 2014-11-11 00:01:07 -05:00
Daniele E. Domenichelli 4db31095e5 Fix link line order when shared libraries are de-duplicated
Since commit v3.1.0-rc1~227^2~1 (De-duplicate shared library targets in
generated link lines, 2014-07-30) we de-duplicate shared library targets
on the link line.  However, some toolchains will fail linking if an
executable is linking to a shared library that is not used directly and
a static library that depends on the shared one.  The linker may not
keep the reference to the shared library the first time and then the
symbols needed by the static library may not be found.

Fix this by reversing the direction of the for loop that removes the
duplicate shared libraries, in order to ensure that the last occurrence
of the library is left instead of the first one.

Extend Tests/Dependency with a case covering this behavior.  Create an
executable that links to a shared library and a static library but only
needs the shared library as a dependency of the static library.

Co-Author: Brad King <brad.king@kitware.com>
2014-11-10 14:46:22 -05:00
Brad King a1f964ef68 Merge topic 'make-fortran-preprocessor-assembly-targets'
b6b37e30 Makefile: Add assembly and preprocessed targets for Fortran
0842b084 Makefile: Refactor checks for lang-specific targets and export compile cmds
2014-11-10 10:43:08 -05:00
Brad King 742e6f8f06 Merge topic 'encoding-curl'
e63dcb13 Encoding: Use encoding libcurl expects with file: urls.
2014-11-10 10:43:06 -05:00
Brad King 8532a4f9a0 Merge topic 'file-GENERATE-permissions'
81afbbc0 file(GENERATE): Use permissions of input file if present.
2014-11-10 10:43:04 -05:00
Brad King ee6c79d1a3 Merge topic 'genex-target-objects-ordering'
caa4b7b8 genex: Preserve order while evaluating TARGET_OBJECTS
2014-11-10 10:42:59 -05:00
Tim Gallagher b6b37e3037 Makefile: Add assembly and preprocessed targets for Fortran
Extend the FortranOnly test to cover "make <src>.i" targets.
2014-11-10 10:24:53 -05:00
Kitware Robot a82dde2d3f CMake Nightly Date Stamp 2014-11-10 00:01:07 -05:00
Kitware Robot 13fb4fd167 CMake Nightly Date Stamp 2014-11-09 00:01:08 -05:00
Kitware Robot 5bdb9b6189 CMake Nightly Date Stamp 2014-11-08 00:01:08 -05:00
Clinton Stimpson caa4b7b88b genex: Preserve order while evaluating TARGET_OBJECTS
The logic introduced in commit v3.1.0-rc1~688^2~9 (Genex: Evaluate
TARGET_OBJECTS as a normal expression, 2014-02-26) ordered a map
by pointer value and then constructed a list of object files by
iterating over the map.  This is not deterministic.

Since commit v3.1.0-rc1~688^2~5 (cmTarget: Allow any generator
expression in SOURCES property, 2014-03-18) the order produced by the
above-mentioned logic started being used for the actual list of object
files on the link line.  Since it is not deterministic, spurious
re-links occur after re-running CMake simply because the order of
objects changed on the link line.

Fix this by iterating over the original vector of source files instead
of the map.  This has a deterministic order.
2014-11-07 09:38:00 -05:00
Kitware Robot c60a5f83ce CMake Nightly Date Stamp 2014-11-07 00:01:08 -05:00
Kitware Robot 917da5d027 CMake Nightly Date Stamp 2014-11-06 00:01:08 -05:00
Tim Gallagher 0842b08463 Makefile: Refactor checks for lang-specific targets and export compile cmds
The checks are now split into languages that are able to generate
assembly listings, languages that are able to generate preprocessed
listings, and languages that are able to export the compile commands.
2014-11-05 14:50:16 -05:00
Clinton Stimpson e63dcb1378 Encoding: Use encoding libcurl expects with file: urls.
For unescaped file: URLs on Windows, libcurl expects
the ANSI code page.

This fixes the CMake.FileUpload test when CMake is configured
to use UTF-8 internally with a non-ascii build directory name.
2014-11-05 07:20:21 -07:00
Kitware Robot d5a373a10d CMake Nightly Date Stamp 2014-11-05 00:01:08 -05:00
Stephen Kelly 81afbbc09b file(GENERATE): Use permissions of input file if present. 2014-11-04 22:38:22 +01:00
Brad King 34c16c5558 Merge topic 'update-kwsys'
5868b4e2 Merge branch 'upstream-kwsys' into update-kwsys
72b5b480 KWSys 2014-10-31 (88c8cc7f)
2014-11-04 15:09:41 -05:00
Kitware Robot 38be87caa4 CMake Nightly Date Stamp 2014-11-04 00:01:09 -05:00
Brad King a72ff020db Merge branch 'fix-configure_file-COPYONLY' into release 2014-11-03 09:35:34 -05:00
Brad King 6aa2d47737 Merge topic 'fix-configure_file-COPYONLY'
1531df2b configure_file: Warn about unknown arguments
4abbb140 Qt4: Fix configure_file call to use COPYONLY, not COPY_ONLY
bd7ba8e2 KWSys: Fix configure_file call to use COPYONLY, not COPY_ONLY
e9282782 Help: Fix configure_file call to use COPYONLY, not COPY_ONLY
2014-11-03 09:08:35 -05:00
Kitware Robot 44853be608 CMake Nightly Date Stamp 2014-11-03 00:01:07 -05:00
Kitware Robot 5755d0059a CMake Nightly Date Stamp 2014-11-02 00:01:07 -04:00
Kitware Robot b25a200204 CMake Nightly Date Stamp 2014-11-01 00:01:14 -04:00
Brad King 1531df2b86 configure_file: Warn about unknown arguments
Extend the RunCMake.configure_file test with a case covering possible
common typos of the COPYONLY option.

Reported-by: Iosif Neitzke <iosif.neitzke@gmail.com>
2014-10-31 13:21:21 -04:00
Brad King bd7ba8e25f KWSys: Fix configure_file call to use COPYONLY, not COPY_ONLY 2014-10-31 13:20:19 -04:00
Brad King 5868b4e2fb Merge branch 'upstream-kwsys' into update-kwsys 2014-10-31 13:11:58 -04:00
Brad King f2805bd01b Merge topic 'VERSION_no_sscanf'
ef09df64 cmSystemTools: reimplement verson comparison without sscanf()
667560c8 extend the testing for version comparison
2014-10-31 11:35:06 -04:00
Brad King 163868b311 Merge topic 'xcode-inherit-warning-flags'
820e95d0 Xcode: Inherit global settings in per-target WARNING_CFLAGS (#15224)
2014-10-31 11:34:58 -04:00
Rolf Eike Beer ef09df646a cmSystemTools: reimplement verson comparison without sscanf()
This now has the advantage that it works with version strings with any number
of components.
2014-10-31 11:31:31 -04:00
Brad King 820e95d000 Xcode: Inherit global settings in per-target WARNING_CFLAGS (#15224)
Allow projects to use CMAKE_CODE_ATTRIBUTE_WARNING_CFLAGS to add their
own warning flags and have them used by the targets.
2014-10-31 11:29:53 -04:00
Kitware Robot f274597abb CMake Nightly Date Stamp 2014-10-31 00:01:08 -04:00
Brad King b233a09f6e Merge topic 'unix-icon-install'
fb13502f QtDialog: install the 128x128 icon
fcb4541a QtDialog: don't install desktop file bits on Apple
2014-10-30 14:11:56 -04:00
Brad King 89fd4b82d1 Merge topic 'cpack-bundle-codesign'
bd3fbf36 CPack: Add support for code signing of bundles on MacOS
2014-10-30 14:11:50 -04:00
Brad King 2e953c7657 Merge topic 'fix--D-command-line-parsing'
aee7e4a0 cmCacheManager: parse -D flags more strictly
368e8de4 Tests: test -D parsing on the command line
2014-10-30 14:11:48 -04:00
Kitware Robot 5c5c1e3c7d CMake Nightly Date Stamp 2014-10-30 00:01:08 -04:00
Ben Boeckel fb13502fca QtDialog: install the 128x128 icon
Also only install the icons to the icons directory.
2014-10-29 11:47:29 -04:00
Ben Boeckel fcb4541a05 QtDialog: don't install desktop file bits on Apple
Apple uses the dmg file which doesn't have .desktop support.
2014-10-29 11:38:48 -04:00
Brad King e51cd32de3 Merge topic 'add_javascript_coverage_parser'
220e8134 CTest: Add Javascript coverage parser
2014-10-29 11:31:10 -04:00
Joseph Snyder 220e81345b CTest: Add Javascript coverage parser
Add a coverage parser for the Blanket.js library using the JSON output of
the mocha.js test runner.

Add a test for the new parser.
2014-10-29 11:27:11 -04:00
Kitware Robot 8451f12350 CMake Nightly Date Stamp 2014-10-29 00:01:14 -04:00
André Klitzing bd3fbf36b4 CPack: Add support for code signing of bundles on MacOS 2014-10-28 12:20:05 -06:00
Kitware Robot f1ac5ba5e8 CMake Nightly Date Stamp 2014-10-28 00:01:10 -04:00
Brad King a2456e1572 Merge topic 'autorcc-depends'
6e1c359f QtAutogen: Regenerate qrc files if their input changes (#15074)
a2995318 QtAutogen: Expand rccfiles into a vector early in the autogen process.
506151af QtAutogen: Extract a GetRccExecutable method.
2014-10-27 11:29:17 -04:00
Brad King 8eb64831be Merge topic 'revert-definition-map-lookup'
d1b62185 Merge branch 'parent-scope-tests' into variable-pull-failure
5f414cef Revert "cmDefinitions: Don't store parent lookups"
e0c0b1ac test: add a test for PARENT_SCOPE with multiple scopes
064c415d test: add test for PARENT_SCOPE behavior
2014-10-27 08:32:26 -04:00
Kitware Robot 21cf9364f0 CMake Nightly Date Stamp 2014-10-27 00:01:08 -04:00
Kitware Robot 373b625e4f CMake Nightly Date Stamp 2014-10-26 00:01:07 -04:00
Kitware Robot 97eb511672 CMake Nightly Date Stamp 2014-10-25 00:01:10 -04:00
Stephen Kelly 6e1c359fe9 QtAutogen: Regenerate qrc files if their input changes (#15074)
Get dependencies from the output of ``rcc --list`` if using
Qt 5.  Otherwise process the file in the same way as the
qt4_add_resources macro.

This does not work for RCC files which are generated.

The cmake_autogen build step is implemented as a PRE_BUILD step
of the target currently if possible, rather than a standalone
custom target.  This is to keep the number of (synthesized)
custom targets that appear in the UI low, but in some cases
it is necessary to fall back to a full custom target.

Fall back to a full custom target for the VS builds if autorcc
is used.
2014-10-24 19:45:27 +02:00
Brad King 0c3ddf8b65 Merge branch 'revert-definition-map-lookup' into release 2014-10-24 13:38:32 -04:00
Ben Boeckel 5f414cefb6 Revert "cmDefinitions: Don't store parent lookups"
This reverts commit 5abfde6cb8.

The behaviors associated with implicit pulldown on variable lookup
seriously conflict with the optimizations made in these commits.
Basically, since values were copied upon variable lookup, not just on
PARENT_SCOPE, coupled with PARENT_SCOPE's behavior based on whether the
variable is in the current scope or not causes serious problems with not
storing a value for every variable at every scope.

The commit changed behavior of the following example, among other cases:

  function(test_set)
    set(blah "value2")
    message("before PARENT_SCOPE blah=${blah}")
    set(blah ${blah} PARENT_SCOPE)
    message("after PARENT_SCOPE blah=${blah}")
  endfunction()
  set(blah value1)
  test_set()
  message("in parent scope, blah=${blah}")

Reported-by: Alex Merry <alex.merry@kde.org>
Reported-by: Ben Cooksley <bcooksley@kde.org>
2014-10-24 13:31:21 -04:00
Kitware Robot fbc2a384d8 CMake Nightly Date Stamp 2014-10-24 00:01:08 -04:00
Stephen Kelly a29953180c QtAutogen: Expand rccfiles into a vector early in the autogen process.
This can be re-used as a vector.
2014-10-23 20:35:26 +02:00
Stephen Kelly 506151af51 QtAutogen: Extract a GetRccExecutable method. 2014-10-23 20:35:25 +02:00
Kitware Robot 0213e6944e CMake Nightly Date Stamp 2014-10-23 00:01:13 -04:00
Kitware Robot fc9041d024 CMake Nightly Date Stamp 2014-10-22 00:01:10 -04:00
Brad King 210230e216 Merge topic 'remove-borland-build'
2db55ffa Remove borland workarounds.
2014-10-21 15:08:03 -04:00
Brad King ae5686f8d0 Merge topic 'remove-redundant-c_str'
cc1139cc strings: Remove redundant calls to std::string::c_str()
2014-10-21 15:08:01 -04:00
Brad King 4f9fcd356b Merge topic 'ctest-delphi-coverage'
5c31c3e4 CTest: Add code coverage parser for Pascal/Delphi
2014-10-21 15:07:58 -04:00
Joseph Snyder 5c31c3e4eb CTest: Add code coverage parser for Pascal/Delphi
Add a class to parse the HTML output of the Delphi-code-coverage tool

 http://code.google.com/p/delphi-code-coverage/

Add a test for the new parser.
2014-10-21 15:02:20 -04:00
Kitware Robot ef6ce1f87e CMake Nightly Date Stamp 2014-10-21 00:01:09 -04:00
Ben Boeckel aee7e4a03b cmCacheManager: parse -D flags more strictly
In the case of:

    -DCACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG:BOOL=TRUE

the variable is parsed out as:

    CACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG

because the parser allows '=' in the variable name. Disallow such a name
on the command line.
2014-10-20 12:17:19 -04:00
Kitware Robot a3eeaa63ae CMake Nightly Date Stamp 2014-10-20 00:01:07 -04:00
Kitware Robot a14c449a90 CMake Nightly Date Stamp 2014-10-19 00:01:07 -04:00
Kitware Robot d4525d7288 CMake Nightly Date Stamp 2014-10-18 00:01:07 -04:00
Kitware Robot 6b698bd29f CMake Nightly Date Stamp 2014-10-17 00:01:11 -04:00
Kitware Robot 1d86036df8 CMake Nightly Date Stamp 2014-10-16 00:01:12 -04:00
Stephen Kelly 2db55ffa56 Remove borland workarounds.
CMake 3.0 is the last release to require to be able to build with
Borland.
2014-10-15 23:16:44 +02:00
Nils Gladitz cc1139cc30 strings: Remove redundant calls to std::string::c_str()
Replacements were detected and performed by the clang tool
remove-cstr-calls on a linux build.
2014-10-15 14:54:05 +02:00
Kitware Robot 1b3495d32e CMake Nightly Date Stamp 2014-10-15 00:01:14 -04:00
Brad King a7596fef6e Begin post-3.1 development 2014-10-14 09:29:53 -04:00
Brad King 517e3cd157 CMake 3.1.0-rc1 version update 2014-10-14 09:22:34 -04:00
Brad King 19f87a73bd Merge topic 'fix-comment-typos'
bef23e81 Fix some spelling errors in comments
2014-10-14 09:20:11 -04:00
Kitware Robot 54ff77dc62 CMake Nightly Date Stamp 2014-10-14 00:01:08 -04:00
Geoff Viola bef23e8181 Fix some spelling errors in comments 2014-10-13 10:00:53 -04:00
Brad King cea13d5536 Merge topic 'fix-ninja-rc-include-flags'
f4c5eade Ninja: Fix RC include directories regression
2014-10-13 08:21:04 -04:00
Brad King f4c5eade78 Ninja: Fix RC include directories regression
Changes in commit b9aa5041 (cmLocalGenerator: Simplify GetIncludeFlags
output formatting, 2014-03-04) caused Windows Resource Compiler include
directories to be computed as relative paths in the Ninja generator.
This breaks the cmcldeps handling of include paths.  The reason for the
regression is that several cmLocalGenerator::GetIncludeFlags callers
treated the fourth "bool forResponseFile" argument as if it controlled
whether include directories were a full path.  It actually did control
that by accident until the above commit.

Add an explicit "bool forceFullPaths" argument to GetIncludeFlags
and thread the value through ConvertToIncludeReference as needed.
Update GetIncludeFlags call sites that really wanted to control the
forResponseFile setting to be aware of the new argument.  Extend the
VSResource test to cover this case.
2014-10-13 08:20:05 -04:00
Kitware Robot c11a342e65 CMake Nightly Date Stamp 2014-10-13 00:01:07 -04:00
Kitware Robot 96579778d1 CMake Nightly Date Stamp 2014-10-12 00:01:07 -04:00
Kitware Robot 8189d53127 CMake Nightly Date Stamp 2014-10-11 00:01:15 -04:00
Brad King 26bffa6e74 Merge topic 'fix-OSX-bundle-rpaths-and-Qt5'
631fadea Help: Add notes for topic 'fix-OSX-bundle-rpaths-and-Qt5'
50e261dd OSX: Warn when attempting to change runtime paths on OS X 10.5
9b98fd52 cmake-gui: Make sure we bundle Qt5 Cocoa platform plugin
83a06bb4 BundleUtilities: Framework codesign Resources/Info.plist & Current
f7df82ac BundleUtilities: Resolve & replace @rpath placeholders
14bc686f GetPrerequisites: Make sure dyld placeholders are prefixes
6c313797 BundleUtilities: Use find on UNIX for fast executable lookup
2014-10-10 10:55:44 -04:00
Clinton Stimpson 50e261ddb6 OSX: Warn when attempting to change runtime paths on OS X 10.5
Even though 10.5 supports @rpath, the support is not complete
enough for CMake.  For instance, install_name_tool doesn't support
adding and removing rpaths.

Also modifying BundleUtilities test to remove an undesirable cmake
generated runtime path.  The intent was to build with the install
rpath as is done with the other cases in this test.
2014-10-10 10:17:27 -04:00
Adam Strzelecki 9b98fd528d cmake-gui: Make sure we bundle Qt5 Cocoa platform plugin
Otherwise CMake.app bundle will not run when using Qt5.
2014-10-10 10:17:18 -04:00
Kitware Robot 5ab9aa62fe CMake Nightly Date Stamp 2014-10-10 00:01:09 -04:00
Brad King 4c02746372 Merge topic 'ninja-phony-rules-only-in-build-tree'
de8e534b Ninja: Limit custom command side-effects to build folder
2014-10-09 16:12:01 -04:00
Kitware Robot a358448d3e CMake Nightly Date Stamp 2014-10-09 00:01:08 -04:00
Brad King ec941fc04b Merge topic 'ctest-memcheck-sanitizers'
e0e75a72 Help: Add notes for topic 'ctest-memcheck-sanitizers'
7345a1f7 tests: Add a test for ctest_memcheck MemorySanitizer
0c6330da ctest_memcheck: Add support for MemorySanitizer msan
9ba8bf12 tests: add a test for ctest_memcheck UndefinedBehaviorSanitizer
816c100a ctest_memcheck: Add support for UndefinedBehaviorSanitizer ubsan
b67ef537 ctest_memcheck: Order sanitizer type code consistently
f48a2968 Tests: Organize CTestTestMemcheck inner test code
2014-10-08 10:48:12 -04:00
Brad King de8e534b41 Ninja: Limit custom command side-effects to build folder
Revert commit 7243c951 (Ninja: Don't limit custom cmd side-effects to
build folder, 2014-06-27) because it causes every custom command
dependency in the source tree to get a phony rule.  For large projects
these rules get too big for Ninja to handle efficiently.  While the
original change addressed a valid concern, it did not seem to occur
regularly in practice because well-behaved projects generate their
side-effects only in the build tree.  Until we support explicit
specification of side-effects (CMake issue #14963), we will have to use
this as a middle-ground.
2014-10-08 08:50:15 -04:00
Kitware Robot 734580a8db CMake Nightly Date Stamp 2014-10-08 00:01:08 -04:00
Bill Hoffman 0c6330da38 ctest_memcheck: Add support for MemorySanitizer msan 2014-10-07 15:27:34 -04:00
Ben Boeckel 816c100ae2 ctest_memcheck: Add support for UndefinedBehaviorSanitizer ubsan
UBSan instruments a build and logs messages on any undefined behavior
instances.
2014-10-07 15:27:34 -04:00
Brad King b67ef537d4 ctest_memcheck: Order sanitizer type code consistently
Use alphabetic order everywhere we enumerate the sanitizer types.
2014-10-07 15:27:33 -04:00
Brad King fa56eb56b9 Merge topic 'ctest-memcheck-sanitizers'
f25e431d tests: set sanitizer options properly
f0661bf3 tests: fix copy/paste from tsan -> asan comments
ca9cc25c ctest: add support for additional sanitizer options
0b9ffffc ctest: update documentation for CTEST_MEMORYCHECK_TYPE
2014-10-07 14:45:26 -04:00
Brad King 36c7f66206 Merge topic 'fix-ninja-rsp-var-duplication'
71da30ca Ninja: Fix variable duplication in RSP rules
2014-10-07 14:12:20 -04:00
Brad King 1ed0379f79 Merge topic 'cpack-ifw-updates'
ed9684a2 CPackIFW: Added support for multiple repositories
f9f74874 CPackIFW: Search algorithm update
2014-10-07 14:12:16 -04:00