Commit Graph

24451 Commits

Author SHA1 Message Date
Brad King
a61ae3fb80 CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES
Other check modules honor this variable, so include file checks should
too.  Add policy `CMP0075` to enable the behavior in a compatible way.

This change was originally made by commit v3.11.0-rc1~108^2
(CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES, 2017-12-24) but it
was reverted by commit v3.11.1~9^2 (Revert "CheckIncludeFiles: Honor
CMAKE_REQUIRED_LIBRARIES", 2018-04-04) because the behavior change could
affect checks in existing projects in an incompatible way.

Fixes: #9514
2018-04-18 08:09:56 -04:00
Brad King
391a5837ee cmake_policy: Add undocumented PARENT_SCOPE option to GET
Policies affecting the behavior of CMake-provided macros and functions
need to be able to get the policy setting as of the call site rather
than the definition site.  Add an undocumented option to do this.
2018-04-18 08:09:56 -04:00
Brad King
3c47ac5b25 OpenWatcom: Add workaround for lack of error on missing library
The OpenWatcom tools do not fail to link when a library is missing if no
symbols were needed from it.  This can break `try_compile` checks.
Teach `cmGlobalGenerator::Build` to pretend that the build tool returned
non-zero if the output contains the corresponding warning.
2018-04-18 08:09:56 -04:00
Brad King
8c2d87dc01 Merge topic 'list-TRANSFORM'
dca2347980 list: Add TRANSFORM sub-command
cdae12f8f8 string() Refactoring: creates an helper for REGEX REPLACE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1938
2018-04-17 07:38:28 -04:00
Brad King
d41e767f2b Merge topic 'vs-conditional-reference-assembly'
c8e98974d8 VS: Disallow ReferenceOutputAssembly in ProjectReference if not possible

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1956
2018-04-17 07:32:11 -04:00
Kitware Robot
6930216013 CMake Nightly Date Stamp 2018-04-17 00:01:04 -04:00
Marc Chevrier
dca2347980 list: Add TRANSFORM sub-command
Issue: #17823
2018-04-16 17:11:53 +02:00
Brad King
5099af044f Merge topic 'vs-cuda-pdb'
134e795fa9 VS: Add workaround for CUDA compiler PDB location

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1960
2018-04-16 09:14:05 -04:00
Brad King
64a5b55088 Merge topic 'fix-explicit-CMakeLists.txt'
0a122393d7 Merge branch 'backport-fix-explicit-CMakeLists.txt'
8480c2afc0 Restore support for explicitly referenced CMakeLists.txt sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1959
2018-04-16 09:09:45 -04:00
Marc Chevrier
cdae12f8f8 string() Refactoring: creates an helper for REGEX REPLACE 2018-04-16 15:04:14 +02:00
Kitware Robot
912c2a6c7f CMake Nightly Date Stamp 2018-04-16 00:01:04 -04:00
Kitware Robot
d244a8ab5b CMake Nightly Date Stamp 2018-04-15 00:01:07 -04:00
Kitware Robot
dfeeaa37ae CMake Nightly Date Stamp 2018-04-14 00:01:07 -04:00
Bastien Schatt
c8e98974d8 VS: Disallow ReferenceOutputAssembly in ProjectReference if not possible
Explicitly turn off `ReferenceOutputAssembly` in `ProjectReference`
elements naming other project files whose types do not produce
assemblies.  We already do this for `C#` but it makes sense for other
languages too.

Fixes: #17906
2018-04-13 13:11:09 -04:00
Brad King
134e795fa9 VS: Add workaround for CUDA compiler PDB location
The CUDA Toolkit Visual Studio Integration does not honor the
`ClCompile.ProgramDataBaseFileName` field when telling `nvcc` how to
invoke `cl`.  Work around this problem by passing `-Xcompiler=-Fd...`
ourselves through `AdditionalOptions`.

Fixes: #17647
2018-04-13 12:56:36 -04:00
Brad King
48d7aa2868 Merge topic 'update-kwsys'
5ebbf2807b Merge branch 'upstream-KWSys' into update-kwsys
e488f73873 KWSys 2018-04-12 (9da3e5bc)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1953
2018-04-13 09:55:40 -04:00
Brad King
0a122393d7 Merge branch 'backport-fix-explicit-CMakeLists.txt' 2018-04-13 09:46:54 -04:00
Brad King
8480c2afc0 Restore support for explicitly referenced CMakeLists.txt sources
Since commit v3.11.0-rc1~467^2 (VS,Xcode: Add CMakeLists.txt sources
without mutating targets, 2017-10-18) we do not add `CMakeLists.txt` to
target sources but instead generate references to them directly.  This
broke projects that explicitly specify their `CMakeLists.txt` file as a
source file because the explicit entry is no longer consolidated with
the generated one.

Teach the relevant generators to avoid duplicating `CMakeLists.txt`
source references and add test cases.

Fixes: #17828
2018-04-13 09:41:06 -04:00
Kitware Robot
07604a767d CMake Nightly Date Stamp 2018-04-13 00:01:04 -04:00
Brad King
5ebbf2807b Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-04-12 (9da3e5bc)
2018-04-12 13:05:38 -04:00
Brad King
498be66fd7 Merge topic 'add_support_for_clr_targets'
312527de47 document COMMON_LANGUAGE_RUNTIME target properties
4b7a82b4ed cmVisualStudio10TargetGenerator: set /clr compiler flag from property
20e31fb4c9 cmExportFileGenerator: add target property for managed targets
411a22706a cmGeneratorTarget: add handling of managed assemblies to HasImportLibrary()
fb433ff283 cmGeneratorTarget: Make import library checks config-aware
4c1f33961f cmGeneratorTarget: add GetManagedType() and CheckManagedType() methods
6c517a9f8d cmGeneratorTarget: add HasLanguage() as wrapper for GetLanguages()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1916
2018-04-12 11:36:28 -04:00
Brad King
2cdefcbe62 Merge topic 'variable_watch-on-PARENT_SCOPE'
65198cfd0f variable_watch: trigger on variables set via PARENT_SCOPE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1948
2018-04-12 11:32:37 -04:00
Brad King
aa5bedc52b Merge topic 'attr-escape'
ff18dce5ed cmVisualStudio10TargetGenerator: Properly escape attributes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1937
2018-04-12 11:29:24 -04:00
Kitware Robot
3551aede35 CMake Nightly Date Stamp 2018-04-12 00:01:03 -04:00
Matteo Settenvini
65198cfd0f variable_watch: trigger on variables set via PARENT_SCOPE
Make sure that we also trigger variable watches when a variable
is set in the parent scope.

Fixes: #17827
2018-04-11 15:02:07 -04:00
Brad King
ded33659b1 Merge topic 'cpack-trace-nullptr'
6f2701abf6 CPack: Fix crash on invalid generator name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1950
2018-04-11 10:33:48 -04:00
Kitware Robot
bb1d1f160f CMake Nightly Date Stamp 2018-04-11 00:01:04 -04:00
Brad King
6f2701abf6 CPack: Fix crash on invalid generator name
In commit v3.11.0-rc1~68^2 (CPack: accept --trace and --trace-expand,
2017-12-09) a nullptr dereference was added that occurs when
`cpack -G NotAGenerator` is invoked.  Add the needed condition.

Fixes: #17900
2018-04-10 15:00:37 -04:00
Brad King
5c10e8f608 Merge topic 'fix-crash-trace-exp-uninit-vars'
aad360eb3d Fix crash with --trace-expand --warn-uninitialized together

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1944
2018-04-10 11:32:56 -04:00
Kitware Robot
e769e61f99 CMake Nightly Date Stamp 2018-04-10 00:01:06 -04:00
R2RT
aad360eb3d Fix crash with --trace-expand --warn-uninitialized together
Some code paths in `ExpandVariablesInString{New,Old}` were not checking
the `filename` parameter for a null pointer, but this can happen when
using the above flags together.  Add the checks and a test case.

Fixes: #17896
2018-04-09 11:59:07 -04:00
Kitware Robot
13f19f7472 CMake Nightly Date Stamp 2018-04-09 00:01:03 -04:00
Kitware Robot
843bd8e91b CMake Nightly Date Stamp 2018-04-08 00:01:04 -04:00
Kitware Robot
9576863d18 CMake Nightly Date Stamp 2018-04-07 00:01:07 -04:00
Brad King
576d01fed4 Merge topic 'ninja-fortran-rspfile'
d6390ce26e Ninja: Fix Fortran support with response files
8592c6326b cmNinjaTargetGenerator: Move force-rspfile check to earlier
e0aa060352 cmNinjaTargetGenerator: Move depfile logic to later in its function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1936
2018-04-06 10:30:40 -04:00
Brad King
607b0ac2f3 Merge topic 'minor-cleanups'
acda926a04 Replace some uses of sprintf with std::to_string
418541035f cmCTestCurl: Fix UploadFile declared parameter names
1519628e60 cmVisualStudio10TargetGenerator: Make NsightTegraVersion unsigned
2f87d00803 cmMacroCommand: Fix format string to match type of argument
b0676cc5d4 Add in-class initialization of some members
966dba5b68 cmAlgorithms: Remove unnecessary typename keyword
12a145534a gitignore: Ignore a .vs directory in the source tree

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1932
2018-04-06 10:29:38 -04:00
Brad King
5454b41e1b Merge topic 'sanitize-LINK_DIRECTORIES'
0ad329f7c0 Sanitize paths from LINK_DIRECTORIES directory property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1920
2018-04-06 10:26:47 -04:00
Brad King
58e847c49a Merge topic 'xml-level'
050ddfb3f3 cmXMLWriter: code improvement

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1925
2018-04-06 10:25:46 -04:00
Brad King
d308e9442e Merge topic 'glob_configure_depends'
6c4f8b4596 Adjust help documentation for file(GLOB), add topic notes
20612978c8 Add tests for `file(GLOB)` CONFIGURE_DEPENDS flag
3f4b81f540 Add glob verify support to XCode, VS, Ninja, and Makefile generators
ca0befc2e1 Add `CONFIGURE_DEPENDS` flag support to cmFileCommand::HandleGlobCommand
599c93e22d Add cmGlobVerificationManager class, integrate with cmake and cmState

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1767
2018-04-06 10:25:08 -04:00
Kitware Robot
2e49bb6434 CMake Nightly Date Stamp 2018-04-06 00:01:03 -04:00
Vitaly Stakhovsky
ff18dce5ed cmVisualStudio10TargetGenerator: Properly escape attributes
In addition to common XML escape characters, attributes require escaping
the double quote character. A new function, cmVS10EscapeAttr is added and
used where appropriate.
2018-04-05 21:20:16 -04:00
jrp2014
acda926a04 Replace some uses of sprintf with std::to_string 2018-04-05 15:34:23 -04:00
jrp2014
418541035f cmCTestCurl: Fix UploadFile declared parameter names
Match the order used in the definition.
2018-04-05 13:42:49 -04:00
jrp2014
1519628e60 cmVisualStudio10TargetGenerator: Make NsightTegraVersion unsigned
It's used in unsigned contexts, such as with format strings.
2018-04-05 13:42:49 -04:00
jrp2014
2f87d00803 cmMacroCommand: Fix format string to match type of argument 2018-04-05 13:42:49 -04:00
jrp2014
b0676cc5d4 Add in-class initialization of some members
Several class constructors leave members uninitialized.  The members are
initialized before use in methods, but it is clearer and less
error-prone to initialize them at their definition site.
2018-04-05 13:42:48 -04:00
jrp2014
966dba5b68 cmAlgorithms: Remove unnecessary typename keyword 2018-04-05 13:42:48 -04:00
Brad King
57c2834da0 Merge topic 'vs10-groups'
30bbb4f2ac cmVisualStudio10TargetGenerator: extend DOM-like generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1905
2018-04-05 13:27:39 -04:00
Brad King
d6390ce26e Ninja: Fix Fortran support with response files
The Ninja generator splits preprocessing and compilation steps for
Fortran.  Fix this logic to work when using response files for
compilation so that it works for the preprocessing step too.

This fixes behavior under `CMAKE_NINJA_FORCE_RESPONSE_FILE`.

Issue: #17877
2018-04-05 13:02:27 -04:00
Brad King
8592c6326b cmNinjaTargetGenerator: Move force-rspfile check to earlier 2018-04-05 12:51:21 -04:00