ec409a11 Vs: fix CSharp custom command by introducing inline MSBuild <Targets>s
dcdab5cf Vs: factor out computation of <Link> tag for CSharp source files
0a8f469a Vs: refactor WriteCustomRule for preparation of CSharp support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !970
e03a1b3b target_compile_features: Do not crash on non-enabled language
86990427 Tests: Enable languages explicitly in RunCMake.target_compile_features
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1010
We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and
Fortran languages. Do not try to enable support for other languages.
Furthermore, each language builds with a different compiler, so check
for support by CMake and the compiler for each language independently.
Fixes: #16944
Add a `CUDA_COMPILER_LAUNCHER` target property like those added for C
and CXX by commit v3.4.0-rc1~450^2 (Add options to launch the compiler
through tools like ccache or distcc, 2015-06-04).
Fixes: #16953
Previously `file(GENERATE)` did not define any behavior for relative
paths given to the `OUTPUT` or `INPUT` arguments. Define behavior
consistent with CMake conventions and add a policy to provide
compatibility for projects that relied on the old accidental behavior.
Fixes: #16786
If CONFIG or MODULE is given and the package is not REQUIRED,
output a one-liner instead of the full warning.
Update Tests/RunCMake/find_package expected output to match.
Remove highly specialized and totally positional argument handling in
find_dependency macro, and instead just pass arguments through to
find_package. This gives users access to the full suite of arguments
that find_package knows, and is backward compatible with the old
arguments.
Also, rewrite the unit tests for this, since the old tests are
exclusively focused on testing the old argument handling and are no
longer applicable, and add some success tests (the old tests did not
even set up the CMake state in a way that CMake had any hope of ever
finding the test package).
fe8f08d2 find_*: Add docs for PackageRoot search path group
57744ca9 find_*: Add tests for PackageRoot search path group
ef3d360a find_*: Add a new PackageRoot search path group
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !796
The `CMP0022-WARN-tll` case overrides legacy properties set by
`target_link_libraries` so that we can verify that the policy
warning is emitted. When building in the Debug configuration,
the `_DEBUG` variant of the legacy property is set/checked too.
Fix the test case to override both variants. Previously it only
passed because `cmComputeTargetDepends::AddInterfaceDepends`
always evaluated dependencies with the "" configuration.
Put commands that contain `||` into brackets to avoid early abort of
execution by `cmd.exe` because `||` has higher precedence than `&&` in
`cmd.exe`.
Add test to check for command execution after `||` as part of a
parameter and as command separator.
Fixes: #16850
Allow CTest script writers to specify additional HTTP headers to be sent
to CDash during submission.
The motivating case for this feature is a corresponding change in CDash.
This will allow projects to refuse submissions from any site not bearing
a valid authentication token.
851b6c15 cmCTestTestHandler: indicate why a test did not run
25a7f14f Help: add release notes
ab8bbef9 cmCTestTestHandler: count skipped tests as disabled
202a44a4 cmCTestRunTest: do not count skipped tests as failed
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !741
Use the `IMPLICIT_DEPENDS` option of `add_custom_command` and place the
command in a custom target. Verify that `INCLUDE_DIRECTORIES` of that
custom target are honored. This is a case that was not really designed
to work but happens to work, is useful, and makes sense. Add a test
case make sure it continues to work.
Issue: #16830
The `Skipped` status is basically a runtime version of the `Disabled`
status (set as a property on the test by the configure step), so treat
them the same.
7373b389 Xcode: Drop support for Xcode versions below 3
eaf53849 Xcode: Compute version number earlier
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Gregor Jasny <gjasny@googlemail.com>
Merge-request: !737
The OLD behaviors of all policies are deprecated, but only by
documentation. Add an explicit deprecation diagnostic for some policies
to encourage projects to port away from setting policies to OLD.
Previously, given two libraries, X and Y where X depends on Y, all
object compilations of X would require the Y library to have been linked
before being compiled. This is not necessary and can instead be loosened
such that object compilations of X only depend on the order-only
dependencies of Y to be completed. This is to ensure that generated
sources, headers, custom commands, etc. are completed before X starts to
compile its objects.
This should help build performance in projects with many libraries which
cause a deep library dependency chain. Previously, a library at the
bottom would not start compilation until after all other libraries
completed, but now only its link step needs to wait and its compilation
jobs can be run in parallel with other tasks.
Fixes: #15555
eec93bce Allow OBJECT libraries to be installed, exported, and imported
93c89bc7 Genex: Allow TARGET_OBJECTS to be used everywhere
ac0cf7ff Genex: Reject TARGET_OBJECTS on non-object libraries earlier
8577978c Tests: ExportImport C code should use explicit (void) in prototypes
26cfd039 cmInstallTargetGenerator: Re-order GenerateScriptForConfig logic
25f3f22a cmGlobalGenerator: Add method to check if object file location is known
d596c550 cmGeneratorTarget: Add method to get the object file directory
930042f2 cmGeneratorTarget: Factor out a GetTargetObjectNames method
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !712
Teach install() and export() to handle the actual object files.
Disallow this on Xcode with multiple architectures because it
still cannot be cleanly supported there.
Co-Author: Brad King <brad.king@kitware.com>
Previously the `TARGET_OBJECTS` generator expression was limited
only to use in a buildsystem context so that Xcode's placeholders
in object file paths can be evaluated. Lift this restriction so
that the expression can at least be used in most settings.
Co-Author: Brad King <brad.king@kitware.com>
Move the diagnostic that rejects the TARGET_OBJECTS generator expression
in non-buildsystem context until after the check for whether the named
target is an object library. This order will makes more sense than the
previous order once TARGET_OBJECTS is allowed in non-buildsystem
context.
Refactoring in commit 60307c5056 (cmGeneratorTarget: Replace source
classifier implementation, 2017-04-07) accidentally regressed support
for CMP0026's OLD behavior in the case of a source file written by
project code during the configure step after getting a LOCATION. We
should not perform full source classification until the generate step
because files written by the project's configure step may not exist yet.
Add special logic to support this case. Add a test case for it.
Reported-by: David Stoup <david.stoup@kitware.com>
Add a `FILES_FROM_DIR` option to install a specific set of files
specified relative to a given directory and preserve their layout
in the destination. Currently we intend to use this internally
to implement other things so we don't provide an `install()`
porcelain or documentation yet.
It is quite often the project description has used in a real world software.
Examples include:
* part of a help screen of the application
* builtin resources (`*.rc` files, data for "About" dialog of a GUI app, & etc)
* most generators for CPack can use it
* it could be used by documentary software (Doxygen, Sphinx) which is usually
integrated to CMake based projects via `add_custom_target()`
Now `project()` call learned an optional `DESCRIPTION` parameter with a
short string describing a project. Being specified, it would set the
`PROJECT_DESCRIPTION` variable which could be used in `configure_file()`
or whatever user wants. Also `PROJECT_DESCRIPTION` is a default value
for `CPACK_PACKAGE_DESCRIPTION_SUMMARY`.
dfa8263f Implement interprocedural optimization for GNU compilers
1588a577 Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION
a7575700 Refactoring: s,GetFeatureAsBool,IsIPOEnabled,
e05835c3 CheckIPOSupported: Visual Studio and Xcode generators do not support IPO
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Nils Gladitz <nilsgladitz@gmail.com>
Merge-request: !568
Previously the `INTERPROCEDURAL_OPTIMIZATION` target property was
honored only for the Intel compiler on Linux and otherwise ignored. In
order to add support for more compilers incrementally without changing
behavior in the future, add a new policy whose NEW behavior enforces the
`INTERPROCEDURAL_OPTIMIZATION` property. Add flags for supported
compilers and otherwise produce an error.
When this property is set, the test is skipped and its status is
automatically set to 'Not Run'. A disabled test will not be counted in
the total number of tests and its completion status will be 'Disabled'.
Build id links generation was introduced
in rpm 4.13.0.1 so files related to them
should be ignored as they are not relevant
for the tests.
Fixes#16710
b5189fda Apple: Add test for bundle resource layout
c51c2cfa Apple: Fix Resources location for all generators
060be58c Xcode: Properly handle Bundle Resources with more than one hierarchy level
484ccb0c Xcode: Properly handle non-resource Bundle files on iOS
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !613
Encountered on OS X 10.4 with old Xcode:
Expected stderr to match:
expect-err> ^$
Actual stderr:
actual-err> Hit xcodebuild bug : ... bad interpreter: Text file busy
6c832674 Tests for 'CheckIPOSupported' module
fdb2ba25 CheckIPOSupported: New module to check for compiler/cmake IPO support
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !558
The `_EXPORT` and `_NO_EXPORT` macros should always be made properly
because the `<LANG>_VISIBILITY_PRESET` properties are controlled
independently of this module.
One case where this breaks compatibility is where a project was setting
`USE_COMPILER_HIDDEN_VISIBILITY=OFF` and then marking a symbol used
outside of the library with `_NO_EXPORT` which is a contridiction.
Extra slashes in some locations can
cause errors during package generation
and can also be present in generated
rpm packages causing issues for the
package user.
Closes#16619
3fd9f4ab Xcode: Add test for schema generation
cf13e495 Xcode: Control schema generation via variable
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !577
65481a60 CUDA: Work around VS limitation in CudaOnly.WithDefs test
8cae24a1 VS: Add more CUDA flag table entries
6ca4f222 VS: Add support for the CUDA_SEPARABLE_COMPILATION property
94255511 VS: Select CUDA code generation architectures
253594d0 VS: Select the CUDA runtime library
4def02a3 VS: Place CUDA host compiler options in proper project file fields
29f07b08 VS: Do not pass CUDA compile options to C compiler
b966f489 VS: Do not use absolute paths to CUDA sources
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !566
The NVIDIA CUDA Toolkit provides MSBuild toolset files for integration
with Visual Studio. Multiple versions may be installed so we need a way
to tell our VS generators which CUDA toolset to use. Extend the
`CMAKE_GENERATOR_TOOLSET` specification to provide a `cuda=...` field
specifying the version number.
d9bdcf34 Tests: Add x32 tests to test suite
5b6d354f Help: Add notes for topic 'x32-abi'
bed9c73d Modules: Add x32-abi support to hard-coded paths
462cf254 Add support for x32-abi
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !532
69528fe6 Tests: Add case for RPATH exclusion of symlinks to implicit directories
f3102ca8 Merge branch 'backport-implicit-dir-symlinks' into implicit-dir-symlinks
c3fb650c cmOrderDirectories: Consider symlinks when checking implicit directories
b1a37362 cmOrderDirectories: Factor out implicit directory check
The `FIND_LIBRARY_USE_LIB<arch>_PATHS` global properties ask
`find_library` to look in `lib<arch>` directories automatically before
corresponding `lib` directories. However, if `lib<arch>` is just a
symlink to `lib` (or vice-versa) then we should skip adding the
`lib<arch>` path. Such symlinks typically only exist to satisfy
software that expects the `lib<arch>` path to be available.
Fixes: #16687
Previously bindexplib discarded read-only non-function symbols even in
executable/code sections, but in some specific cases they could still mark
functions.
An example is provided by nop.asm in the AuoExportDll test, which exports
a function only marked by a label. This symbol can be used from C/C++
code, but without this change it would result in an unresolved external
symbol when built as a DLL on Windows.
624021a0 Add test for object library dependencies
5da9266a Xcode: Always track object library dependencies via hacky Makefile
e80ac953 Xcode: Record dependency information also for object libraries
9293e57d Xcode: Collect dummy rules during iteration and emit afterwards
33a1d727 Makefile: Allow adding post-build rules to object libraries
d5f39a56 clang-format.bash: Use Git attributes to mark files for formatting
f6986ee4 Define a custom Git attribute to mark sources using our C style
2256c3a7 Define a custom Git attribute to mark source files as generated
1ba91291 Add policy CMP0068 separate install_name and RPATH settings on macOS
f7b9bf41 Apple: Add BUILD_WITH_INSTALL_NAME_DIR target property
4bff2d14 Apple: Refactor support for using INSTALL_NAME_DIR.
624fb9d7 Help: Format BUILD_WITH_INSTALL_RPATH documentation
We parse `CMAKE_GENERATOR_TOOLSET` values of the forms:
* `toolset`
* `toolset,host=x64`
* `host=x64`
Generalize the parsing to support the forms:
* `toolset`
* `toolset[,key=value]*`
* `key=value[,key=value]*`
Disallow duplicate keys. Require all but the first field to
be of `key=value` form.
BUILD_WITH_INSTALL_RPATH, SKIP_BUILD_RPATH, CMAKE_SKIP_RPATH and
CMAKE_SKIP_INSTALL_RPATH no longer any effect on the install name
of a target on macOS.
Fixes: #16589
Since upstream curl commit curl-7_52_0~131 (URL-parser: for
file://[host]/ URLs, the [host] must be localhost, 2016-11-11) we can no
longer use URLs of the form `file://c:/...` on Windows. These worked
only accidentally before. Use `file:///c:/...` instead.
The global property FeatureSummary_<TYPE>_DESCRIPTION can be defined for
each type to replace the type name with the specified string whenever
the package type is used in an output string.
Attempting to use AndroidTestUtilities to simply install some local
files on device can result in the following error:
Neither ExternalData_URL_TEMPLATES nor ExternalData_OBJECT_STORES is set
We no longer require these ExternalData-specific variables to be set if
no such remote data files are requested.
Fixes: #16529
071f8e78 Apple: Add support for static frameworks
d525754e Xcode: Refactor RunCMake.Framework test to prepare for static frameworks
45405f00 Xcode: Ignore Xcode project warning until issue is fixed
50e1c105 Makefile: For static libraries remove only the "real" lib before creating
8643ca75 Makefile: Re-order list of files to clean
560574b0 FeatureSummary: Update release notes
3cfde818 FeatureSummary: Refactor to use global properties for package types
f0165eb6 FeatureSummary: Allow lists of dependencies in ADD_FEATURE_INFO
9da7bf08 FeatureSummary: Add QUIET_ON_EMPTY option to feature_summary
4cf4aceb FeatureSummary: Add unit tests
614a97a5 FeatureSummary: Do not force OPTIONAL type in SET_PACKAGE_PROPERTIES
65a0bfd8 FeatureSummary: Add deprecation warnings to deprecated commands
4da3cae9 FeatureSummary: Clean printed output
This allows a single condition to be used to choose between two
alternatives. Without this the condition must be duplicated with
one surrounded by `NOT`.
Closes: #15585
These new global properties were added:
* FeatureSummary_PKG_TYPES: Package types accepted by FeatureSummary
(default REQUIRED RECOMMENDED OPTIONAL RUNTIME).
* FeatureSummary_REQUIRED_PKG_TYPES: Package types that will cause
FeatureSummary to abort when called with
FATAL_ON_MISSING_REQUIRED_PACKAGES and a package in these categories
is missing (default REQUIRED).
* FeatureSummary_DEFAULT_PKG_TYPE: Default package type assigned when
not explicitly assigned by the user (default OPTIONAL).
This allows to add and remove new package types that can be printed
selectively using the "WHAT" argument.
e116f2a5 ctest_memcheck: Fix sanitizers when MemoryCheckSanitizerOptions is empty
522e1588 Tests: Use CTEST_MEMORYCHECK_SANITIZER_OPTIONS where appropriate
Create a `<LANG>_CPPLINT` target property (initialized by a
`CMAKE_<LANG>_CPPLINT` variable) to specify a `cpplint` style checker
command line to be run along with the compiler.
When building with multiple SDKs within one project Xcode requires
the usage of ${EFFECTIVE_PLATFORM_NAME} to put temporary and build
outout into separate directories. For example an iOS device and
simulator build use two different SDKs (iphoneos and iphonesimulator).
In the past cmake tries to detect embedded toolchains that could
possibly use simulators and emitted EFFECTIVE_PLATFORM_NAME (EPN)
at the proper locations. In #16253 Mark noticed that if he
uses macosx and iphoneos in combination the necessary EPN is not
emitted. This is because CMake by default assumes macosx SDK which
does not trigger EPN emission.
The fist naive approach - enabling EPN unconditionally revealed that
then the EPN leaks into generator expressions like $<TARGET_FILE:xxx>
which might be a regression and thus is unacceptable.
The next approach was to add an CMake property to enable EPN emission
unconditionally. This solved the reported problem.
But the EPN leakage also happened for the embedded toolchains already
without anyone noticing. So the control property was turned into a
tri-state one:
* No definition: EPN is activated for embedded toolchains like before
* ON: EPN is always emitted
* OFF: EPN is never emitted
That approach gives the user the chance to disable EPN for embedded
toolchains and restores generator expression functionality for those.
Closes: #16253
Teach the CDASH_UPLOAD signature of ctest_submit() to honor the
RETRY_COUNT and RETRY_DELAY options.
Also teach HttpRequest() to honor the default 120 second timeout
for curl connections.
397b8546 VS: added documentation for C# support
a7dd8e66 VS: added support for C# (for Visual Studio 2010, 2012, 2013, 2015)
6fda6005 VS: renamed target property VS_USER_PROPS_CXX to VS_USER_PROPS
Since commit v3.3.0-rc1~318^2~1 (file: Teach GLOB to list directories
optionally, 2015-03-17) using `LIST_DIRECTORIES` followed by no
expression causes a crash. Fix the logic to avoid the crash.
Fixes: #16565
e537bd91 ctest_memcheck: do not add detect_leaks=1 to ASAN_OPTIONS
0a2e5885 ctest_memcheck: join *SAN_OPTIONS with :
cdacfbd2 MEMORYCHECK_SUPPRESSIONS_FILE: add support for sanitizers
cf590c12 ctest_memcheck: add support for standalone LeakSanitizer
36bc7e4c store old locale to a temporary variable
05c14ea0 RunCMake.CPack_* add COMPONENT to minimal test
5b0a64eb CPack/Archive minimal tests for more formats
Monolithic deb packages were packaged
with invalid md5sums file as trailing
slash in path was causing string replace
to fail and preserve build path.
Fixes#16517
f72ba42b try_compile: Add policy CMP0067 to honor language standards
45aa03b9 try_compile: Add options to specify language standards
3bb2051e try_compile: Stop processing when test build system fails to generate
Projects use `try_compile` to check if they will be able to compile some
particular source code. When a language standard variable like
`CMAKE_CXX_STANDARD` is set, then the project intends to compile source
code using a compiler mode for that standard. Therefore it makes sense
for `try_compile` to use that standard in the test project too.
Unfortunately this was not done when support for the
`CMAKE_CXX_STANDARD` variable was first implemented. Add a policy to
introduce the improved behavior in a compatible way.
Closes: #16456
Give `try_compile` callers a way to control the `CXX_STANDARD`,
`CXX_STANDARD_REQUIRED`, and `CXX_EXTENSIONS` properties of the
generated test target (or the `C` equivalents) in order to compile a
test source for a particular language standard.
Issue: #16456
* In older version "%dir %attr(-, root, root) foo" would put "%dir foo"
in the final spec file.
* Also added comment to describe this and advise not not to add trailing
slashes to directories in USER_FILELIST.
* Includes test in RunCMake CPack which now passes.