Commit Graph

1592 Commits

Author SHA1 Message Date
Robert Maynard c9a50f3556 ISPC: Generated Headers suffix configurable with a better default
The target property `ISPC_HEADER_SUFFIX` and associated global
variable now can control the suffix used when generating the
C/C++ interoperability ISPC headers.

In addition the default suffix is now "_ispc.h" which matches the
common convention that the ISPC compiler team uses and recommends.
2020-12-14 13:13:09 -05:00
Brad King 23df57a3a7 Merge topic 'apple-silicon-host-arch' into release-3.19
b7f0327dcd Tests: Cover macOS host architecture selection on Apple Silicon hosts
5f882f6ce5 macOS: Offer control over host architecture on Apple Silicon hosts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5589
2020-12-11 13:05:34 -05:00
Craig Scott b4c02a0a1d Help: Re-sort indexes in the manuals 2020-12-11 11:19:04 +11:00
Brad King 5f882f6ce5 macOS: Offer control over host architecture on Apple Silicon hosts
Since commit b6c60f14b6 (macOS: Default to arm64 architecture on Apple
Silicon hosts, 2020-09-28, v3.19.0-rc1~63^2) we use `sysctl` to detect
that we are running on Apple Silicon in a way that pierces Rosetta.
This always sets `CMAKE_HOST_SYSTEM_PROCESSOR` to be `arm64` on such
hosts.  However, macOS offers strong support for running processes under
an emulated `x86_64` architecture.

Teach CMake to select either `arm64` or `x86_64` as the host
architecture on Apple Silicon based on the architecture of its own
process.  When CMake is built as a universal binary, macOS will select
whichever slice (architecture) is appropriate under the user's shell,
and `CMAKE_HOST_SYSTEM_PROCESSOR` will match.

Also offer a `CMAKE_APPLE_SILICON_PROCESSOR` variable and environment
variable to provide users with explicit control over the host
architecture selection regardless of CMake's own architecture.

Finally, if `CMAKE_OSX_ARCHITECTURES` is not set, pass explicit flags to
the toolchain to use selected host architecture instead of letting the
toolchain pick.

Fixes: #21554
2020-12-10 12:08:13 -05:00
Brad King 8a3ecb484f Merge topic 'update_cmp112' into release-3.19
cf0c71dae3 Document CMP0112 covers $<TARGET_FILE_NAME,tgt>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5582
2020-12-08 10:20:11 -05:00
Robert Maynard cf0c71dae3 Document CMP0112 covers $<TARGET_FILE_NAME,tgt>
Fixes #21559
2020-12-07 09:50:39 -05:00
Sam Freed ca289abea5 Help: Fix presets typo (longDescription to displayName) 2020-11-28 16:32:31 +11:00
Tobias Ribizel fea49b2df0 CTest: Rename CudaMemcheck to CudaSanitizer 2020-11-17 21:06:30 +01:00
Tobias Ribizel e620bb7293 Help: Add cuda-memcheck to CTest documentation
Issue: #21388
2020-11-05 10:05:01 -05:00
Marc Chevrier 1c912056a1 cmake_path: remove new command from 3.19
Defer adding this command until post-3.19 development so that it
has more time to mature before being included in a release.

Issue: #21385
2020-11-03 09:55:35 -05:00
Kyle Edwards ef03124237 CMake GUI: Add --browse-manual argument 2020-10-27 12:05:41 -04:00
Kyle Edwards b7d7eca66d CMakePresets.json: Rework how --preset argument is handled
If a path argument with no -S or -B leads to a cache directory,
use that directory as the binary directory. Otherwise, use the
binary directory from the preset.

Fixes: #21311
2020-10-26 22:32:45 +11:00
Craig Scott 5e1858c0c2 Merge topic 'cmake-presets-toolset-arch-config' into release-3.19
64afabdbcb CMakePresets.json: Split cmakeGeneratorConfig field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5387
2020-10-23 06:37:56 -04:00
Kyle Edwards 64afabdbcb CMakePresets.json: Split cmakeGeneratorConfig field
Make this field separate for both architecture and toolset. Allow
architecture and toolset to be either strings or objects with value
and strategy fields.

