Commit Graph

473 Commits

Author SHA1 Message Date
Brad King
60b28de5c8 Merge topic 'add-execute_process-command-echo'
044dcf9f8d execute_process: Add option to echo command lines
d350fb6889 execute_process: Manage KWSys Process lifetime with unique_ptr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3165
2019-04-30 10:05:09 -04:00
Brad King
cb23f2ac8b Merge topic 'vs-default-platform'
db02be85a0 VS: Provide the default platform name to project code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3246
2019-04-22 07:38:33 -04:00
Bill Hoffman
044dcf9f8d execute_process: Add option to echo command lines
Add COMMAND_ECHO option to the execute_process command. This will allow
execute_process to show the command it will run. Also add a cmake variable
CMAKE_EXECUTE_PROCESS_COMMAND_ECHO. Both the option and the variable can
be set to one of the following: STDERR|STDOUT|NONE. The command will be
printed to stderr or stdout or not at all.

Fixes: #18933
2019-04-19 13:32:08 -04:00
Brad King
db02be85a0 VS: Provide the default platform name to project code
The value of `CMAKE_VS_PLATFORM_NAME` is computed by Visual Studio
generators based on `CMAKE_GENERATOR_PLATFORM` or some default.
Prior to the VS 2019 generator, the default was always `Win32`.
However, for the `Visual Studio 16 2019` generator, the default is
based on the host platform.

Store the default in a new `CMAKE_VS_PLATFORM_NAME_DEFAULT` variable for
use by project code.  This is particularly useful in toolchain files
because they are allowed to set `CMAKE_GENERATOR_PLATFORM` and so
`CMAKE_VS_PLATFORM_NAME` is not yet known.  Of course the toolchain file
author knows whether it will set `CMAKE_GENERATOR_PLATFORM`, and if not
then `CMAKE_VS_PLATFORM_NAME_DEFAULT` provides the platform name that
will be used.

Fixes: #19177
2019-04-19 07:46:13 -04:00
Brad King
fb3370b6a1 MSVC: Add abstraction for runtime library selection
Replace our hard-coded defaults for `/MD` and `/MDd` with a first-class
abstraction to select the runtime library from an enumeration of logical
names.  We've long hesitated to do this because the idea of "runtime
library selection" touches on related concepts on several platforms.
Avoid that scope creep by simply defining an abstraction that applies
only when targeting the MSVC ABI on Windows.

Removing the old default flags requires a policy because existing
projects may rely on string processing to edit them and choose a runtime
library under the old behavior.  Add policy CMP0091 to provide
compatibility.

