449 Commits

Author SHA1 Message Date
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
ef10c9a199 Merge branch 'docs-xcode-schemes' into release-3.14
Merge-request: !3066
2019-03-06 09:07:29 -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
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
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
David Aguilar
a5e948a36f find_package: optionally resolve symlinks when discovering packages
Teach find_package() to resolve symlinks when constructing
relocatable prefix paths from discovered cmake config files.
The `CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS` variable enables
this behavior when set to `TRUE`.

Fixes: #18704
2019-01-16 09:59:46 -05:00
Brad King
57e48f16f2 VS: Add Visual Studio 16 2019 generator
Add this generator *without* support for specifying the target
architecture in the generator name.  cmake-gui will be taught
to provide a field for this, and command-line builds can use -A.

Also, teach this generator to select a default target architecture
based on the host architecture.

Fixes: #18689
Inspired-by: Egor Pugin <egor.pugin@gmail.com>
2019-01-11 11:04:51 -05:00
Ben Boeckel
261ae28ccd Help: fix typo for CTEST_CUSTOM_TESTS_IGNORE
In commit v3.4.0-rc1~57^2 (Help: document CTEST_CUSTOM_* variables,
2015-09-17), the CTEST_CUSTOM_TESTS_IGNORE variable was documented with
a typo.
2019-01-02 15:42:33 -05:00
Regina Pfeifer
8c25aa2feb CTest: Remove submission trigger 2018-11-29 00:29:13 +01:00
Regina Pfeifer
c339b64cf2 CTest: Remove submit method 'scp' 2018-11-29 00:29:13 +01:00
Craig Scott
faf4496db3 Merge topic 'doc-cmake.1'
e15cac8ee7 Help: Extend the cmake(1) manual
8b3a537c29 Help: Improve cmake(1) manual organization
f9c3f7b164 Help: Emphasize tool names in their manuals

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2662
2018-11-28 04:26:33 -05:00
Joachim Wuttke (l)
8b3a537c29 Help: Improve cmake(1) manual organization
Extend the Synposis, and provide links to manual sections.
Add sections for `cmake --open` and `cmake --help-*`.

Introduce a new section for buildsystem generation to distinguish it
from the other functionality.  Populate it with minimal placeholder text
for now.  It will be extended later.

Co-Author: Brad King <brad.king@kitware.com>
2018-11-27 21:13:32 +11:00
Sebastian Holtermann
0d80977af4 Autogen: Documentation updates
This extends the documentation for

- :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`
- :prop_tgt:`AUTOGEN_TARGET_DEPENDS`
- :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET`
2018-11-26 09:57:20 +01:00
Joachim Wuttke (o)
254a849864 Help: Spell out MFC
And shorten text that was hard to understand and redundant.
2018-11-14 17:50:45 +01:00
Sebastian Holtermann
2ef8fe2222 Autogen: Add documentation for CMAKE_GLOBAL_AUTOGEN/RCC_TARGET 2018-11-11 14:29:38 +01:00
Joachim Wuttke (l)
860338491e Help: Describe $CACHE and $ENV as operators
This resolves issue #18514

Also add a cross-reference to if(DEFINED ENV{var}).
2018-11-08 20:33:13 +01:00
Sebastian Holtermann
0669de5d36 Autogen: Add (CMAKE_)AUTOGEN_ORIGIN_DEPENDS documentation 2018-11-03 12:14:40 +01:00
Brad King
f0a9094d80 Merge topic 'no-smiley'
24fa04018c Help: Spell out ";-list" as "semicolon-separated list"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2528
2018-10-29 09:30:25 -04:00
Brad King
f7b8e67463 Merge topic 'doc-updates'
2f9c253961 Help: clarify "LINKER:" prefix usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2530
2018-10-26 11:02:09 -04:00
Marc Chevrier
2f9c253961 Help: clarify "LINKER:" prefix usage
Fixes: #18503
2018-10-26 09:36:53 -04:00
Peter Wu
6114d85a7d RPATH: Add option for using $ORIGIN in build tree
This makes binaries independent of the build directory by not embedding
the build directory via RPATH.  The tests are partially based on the
existing RuntimePath test, but with the check moved into a POST_BUILD
command such that it can be skipped when the platform lacks support.

Fixes: #18413
2018-10-26 09:25:51 -04:00
Joachim Wuttke (o)
24fa04018c Help: Spell out ";-list" as "semicolon-separated list" 2018-10-25 15:44:59 +02:00
Brad King
f225d79881 Merge topic 'update_debug_target_properties'
86921f0264 Help: document CMAKE_DEBUG_TARGET_PROPERTIES support for LINK properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2480
2018-10-15 13:03:51 -04:00
Robert Maynard
86921f0264 Help: document CMAKE_DEBUG_TARGET_PROPERTIES support for LINK properties 2018-10-12 09:53:22 -04:00
Kyle Edwards
fc8955e889 add_subdirectory: Run subdirectory install rules in correct order
Before this change, install rules created by add_subdirectory()
would be executed after all of the top-level install rules, even
if they were declared before the top-level rules. This change
adds a new policy, CMP0082, which interleaves the add_subdirectory()
install rules with the other install rules so they are run in the
correct order.
2018-10-10 10:26:39 -04:00
James Turner
bc57c32d7a Help: Document CMAKE_OSX_* variables as cache entries
The variables

* CMAKE_OSX_ARCHITECTURES
* CMAKE_OSX_DEPLOYMENT_TARGET
* CMAKE_OSX_SYSROOT

should be set as cache entries.  Document this explicitly.
2018-10-04 11:23:07 -04:00
Brad King
4e98203c6c Merge topic 'vs-global-props-for-all-targets'
36489b85aa VS: Add test for CMAKE_VS_GLOBALS
22e670a306 VS: Add option to set VS_GLOBAL_* for all targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2345
2018-09-28 11:13:59 -04:00
Marc Chevrier
f9717725f9 link_directories(): enhance capabilities 2018-09-25 23:59:59 +10:00
Mikhail Korolev
22e670a306 VS: Add option to set VS_GLOBAL_* for all targets
Fixes: #18287
2018-09-25 09:20:25 -04:00