Fixes: #21317
2020-10-22 11:24:39 -04:00
Kyle Edwards 25742c589c CMakePresets.json: Add ${sourceDirName} macro
Fixes: #21312
2020-10-22 11:09:28 -04:00
Kyle Edwards 920d180047 CMakePresets.json: Allow boolean for cache variable value
Fixes: #21327
2020-10-21 10:37:08 -04:00
Ben McMorran 0307f7c980 Help: Add JSON schema for CMakePresets.json 2020-10-20 12:07:09 -04:00
Kyle Edwards 4a123fc28c Help: Clarify purpose of warnings and errors 2020-10-19 10:29:19 -04:00
Kyle Edwards 6c74bcfc20 Help: Make architecture and toolset descriptions generic 2020-10-19 10:29:19 -04:00
Kyle Edwards 45766789a0 Help: Add inheritance to CMakePresets.json example 2020-10-19 10:29:19 -04:00
Kyle Edwards 88c9d6f6eb Help: Add documentation for debug field
Oops!
2020-10-19 10:25:57 -04:00
Kyle Edwards efab856008 Help: Show environment field 2020-10-19 10:25:57 -04:00
Kyle Edwards 2208db114c Help: Show multiple ways of doing cacheVariables
This demonstrates both the simple string and the complex object,
and ensures that they get automated testing.
2020-10-19 10:25:57 -04:00
Kyle Edwards d30f85193f Help: Move vendor field into example
This ensures that the vendor field gets automated testing from the
example.
2020-10-19 10:25:57 -04:00
Kyle Edwards b9c8c57860 Help: s/unusedVars/unusedCli/
This was a mistake in the documentation.

Fixes: #21303
2020-10-19 10:25:57 -04:00
Kyle Edwards c436aaaad1 Help: Move CMakePresets.json documentation into a separate file 2020-10-19 10:25:57 -04:00
Brad King 5c3a91c808 CMP0111: Clarify that the new error is on a missing property setting
The previous wording could be confused with the file missing on disk.
2020-10-16 08:26:00 -04:00
Kyle Edwards 7d811ceb3a Help: Fix invalid code-block in cmake(1) manual
Fixes: #21304
2020-10-14 09:47:28 -04:00
Kyle Edwards 94c955e508 Tests: Test the CMakePresets.json example in the documentation 2020-10-09 15:35:54 -04:00
Kyle Edwards d6af1e83bc Help: Fix documentation of CMakePresets.json's cacheVariables
cacheVariables is a map with variable names as the keys, but the
example in the documentation was not updated to reflect this. Fix
the example.
2020-10-09 11:41:47 -04:00
Kyle Edwards 0a638e86b2 Help: Add note about Visual Studio tools for Android 2020-10-07 10:24:38 -04:00
Kyle Edwards 55689ce800 Help: Add ref to Ninja Generators section 2020-10-07 10:23:31 -04:00
Kyle Edwards a395cb516b CMakePresets.json: Prohibit empty variable names 2020-10-06 12:09:38 -04:00
Kyle Edwards 1d25760198 Help: Add presets documentation and release notes 2020-10-05 09:49:59 -04:00
Brad King e8b0359a43 cmake_language: Add signature to DEFER calls to later times
Fixes: #19575
2020-09-29 17:12:33 -04:00
Brad King 0021d24fb3 Merge topic 'add_lang_agnostic_check_compile_flag_module'
90dead024c CheckCompilerFlag: unified way to check compiler flags per language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5281
2020-09-29 05:45:07 -04:00
Robert Maynard 90dead024c CheckCompilerFlag: unified way to check compiler flags per language 2020-09-28 09:07:54 -04:00
Betsy McPhail 0aea38d25e Help: Change User Interaction image paths to be relative to source file 2020-09-25 14:45:01 -04:00
Robert Maynard 357e2ef429 CheckSoureRuns: Add a unified way to check if a source runs 2020-09-23 12:28:37 -04:00
Robert Maynard 10ae907de0 CheckSoureCompiles: Add a unified way to check if a source compiles 2020-09-23 12:28:37 -04:00
Brad King 2c896c381b Merge topic 'comp-ti-std-options'
6a66bb13ed Compiler/TI: Add std options for C++14
fe9cddf181 Compiler/TI: Add std options for C++98
55fc045aa8 Compiler/TI: Add std options for C11
2e69993101 Compiler/TI: Check default C standard
8300030f71 Compiler/TI: Check compiler version for C99 support
0b4582f229 Compiler/TI: Fix definition of std options
a70df0d6f0 Compiler/TI: Avoid generic variable name in macro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5249
2020-09-22 07:48:24 -04:00
Josef Angstenberger fe9cddf181 Compiler/TI: Add std options for C++98
The TI compiler does not support C++98, only C++03
(based on manual of current version).