Fixes: #19108
2019-04-17 11:00:44 -04:00
Bartosz Kosiorek
cb33befe2d Modules: Update documentation formatting 2019-04-08 14:55:56 +02:00
Bartosz Kosiorek
0e4fbb4a1f Help: Improve formatting of Help documentation 2019-04-08 14:53:31 +02:00
Brad King
56abc31270 Merge topic 'improve-documentation'
456e0fb64f Help: Improve documentation formating

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3174
2019-04-04 11:48:55 -04:00
Bartosz Kosiorek
456e0fb64f Help: Improve documentation formating 2019-04-04 15:13:58 +02:00
Ruslan Baratov
0761186949 project: Add variable CMAKE_PROJECT_INCLUDE_BEFORE 2019-04-01 20:30:19 +03:00
Ruslan Baratov
dda0190458 project: Add variable CMAKE_PROJECT_INCLUDE 2019-03-27 22:39:02 +03:00
Brad King
89abbdd8c8 Merge topic 'ghs-linux'
2c43fb5be3 FindThreads: Fix pthread library check in GHS Multi Generator
0404efe786 GHS: Add support for GHS Multi Generator in Linux
2060a1445c Tests: Fix file name case in GHS object library test
ddad70c8a4 Tests: Run GHS tests in a separate ctest process
f7dca1fc97 GHS: Fix include-what-you-use and clang-tidy diagnostics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3006
2019-03-22 09:22:44 -04:00
Naren Manimohan
0404efe786 GHS: Add support for GHS Multi Generator in Linux 2019-03-21 12:57:40 -04:00
Harry Mallon
413b71485a Xcode: Create Xcode schemes per target 2019-03-21 16:50:41 +00:00
Brad King
3261f23870 Merge topic 'export-package-default-off'
9bede5c4ce export: Disable PACKAGE mode user package registry by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Lukas Mosimann <lumosimann@gmail.com>
Merge-request: !3041
2019-03-15 10:45:51 -04:00
Robert Maynard
9bede5c4ce export: Disable PACKAGE mode user package registry by default
The user package registry populated by the `export()` command causes
side effects outside the build and source directories.  Such effects
should be opt-in rather than op-out.  Introduce a policy to change
default behavior of `export(PACKAGE)` to do nothing.
2019-03-15 10:24:47 -04:00
Harry Mallon
40be48f890 XCode: Add scheme option XCODE_SCHEME_DEBUG_AS_ROOT 2019-03-11 13:30:35 +00:00
Brad King
4de554b1a5 Merge topic 'docs-xcode-schemes'
d0cb912a28 Help: Remove note that Xcode scheme generator is experimental
de850fe385 Help: Trivial typo fix for CMAKE_XCODE_GENERATE_SCHEME
d61a5a20ef Help: Sort lists of (CMAKE_)XCODE_SCHEME_... variables and properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3066
2019-03-06 09:07:59 -05:00
Brad King
ef10c9a199 Merge branch 'docs-xcode-schemes' into release-3.14
Merge-request: !3066
2019-03-06 09:07:29 -05:00
Brad King
3e9ce09a56 Merge topic 'ios-docs'
376138fe0c Help: CMAKE_MACOSX_BUNDLE is ON for iOS/tvOS/watchOS
f7d602b572 Help: Example of tweaking iOS/tvOS/watchOS build
4a9e2e4f35 Help: find_package with fat iOS libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3047
2019-03-06 08:28:13 -05:00
Brad King
742339a779 Merge topic 'ios-variable'
e427c7c1d8 iOS: Add IOS variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3051
2019-03-06 08:27:20 -05:00
Craig Scott
d0cb912a28 Help: Remove note that Xcode scheme generator is experimental 2019-03-07 00:04:55 +11:00
Craig Scott
de850fe385 Help: Trivial typo fix for CMAKE_XCODE_GENERATE_SCHEME 2019-03-07 00:04:55 +11:00
Craig Scott
d61a5a20ef Help: Sort lists of (CMAKE_)XCODE_SCHEME_... variables and properties 2019-03-07 00:04:55 +11:00
Brad King
216fff285c Merge branch 'ios-docs' into release-3.14
Merge-request: !3047
2019-03-05 09:46:40 -05:00
Ruslan Baratov
376138fe0c Help: CMAKE_MACOSX_BUNDLE is ON for iOS/tvOS/watchOS 2019-03-05 09:45:50 -05:00
Ruslan Baratov
e427c7c1d8 iOS: Add IOS variable
Since commit 11da882a12 (Apple: Introduce separate system name for iOS,
tvOS, and watchOS, 2018-01-15, v3.14.0-rc1~14^2~1) we support setting
`CMAKE_SYSTEM_NAME` to `iOS`.  Existing iOS toolchain files already
set `IOS` as a short-hand variable, so do the same here.
2019-03-05 09:42:41 -05:00
Brad King
5c41386357 XLClang: Add policy CMP0089 to present as XL for compatibility
We now identify IBM's Clang-based XL compilers, which define
`__ibmxl__`, as `XLClang` rather than `XL`.  In order to support
existing project code that checks for `XL`, add a policy whose OLD
behavior is to present the compiler id as `XL` and whose NEW behavior is
to present the compiler id as `XLClang` as we really detect it.
2019-02-25 08:24:28 -05:00
Brad King
40768761b6 Merge topic 'drop-MIPSpro'
214fcefa52 Remove now-unused code once used for MIPSpro on IRIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3004
2019-02-25 08:13:44 -05:00
Brad King
283b8c2ae6 Merge topic 'fix-implicit-includes-fortran'
3dc81a48ff Fortran: Do not suppress explicit use of implicit include directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Michael Hirsch, Ph.D. <michael@scivision.co>
Merge-request: !2994
2019-02-25 07:48:35 -05:00
Brad King
214fcefa52 Remove now-unused code once used for MIPSpro on IRIX
In commit beb991110d (Remove now-unused code once used on IRIX,
2019-01-11, v3.14.0-rc1~167^2) we removed remnants of IRIX support.
Also remove remnants of MIPSpro compiler support.
2019-02-21 11:12:51 -05:00
Brad King
c36bf6b13c Merge branch 'fix-implicit-includes-fortran' into release-3.14
Merge-request: !2994
2019-02-20 08:57:20 -05:00
Brad King
3dc81a48ff Fortran: Do not suppress explicit use of implicit include directories
Since commit 2e91627dea (ParseImplicitIncludeInfo: add Fortran implicit
include handling, 2019-01-25, v3.14.0-rc1~73^2) we actually populate
`CMAKE_Fortran_IMPLICIT_INCLUDE_DIRECTORIES` for the first time.  This
value may be useful to project code to pass to other tooling that wants
to preprocess the way Fortran does, so we should compute the value.
However, compilers like `gfortran` do not actually search their own
implicit include directories for `.mod` files.  The directories must be
passed via `-I` in order for `.mod` files in them to be found.

