Commit Graph

43765 Commits

Author SHA1 Message Date
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
Ruslan Baratov
a59662bb5b Help: Add CheckIPOSupported link to INTERPROCEDURAL_OPTIMIZATION 2019-05-17 20:46:00 +03:00
Zsolt Parragi
b7d5ef23e9 cmGlobalNinjaGenerator: use gnu compatible paths with clang in gnu mode 2019-05-17 19:11:34 +02:00
Zsolt Parragi
3d0210d8dc binutils: add the llvm-* variants to the tool lists.
This allows cmake to use the ar/ranlib/objdump/ld tools on windows
without mingw installed.

These tools are selected when clang is in GNU command line mode.
2019-05-17 19:11:34 +02:00
Zsolt Parragi
53fbe23f3f clang: introduce CMAKE_<lang>_COMPILER_FRONTEND_VARIANT
This variable is set to GNU on Windows when clang.exe ar clang++.exe is
used, and set to MSVC for clang-cl.exe.

CMAKE_<lang>_SIMULATE_ID is set to MSVC in both cases, as clang defaults
to -fms-compatibility for all command lines on windows.
2019-05-17 19:11:34 +02: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
Eicke Herbertz
083cf7e8a2 cmake: Allow default generator to be set by environment variables
When there is no Generator available in the Cache, this will read
CMAKE_GENERATOR from environment before using the CMake platform default.
If CMAKE_GENERATOR is empty, use the platform default.

If a environment default generator is specified, subsequent variables
CMAKE_GENERATOR_(INSTANCE,PLATFORM,TOOLSET) are also evaluated
in the same way.
2019-05-16 23:00:27 +02: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
Sebastian Holtermann
93ee7dd044 Autogen: Update documentation for ADDITIONAL_CLEAN_FILES
Update the AUTOGEN documentation for the use of `ADDITIONAL_CLEAN_FILES`
instead of `ADDITIONAL_MAKE_CLEAN_FILES`.
2019-05-15 15:28:17 +02:00
Sebastian Holtermann
4b4fd99f41 Autogen: Use ADDITIONAL_CLEAN_FILES target property for file cleaning
The `ADDITIONAL_CLEAN_FILES` target property works on multiple generators
to remove addition files at the clean target.  In `AUTOGEN` use it instead of
the deprecated and limited `ADDITIONAL_MAKE_CLEAN_FILES` directory property
to remove `AUTOGEN` generated files.

Fixes: #17074 "Autogen: clean target with ninja generator doesn’t clean
               autogen files"
2019-05-15 15:28:17 +02:00
Brad King
66efdbd21a Merge topic 'additional_clean_files'
b5bf369ec6 Release notes: Add release notes for ADDITIONAL_CLEAN_FILES properties
4e2ce0a67a Doc: Update and deprecate ADDITIONAL_MAKE_CLEAN_FILES directory property
338994d65d Doc: Add documentation for ADDITIONAL_CLEAN_FILES properties
c11f089d73 Tests: Extend MakeClean test to cover ADDITIONAL_CLEAN_FILES
012d599e26 Ninja: Add support for ADDITIONAL_CLEAN_FILES target property
890a1b9dc3 Ninja: Add support for ADDITIONAL_CLEAN_FILES directory property
7b23001f20 Ninja: Add support for additional clean files
d745df4b01 Makefiles: Add support for ADDITIONAL_CLEAN_FILES target property
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3318
2019-05-15 09:22:18 -04:00
Brad King
0064edf417 Merge topic 'ninja-pool-custom-command'
9f76961de8 Support job pools in custom commands and targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3308
2019-05-15 09:21:08 -04:00