Commit Graph

43519 Commits

Author SHA1 Message Date
Brad King
a1eb03569d file: Change REMOVE to ignore empty names
Previously code like

    file(REMOVE_RECURSE "${accidentally_missing_variable}")

treated the empty string as a relative path with respect to the
current directory and removed its contents.  Change this behavior
to ignore the empty string with a warning instead.

Normally such behavior changes are done with a policy, but in this case
such code is likely a real bug in project code that can delete data.

Fixes: #19274
2019-05-21 09:25:32 -04:00
Kitware Robot
1db0edb2a6 CMake Nightly Date Stamp 2019-05-21 00:01:06 -04:00
Brad King
e025495b85 Merge topic 'makefiles_additional_clean_files'
f945c3e755 Tests: Extend MakeClean test to cover subdirectories without targets
1ded3599d6 Makefiles: Process ADDTIONAL_CLEAN_FILES dir prop at directory level
827da1119e Makefiles: Make build root targets "all", "clean" and "preinstall" recursive
adc3459707 Makefiles: Avoid pointer repurposing
0d41b45cc9 Makefiles: Inline range loop range arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3338
2019-05-20 10:56:22 -04:00
Brad King
a9fb9a8774 Merge topic 'ninja-swift'
a9180ccf9a Tests: add a check for the Swift compiler
d745551fb6 Help: add some initial documentation for Swift support
9a182c9e5b Auxiliary: update vim syntax highlighting
e9b0063e8e Modules: add build rules for Swift Ninja support
b6412e3e38 Ninja: add placeholders to support Swift build
7d7f31161d Ninja: add support for Swift's output-file-map.json
d688c4c19d Swift: remove unnecessary unreleased Ninja infrastructure
0723582208 Swift: Detect compiler version
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3297
2019-05-20 10:55:27 -04:00
Brad King
28ee311490 Merge topic 'FindPNG-static-define'
21c74faa1a FindPNG: Fix definitions on imported target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Paolo Lammens <lammenspaolo@gmail.com>
Merge-request: !3337
2019-05-20 10:04:00 -04:00
Brad King
9860b4c5e8 Merge topic 'interface-library-export-properties'
73a829e078 InterfaceLibrary: Whitelist EXPORT_PROPERTIES property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3336
2019-05-20 10:02:57 -04:00
Kitware Robot
96cf96d4eb CMake Nightly Date Stamp 2019-05-20 00:01:04 -04:00
Kitware Robot
7024fe33b8 CMake Nightly Date Stamp 2019-05-19 00:01:06 -04:00
Craig Scott
dec5693641 Merge topic 'bracket-comment-doc-clarification'
124564504a Help: Clarify that bracket comments start with bracket open

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Acked-by: Ben McMorran <ben.mcmorran@gmail.com>
Merge-request: !3331
2019-05-18 19:24:55 -04:00
Sebastian Holtermann
f945c3e755 Tests: Extend MakeClean test to cover subdirectories without targets
This adds a subdirectory to the MakeClean test, in which files are added to
the `ADDITIONAL_CLEAN_FILES` directory property, but which holds no targets.
2019-05-18 12:27:29 +02:00
Sebastian Holtermann
1ded3599d6 Makefiles: Process ADDTIONAL_CLEAN_FILES dir prop at directory level
In the "Unix Makefiles" generator, the `ADDTIONAL_CLEAN_FILES` directory
property was evaluated on a per target basis. This had two drawbacks:
- per directory clean files were repeated in every target clean script
- per directory clean files weren't removed in directories without targets
  (issue #8164)

This patch moves the `ADDTIONAL_CLEAN_FILES` directory property processing
from the target to the directory level clean target.

Fixes: #8164 "ADDITIONAL_CLEAN_FILES directory property not respected if no
              target present in directory"
2019-05-18 12:27:24 +02:00
Sebastian Holtermann
827da1119e Makefiles: Make build root targets "all", "clean" and "preinstall" recursive
In the "Unix Makefiles" generator, the subdirectory targets "all", "clean" and
"preinstall" in Makefile2 are recursive.  In the build root directory,
these targets aren't.  Instead they're are added separately and additional
dependencies are added on a per target basis.  This is inconsistent and it
complicates per directory commands, like a per directory clean command.

This patch makes the "all", "clean" and "preinstall" targets in Makefile2
in the build root directory recursive, using the same algorithm that is
already used for subdirectories.

Some side effects are:
- Makefile2 gets smaller and simpler
- The main "all", "clean" and "preinstall" targets have recursive dependencies,
  instead of flat (depth of 1) ones.
2019-05-18 12:06:49 +02:00
Marc Chevrier
3bd8ed22e8 Merge topic 'file-install-follow-symlink-chain'
e3ff7ced63 file(INSTALL): Add FOLLOW_SYMLINK_CHAIN argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !3332
2019-05-18 04:25:39 -04:00
Kitware Robot
8ada05980f CMake Nightly Date Stamp 2019-05-18 00:01:11 -04:00
Axel Huebl
21c74faa1a FindPNG: Fix definitions on imported target
The `INTERFACE_COMPILE_DEFINITIONS` property should not have ``-D``
in its value.
2019-05-17 12:07:18 -04:00
Sebastian Holtermann
adc3459707 Makefiles: Avoid pointer repurposing 2019-05-17 17:58:55 +02:00
Sebastian Holtermann
0d41b45cc9 Makefiles: Inline range loop range arguments 2019-05-17 17:58:55 +02:00
Saleem Abdulrasool
a9180ccf9a Tests: add a check for the Swift compiler
This ensures that the tests only run when the Swift compiler is present.
2019-05-17 10:09:35 -04:00
Brad King
94b2c75772 Merge topic 'findblas_mklroot_bla_vendor'
89ab54c112 FindBLAS: Choose MKL arch based on BLA_VENDOR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3330
2019-05-17 09:39:48 -04:00
Brad King
e1c95bc278 Merge topic 'autogen_ninja_clean'
93ee7dd044 Autogen: Update documentation for ADDITIONAL_CLEAN_FILES
4b4fd99f41 Autogen: Use ADDITIONAL_CLEAN_FILES target property for file cleaning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3327
2019-05-17 09:38:44 -04:00
Brad King
21f5ed8091 Merge topic 'use_additional_clean_files'
eda3963615 UseSWIG: Use ADDITIONAL_CLEAN_FILES for cleaning
8c47be28cc UseJava: Use ADDITIONAL_CLEAN_FILES for cleaning
ac86c02d1b UseEcos: Use ADDITIONAL_CLEAN_FILES for cleaning
2532e00339 FindDoxygen: Use ADDITIONAL_CLEAN_FILES for cleaning
4edc0ef359 Test: Improve WarnUnusedCliUnused to run on all generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3328
2019-05-17 09:37:33 -04:00
Brad King
acc2f022bb Merge topic 'offer_compiler_lang_generator_expression'
e214abdaab Genex: Add COMPILE_LANG_AND_ID generator expression
f84ed796a2 Docs: Generator-expressions remove usage of `CMake-id`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3300
2019-05-17 09:27:12 -04:00
Brad King
3020354f7c Merge topic 'string-cleanup'
23e8364aed Source: std::string related cleanup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sebastian Holtermann <sebholt@web.de>
Merge-request: !3324
2019-05-17 09:26:05 -04:00
Brad King
73a829e078 InterfaceLibrary: Whitelist EXPORT_PROPERTIES property
Fixes: #19261
2019-05-17 09:20:04 -04:00
Kitware Robot
736f9d184d CMake Nightly Date Stamp 2019-05-17 00:01:05 -04:00
Kyle Edwards
124564504a Help: Clarify that bracket comments start with bracket open
Fixes: #19264
2019-05-16 17:55:38 -04:00
Kyle Edwards
e3ff7ced63 file(INSTALL): Add FOLLOW_SYMLINK_CHAIN argument 2019-05-16 15:25:33 -04:00
Saleem Abdulrasool
d745551fb6 Help: add some initial documentation for Swift support 2019-05-16 14:41:05 -04:00
Saleem Abdulrasool
9a182c9e5b Auxiliary: update vim syntax highlighting
Add new Swift keywords to the highlighting rules.
2019-05-16 14:41:05 -04:00
Saleem Abdulrasool
e9b0063e8e Modules: add build rules for Swift Ninja support
Add rules to support building Swift sources using Ninja.
2019-05-16 14:41:05 -04:00
Saleem Abdulrasool
b6412e3e38 Ninja: add placeholders to support Swift build
Add the placeholders needed to support compiling Swift code.
2019-05-16 14:41:05 -04:00
Saleem Abdulrasool
7d7f31161d Ninja: add support for Swift's output-file-map.json
Add an emitter for the Swift's output-map-file.json to emit the
requisite support files for Swift compilation.  This additionally
prevents the build rules for the object file emission as well to
properly support the Swift build semantics.
2019-05-16 14:41:05 -04:00
Saleem Abdulrasool
d688c4c19d Swift: remove unnecessary unreleased Ninja infrastructure
This cleans up the new options that were added to support Swift.  This
was not released, and the proper support approach that we settled upon
does not require as much specialised support.
2019-05-16 14:41:05 -04:00
Brad King
0723582208 Swift: Detect compiler version 2019-05-16 14:41:04 -04:00
Brad King
086c51dc04 CMakeDetermineCompilerId: Make CMAKE_${lang}_COMPILER available earlier
If compiler id detection gave us the compiler tool, copy its value to
the `CMAKE_${lang}_COMPILER` variable as early as possible.
2019-05-16 14:31:30 -04:00
Brad King
64a7f491ef Merge topic 'armclang'
7b0abaac31 ARMClang: Add support for Clang-based ARM compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3315
2019-05-16 10:27:44 -04:00
Brad King
92b7a8fa29 Merge topic 'sunpro-supports-cxx14-release-note'
fb39f09dc2 Help: Add release note that SunPro supports C++14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3329
2019-05-16 10:21:56 -04:00
Brad King
9fdad3a601 Merge topic 'FindBoost-allow-root'
e1e3935f5d FindBoost: Remove obsolete diagnostic message about Boost_ROOT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3323
2019-05-16 10:21:02 -04:00
Brad King
62b0d14e24 Merge topic 'update-kwsys'
23b3ca5e1f Merge branch 'upstream-KWSys' into update-kwsys
49f8351a18 KWSys 2019-05-15 (dea11658)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3325
2019-05-16 10:19:51 -04:00
Jakub Benda
89ab54c112 FindBLAS: Choose MKL arch based on BLA_VENDOR
Recently, FindBLAS has been extended with additional library search
path based on the environment variable MKLROOT. However, the choice
of the Intel MKL architecture (IA-32 vs Intel64) was based on
unrelated (and possibly undefined) size of integer.

This commit changes the selection of the Intel MKL architecture to
instead consider the variable BLA_VENDOR, if available.

So, if the environment variable MKLROOT is defined and
BLA_VENDOR=Intel10_32, then $ENV{MKLROOT}/lib/ia32_<OS> will be added
to the search path (OS = lin, win, or mac).

Similarly, if MKLROOT is defined and BLA_VENDOR=Intel10_64lp or
BLA_VENDOR=Intel10_64ilp, then the path $ENV{MKLROOT}/intel64_<OS>
will be used.

If either MKLROOT or BLA_VENDOR is undefined, no additional search
path on top of LD_LIBRARY_PATH / DYLD_LIBRARY_PATH / LIB is be added.
2019-05-16 10:35:37 +01:00
Kitware Robot
82c6ec964d CMake Nightly Date Stamp 2019-05-16 00:01:06 -04:00
Brad King
9ee24ede73 Merge topic 'msvc-jmc'
2a9ff9703e MSVC: Add support for /JMC (Just My Code)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3121
2019-05-15 14:06:58 -04:00
Robert Maynard
fb39f09dc2 Help: Add release note that SunPro supports C++14 2019-05-15 12:29:36 -04:00
Vitaly Stakhovsky
23e8364aed Source: std::string related cleanup 2019-05-15 10:20:05 -04:00
Dennis Klein
e1e3935f5d FindBoost: Remove obsolete diagnostic message about Boost_ROOT
CMake 3.12 introduced <package>_ROOT CMake and environment variables to
be valid hints to find_package(<package>). Defining Boost_ROOT is no
longer wrong if CMP0074 is set to NEW.

Fixes #18810
2019-05-15 15:45:14 +02:00
Sebastian Holtermann
eda3963615 UseSWIG: Use ADDITIONAL_CLEAN_FILES for cleaning
Replace use of the deprecated `ADDITIONAL_MAKE_CLEAN_FILES` directory property
with the new `ADDITIONAL_CLEAN_FILES` directory property.
2019-05-15 15:31:05 +02:00
Sebastian Holtermann
8c47be28cc UseJava: Use ADDITIONAL_CLEAN_FILES for cleaning
Replace use of the deprecated `ADDITIONAL_MAKE_CLEAN_FILES` directory property
with the new `ADDITIONAL_CLEAN_FILES` directory property.
2019-05-15 15:31:05 +02:00
Sebastian Holtermann
ac86c02d1b UseEcos: Use ADDITIONAL_CLEAN_FILES for cleaning
Replace use of the deprecated `ADDITIONAL_MAKE_CLEAN_FILES` directory property
with the new `ADDITIONAL_CLEAN_FILES` directory property.
2019-05-15 15:31:01 +02:00
Sebastian Holtermann
2532e00339 FindDoxygen: Use ADDITIONAL_CLEAN_FILES for cleaning
Replace use of the deprecated `ADDITIONAL_MAKE_CLEAN_FILES` directory property
with the new `ADDITIONAL_CLEAN_FILES` directory property.
2019-05-15 15:28:37 +02:00
Sebastian Holtermann
4edc0ef359 Test: Improve WarnUnusedCliUnused to run on all generators
In the WarnUnusedCliUnused test, the whole CMakeCache.txt was removed in the
clean stage to trigger the same CMake warning in re-builds.  This technique
worked only in the Makefile generators and the test was limited to these.

Now only the variable of interest is removed from the cache by using a
`unset(UNUSED_CLI_VARIABLE CACHE)` statement in the CMakeLists.txt file.
This makes the WarnUnusedCliUnused test run on all generators
2019-05-15 15:28:37 +02:00