Since Fortran has no standard library header files that we need to avoid
overriding, it is safe to *not* filter out implicit include directories
from those passed explicitly via `-I` options.  Skip this filtering so
that include directories specified by project code to find `.mod` files
will be searched by the compiler even if they happen to be implicitly
searched by the preprocessor.

Fixes: #18914
2019-02-20 08:13:57 -05:00
Gregor Jasny
afb325018e Xcode: Require at least Xcode 5 2019-02-16 15:20:39 +01:00
Fred Baksik
bcd99fac60 GHS: Document usage of GHS_NO_SOURCE_GROUP_FILE
-- Also change variable name to CMAKE_GHS_NO_SOURCE_GROUP_FILE
2019-02-08 13:07:00 -05:00
Brad King
96dece6dc1 Xcode: Update default Swift language version for Xcode 10.2
Xcode 10.2 no longer supports Swift language versions before 4.0.

Fixes: #18871
2019-02-04 13:26:10 -05:00
Saleem Abdulrasool
f45d8b2f23 Help: improve details on CMAKE_LANG_CREATE_SHARED_*
Add a note that the `CMAKE_<LANG>_CREATE_SHARED_*` rule variables are
semicolon delimited lists that can run multiple commands.
2019-01-31 09:55:52 -08:00
Brad King
9aef4a732b Merge topic 'variables1'
9d20fe014f Help: moved 7 variables to "internal" section
dfb2d6178e Help: "internal variables" instead of "obsolete", with some explanatory prose
9c4cdc43f6 Help: declare CMAKE_HOME_DIRECTORY obsolete

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2881
2019-01-31 11:11:28 -05:00
Brad King
1b3b0fa43a Merge topic 'msys_docs'
ec027aa64a Help: Add documentation for MSYS variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2882
2019-01-31 11:10:03 -05:00
Harry Mallon
ec027aa64a Help: Add documentation for MSYS variable 2019-01-30 10:20:59 -05:00
Joachim Wuttke (o)
9c4cdc43f6 Help: declare CMAKE_HOME_DIRECTORY obsolete 2019-01-30 13:04:56 +01:00
Michael Hirsch, Ph.D
f201c9257d DOCS: put Flang in alphabetical order 2019-01-29 13:30:55 -05:00
Brad King
17cef3806d VS: Add support for explicit 32-bit toolset selection via host=x86
Generalize the ``host=x64`` option in `CMAKE_GENERATOR_TOOLSET`
to also support ``host=x86``.
2019-01-28 11:22:50 -05:00
Kyle Edwards
a6982cff0d cmMakefile: Impose maximum recursion limit
In order to keep infinitely-recursive scripts from causing a stack
overflow in the CMake executable, CMake now imposes a maximum
recursion limit before issuing an error message. The limit can be
adjusted at runtime with CMAKE_MAXIMUM_RECURSION_DEPTH.