This change sets the C++98 option to C++03 based on the fact that it
is done this way for the SunPro compiler already.
2020-09-21 00:57:20 +02:00
Brad King 2db623f554 Xcode: Add option to specify build system variant
Extend the `-T <toolset>` option to support a `buildsystem=` field with
the Xcode generator.  Add a `CMAKE_XCODE_BUILD_SYSTEM` variable to
inform project code about the selected build system variant.
2020-09-18 12:49:17 -04:00
Brad King de9a2f1ef6 Help: Move CMAKE_XCODE_GENERATE_SCHEME to proper manual section 2020-09-14 13:14:38 -04:00
Brad King b4fc4da903 ExternalProject: Add policy CMP0114 to refine step target dependencies
`ExternalProject_Add_StepTargets` and `INDEPENDENT_STEP_TARGETS` have
some limitations and lack some sanity checks.  They can cause confusing
build systems to be generated.  The basic problems are:

* The notion of step independence is attached to the step target
  rather than the step itself.

* The custom commands implementing the steps are duplicated in the
  step targets and the primary targets.  This can cause races.
  It is also incompatible with the Xcode "new build system".

Fix this by introducing policy CMP0114 to change the way step target
dependencies are handled.  Define independence from external
dependencies as a property of each individual step regardless of whether
there is a target for it.  Add dependencies among the primary target and
the step targets such that each custom command only appears in one
target.  When some steps are disconnected from the primary target, add
step targets for the steps commonly depended upon so that there is a
place to hold their custom commands uniquely.

Fixes: #18663
2020-09-14 10:48:16 -04:00
Brad King 48ed3bae58 Merge topic 'pch-instantiate-templates'
8c8f03422e PCH: Template instantiation support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Acked-by: Cristian Adam <cristian.adam@gmail.com>
Tested-by: Raul Tambre <raul@tambre.ee>
Merge-request: !5168
2020-09-10 16:32:39 -04:00
Brad King 45fedf0e17 Makefile: Add policy CMP0113 to avoid duplication of custom commands
Do not attach a custom command to a target if it is already attached to one of
the target's dependencies.  The command's output will be available by the time
the target needs it because the dependency containing the command will have
already been built.

This may break existing projects that do not properly mark non-created
outputs with the `SYMBOLIC` property.  Previously a chain of two custom
commands whose intermediate dependency is not created would put both
commands in a dependent project's Makefile even if the first command is
also in its dependency's Makefile.  The first command would run twice
but the build would work.  Now the second command needs an explicit
`SYMBOLIC` mark on its input to tell CMake that it is not expected to
exist.  To maintain compatibility with projects that left out the mark,
add a policy activating the behavior.
2020-09-08 15:38:40 -04:00
Brad King d0ccc7cf2a Merge topic 'ispc_improvements'
a020787a9b ISPC: Support generation for multiple instruction sets
5a1750017e ISPC: Add compiler launcher support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5173
2020-09-08 11:19:28 -04:00
Marc Chevrier eb583b0a66 cmake_path command: path management
Fixes: #19568, #20922
2020-09-06 10:52:25 +02:00
Robert Maynard a020787a9b ISPC: Support generation for multiple instruction sets 2020-09-04 08:37:07 -04:00