Fixes: #18694
2019-01-23 09:52:29 -05:00
Brad King
d1aa2e1109 Merge topic 'find-package-resolve-symlinks'
b773e58099 find_package: add test coverage for CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
a5e948a36f find_package: optionally resolve symlinks when discovering packages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2798
2019-01-21 07:47:29 -05:00
Brad King
fefae527c8 Merge topic 'submit-url'
2915a75615 CTest: Add documentation and release notes for SubmitURL
d6475daa79 Modules/CTest: Set SubmitURL
938f06fda6 ctest_submit: Add parameter SUBMIT_URL
65e725c957 CTest: Add option SubmitURL
65f1fc9d63 CTest: Add function GetSubmitURL
2bedd5fb7c ctest_submit: Remove submit method from log output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2719
2019-01-21 07:46:20 -05:00
Fred Baksik
72e0c115b7 GHS: Add Compiler ID detection
-- Detect GHS compiler and version
   Detect ARCHITECTURE_ID for PPC / ARM / 86 targets
   Detect PLATFORM_ID for Integrity and Integrity178 platforms
   Using defines specified in the documents for the compilers: 201416 PPC / 201754 ARM / 201714 86
-- Fallback C/CXX compiler ID to GHS if not otherwise detected and using GHS MULTI generator
   Works around issue with some GHS compilers not setting __ghs__ compiler define
-- Tweak Compiler ID checking so major id of 002017 is not replaced with 217
-- Prefer try_compile() library targets when testing for working GHS compilers
-- Avoid CMake errors if reading past end of file for checking if file is PE executable
2019-01-16 10:42:04 -05:00
Fred Baksik
0c9e47d7cd GHS: Integrity Application updates
-- Check the property "ghs_integrity_app" on executables to set [INTEGRITY Application]
   If the property is not set then check if an integrate file is one of the source files (.int file).
   Dynamic Downloads that do not have an integrate file can use this property along with setting
   the compiler flag "-dynamic".

-- Remove parsing for -dynamic flag; it is only used to print a comment
   The MULTI GUI will show if it is a Monolith or Dynamic Download application

-- Use project references to specify which executables are part of the Integrity Application
   Usually Implicit Dependency Analysis will ensure that executable targets
   become part of the application.  This does not work for Dynamic Download without integrate files.
   Use `add_dependencies(dd vas)` to mark that the vas target is part of dd target.

-- Update file locations in the Integrate files.
2019-01-16 10:41:49 -05:00
Fred Baksik
702121c5f3 GHS: Use the correct compiler flags for CMAKE_BUILD_TYPE
-- Do not use CMAKE_C_FLAGS_RELEASE flags when CMAKE_BUILD_TYPE is empty
   if CMAKE_BUILD_TYPE was not set the generator would use Release settings
   this does not match the documented behavior of CMAKE_BUILD_TYPE

-- CMAKE_C_FLAGS_<CONFIG> not used when -kernel is present
   Fixes issue where CMAKE_C_FLAGS_<CONFIG> is ignored when -kernel option is present as a compiler option
   When the -kernel option is added to an executable it uses a different set of language flags
   This does not occur -kernel=<type> is used or if it is added as part of a link flag
   The variables CMAKE_<LANG>_GHS_KERNEL_FLAGS_<CONFIG> are removed
   NOTE: By default this only added the flag -ldebug which links in the debugger library.

-- Separate compiler options by newlines
2019-01-16 10:41:35 -05:00
Regina Pfeifer
2915a75615 CTest: Add documentation and release notes for SubmitURL 2019-01-16 10:34:08 -05:00