1133 Commits

Author SHA1 Message Date
Brad King
cdc9c110a5 Merge topic '16780-write-single-xcodeproj'
e4e9ce7c Xcode: Add option to generate only topmost project file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1395
2017-11-01 08:02:15 -04:00
Gregor Jasny
e4e9ce7cbe Xcode: Add option to generate only topmost project file
Closes #16780
2017-10-31 17:09:26 +01:00
Jeremiah van Oosten
025221df2a VS: Add source file property to set hlsl debug and optimization flags
Add `VS_SHADER_DISABLE_OPTIMIZATIONS` and `VS_SHADER_ENABLE_DEBUG`
source file properties to control these settings on `.hlsl` files in the
VS generator.

Fixes: #17406
2017-10-30 09:52:10 -04:00
Brad King
fb88d2b5be Help: Add notes for topic 'generalize-importedtargets-behavior'
Inspired-by: Deniz Bahadir <dbahadir@benocs.com>
2017-10-26 09:11:05 -04:00
Brad King
b5dd256d94 Merge topic 'defer-target-source-check'
4e7f6738 Defer check for sources within a target until generation.
6e4e7c65 Tests: Exclude bad RunCMake.add_executable case on multi-arch Xcode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1242
2017-10-25 08:11:19 -04:00
Deniz Bahadir
4e7f67383f Defer check for sources within a target until generation.
The `add_library` and `add_executable` commands can now be called with
no source-files and won't generate a warning or error message, as long
as source-files will be added later via the `target_sources` command.
If during the generation step still no sources are associated with
targets created by such calls a useful error message will be generated
and generation fails.

Targets of type `INTERFACE_LIBRARY`, `UTILITY` or `GLOBAL_TARGET` are
excluded from this check because we do not need sources for these target
types during generation.

Fixes: #16872
2017-10-24 08:14:47 -04:00
Brad King
9ffb35386f VS: Select and save a VS 2017 instance persistently
Visual Studio 2017 supports multiple instances installed on a single
machine.  We use the Visual Studio Installer tool to enumerate instances
and select one.  Once we select an instance for a given build tree, save
the result in `CMAKE_GENERATOR_INSTANCE` so we can re-configure the tree
with the same instance on future re-runs of CMake.

Fixes: #17268
2017-10-19 10:20:12 -04:00
Brad King
314613d1af Add infrastructure for generators to select a build tool instance
Add cache entry `CMAKE_GENERATOR_INSTANCE` to hold the instance location
persistently across re-runs of CMake in a given build tree.

For now we reject the option by default if explicitly set.  It will be
implemented on a per-generator basis.  Pass the setting into try_compile
project generation.  Add a RunCMake.GeneratorInstance test to cover
basic use cases for the option.  Verify that `CMAKE_GENERATOR_INSTANCE`
is empty by default, and that it is rejected when the generator does not
support a user setting.

Issue: #17268
2017-10-19 10:20:08 -04:00
Brad King
358ceee5d8 Merge topic 'curl_netrc_options'
d45aa38a Add dev notes for topic 'curl_netrc_options'
60c272b6 ExternalProject: Add support for NETRC and NETRC_FILE suboption
754e39dd Add testcases for file(DOWNLOAD|UPLOAD) netrc options
5d67e902 file(DOWNLOAD|UPLOAD): Add 'NETRC' and 'NETRC_FILE' suboption

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge-request: !1376
2017-10-19 09:27:43 -04:00
Brad King
d209275330 Merge topic 'ti-compiler-depfile-support'
ad9327d9 Compiler/TI: Add support for depfile generation for Ninja

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1389
2017-10-19 09:27:09 -04:00
Shane Parris
d45aa38a06 Add dev notes for topic 'curl_netrc_options' 2017-10-18 15:21:43 -04:00
Nico Müller
ad9327d936 Compiler/TI: Add support for depfile generation for Ninja
TI C/C++ compiler are now able to generate dependency files during
compilation.

Fixes: #17360
2017-10-18 09:43:22 -04:00
Brad King
b0b94cdec5 Merge topic 'cmake-open'
96d642c7 cmake-gui: Use cmake::Open to open generated project
5de37a4a cmake: Add --open option for IDE generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge-request: !1337
2017-10-18 09:37:59 -04:00
Brad King
0dba1db9d5 Merge topic 'module-fetchcontent'
1e56634f FetchContent: Add tests
60e74d2f FetchContent: New module for populating content at configure time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1306
2017-10-18 09:37:26 -04:00
Craig Scott
60e74d2f19 FetchContent: New module for populating content at configure time 2017-10-17 08:07:09 +11:00
Gregor Jasny
5de37a4a64 cmake: Add --open option for IDE generators 2017-10-13 21:28:34 +02:00
Brad King
3cebe2aba8 Help: Revise 3.10 release notes
Reduce duplication of `AUTOMOC` feature text.  Clarify QtIFW version
requirements.
2017-10-06 06:59:30 -04:00
Brad King
ba8aa6899d Begin post-3.10 development 2017-10-05 09:59:57 -04:00
Brad King
42d656b0b2 Help: Drop development topic notes to prepare release
Release versions do not have the development topic section of
the CMake Release Notes index page.
2017-10-05 09:54:11 -04:00
Brad King
0565192aff Help: Organize and revise 3.10 release notes
Add section headers similar to the 3.9 release notes and move each
individual bullet into an appropriate section.  Revise a few bullets.
2017-10-05 09:24:08 -04:00
Brad King
dd5835c0d6 Help: Consolidate 3.10 release notes
Run the `Utilities/Release/consolidate-relnotes.bash` script to move
notes from `Help/release/dev/*` into `Help/release/3.10.rst`.
2017-10-05 08:00:03 -04:00
Brad King
046625d26f Merge topic 'FindProtobuf-gen-desc'
1299f4cc FindProtobuf: add flag to allow descriptor files to be generated
4e91be95 FindProtobuf: Refactor custom command output listing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1301
2017-10-03 08:14:34 -04:00
Peter Mitrano
1299f4cc5e FindProtobuf: add flag to allow descriptor files to be generated
- The .desc files will be in the same folder as the generated .cc and .h files.
- Paths to generate .desc files are stored in a variable passed in
- This is only implemented for C++
- Remove legacy ARGS
- Add test that generates and uses C++ protobuf message
- Add test that checks that the generated .desc file can be instantiated
  with DynamicMessageFactory
- Add Help rst for new feature
2017-10-02 08:08:24 -04:00
Sebastian Holtermann
6bbc1e775d Autogen: Add release notes for (CMAKE_)AUTOMOC_COMPILER_PREDEFINES 2017-09-29 15:32:10 +02:00
Brad King
59285ee58e Merge topic 'add-vs-shader-properties'
49dab3eb VS: Add VS_SHADER_OUTPUT_HEADER_FILE and VS_SHADER_VARIABLE_NAME properties.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1319
2017-09-29 08:56:04 -04:00
Sebastian Holtermann
93c8d55d04 Autogen: Update (CMAKE_)AUTOMOC_MACRO_NAMES release notes 2017-09-28 09:21:44 +02:00
Kevin M. Godby
49dab3ebfb VS: Add VS_SHADER_OUTPUT_HEADER_FILE and VS_SHADER_VARIABLE_NAME properties.
The VS_SHADER_OUTPUT_HEADER_FILE property is the name of the generated
header file containing the object code of the shader.

The VS_SHADER_VARIABLE_NAME property is the name of the variable
containing the object code in the above header file.

Signed-off-by: Kevin M. Godby <kevin@godby.org>
2017-09-27 07:56:09 -04:00
Tom Fogal
e2e8a690cd FindOpenGL: Add support for GLVND on Linux
Find GLVND components if available.  Add `GLX` and `EGL` options for
COMPONENTS that allow requesting these libraries explicitly.  Introduce
new import targets for these windowing-system-specific libraries.

On a GLVND system, populate the legacy `OPENGL_LIBRARIES` variable and
the `OpenGL::GL` target using the `OpenGL` and `GLX` components.  On
non-GLVND systems, continue to use the legacy `GL` library and simply do
not provide the GLVND components.  Application code can choose to adapt
based on the availability of GLVND components as imported targets.
2017-09-25 09:22:29 -04:00
Brad King
10fb805987 Merge topic 'FindOpenACC'
d3b6f291 FindOpenACC: Add module to detect compiler support for OpenACC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1209
2017-09-25 09:00:59 -04:00
Brad King
62bdc587eb Merge topic 'cpackifw-options'
9a24ab6b CPackIFW: Add some options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1298
2017-09-25 08:58:25 -04:00
Craig Scott
de5dd4f4fa Merge topic 'graphviz-link-type'
5b46cc91 graphviz: distinguish target dependency types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1229
2017-09-22 18:28:59 -04:00
Tin Huynh
d3b6f29140 FindOpenACC: Add module to detect compiler support for OpenACC 2017-09-22 10:42:27 -04:00
Brad King
33eec57232 Merge topic 'cpack-rpm-deb-version'
74b7457f CPack RPM and DEB: improved package version handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1296
2017-09-22 10:14:49 -04:00
Nico Müller
5b46cc91d9 graphviz: distinguish target dependency types
- The output graph of graphviz differs now between target link types
- Updated documentation
- Fixes: #17192
2017-09-21 20:49:44 +02:00
Konstantin Podsvirov
9a24ab6b63 CPackIFW: Add some options
The `CPackIFW` module `cpack_ifw_configure_component` and
`cpack_ifw_configure_component_group` commands gained a new
`REPLACES` and `CHECKABLE` options.
2017-09-21 21:34:33 +03:00
Domen Vrankar
74b7457f12 CPack RPM and DEB: improved package version handling
Adds support for epoch version to CPackRPM and
CPackDeb packagers.
Also adds better version checking to CPackDeb
that complies with Debian rules.

Fixes: #17057
2017-09-21 19:54:17 +02:00
Brad King
aa8ad21ea5 Merge topic 'midipix-support'
0df43496 Midipix: Add minimal platform file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1294
2017-09-21 08:26:32 -04:00
Brad King
3cf3bb71f4 Help: Add notes for topic 'freebsd-compiler-name' 2017-09-21 08:24:12 -04:00
midipix
0df434967c Midipix: Add minimal platform file
Add Midipix.cmake (UnixPaths, no overrides, no special cases).
2017-09-20 14:44:30 -04:00
Brad King
bc2009b724 Merge topic 'findmpi-overhaul'
bf1e606f FindMPI: Add support for FreeBSD and SLES
2f673da6 FindMPI: Support components for various languages
9a58e69c FindMPI: Modernization from ground up

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !893
2017-09-18 10:11:04 -04:00
Christian Pfeiffer
2f673da69f FindMPI: Support components for various languages 2017-09-15 14:55:08 +02:00
Christian Pfeiffer
9a58e69cc8 FindMPI: Modernization from ground up
This is a near-total rewrite of FindMPI implementing the following
features:

Environmental improvements:

- C++ settings can now be picked from C settings if no dedicated C++
  settings are found (some installs of IBM Platform MPI)
- Fortran settings can now be found on MPICH-1, MVAPICH-1, Microsoft
  MPI and MPICH-2 on Windows.

- Improved flag procession logic: Flags related to security enhancements
  of MPI itself, and unrelated to MPI usage (-fstack-protector-strong on
  e.g. RHEL 7 for MPICH and MVAPICH) will be filtered out properly now.
  -pthread is now being handled. -fno-strict-aliasing, which may be needed
  while compiling MVAPICH (e.g. RHEL 7's MVAPICH package) is also
  filtered.

Features added:

- MPI version can be determined for each language and is exposed as the
  package version
- MPI functionality is being tested to ensure the correctness of
  settings
- MPI-2 C++ bindings can be suppressed if desired by the project or
  user. For older MPIs, this often resolves issues and eliminated the
  infamous SEEK_SET trouble.
- MPI-2 C++ bindings are now being searched for and exposed by a
  variable if detected.
- Fortran support now does not make assumptions over the MPI present and
  works with ILP64 MPI implementations.
- Fortran now exposes which bindings (mpif.h, mpi/mpi_f08 modules) are
  available
- MPI detection can now work hybridly, which for example permits using the
  Fortran modules shipped with some compiler suites together with MPI
  (e.g. PGI on Windows shipping MSMPI modules)
- Ability to determine MPI library version (*requires* try_run, caution)
  upon request
- Ability to determine Fortran capabilities from MPI-3 for each of the
  bindings (subarrays, asynchronous attribute protecting entities) (also
  requires try_run)

Fine grained control over the search process:

- Possibility to selectively enable and disable steps like compiler
  wrapper search and guessing. Permits picking Microsoft MPI over Intel
  MPI if both are loaded (previously not possible without removing the
  IMPI compiler wrappers from the environment)
- Ability to pick MPICH2 over MSMPI (previously the first one located
  was taken)
- A user may now pass compiler flags to the compiler wrapper script,
  enabling much more flexibility. This permits for example linking the
  Intel MPI debug runtime, static linking, ILP64 with Fortran,
  linking tracing, ...
- A user may define a suffix for all MPI binaries that are being looked
  for (useful on Debian/Ubuntu where the alternative MPI installs are each
  appended with their name, e.g. mpicc.mpich and mpicc.lam)

Cache variable improvements

- Instead of the previous plural cache variables a list-of-variables
  approach is now in place. Permits correcting individual variables
  instead of having to wade through a list, also speeds up the search
  process and increases comfort by eliminating duplicate entries in
  LIBRARIES over languages
- MPIEXEC was corrected to MPIEXEC_EXECUTABLE in order to fix the
  grouping in the CMake GUI for the variable (previously ungrouped)
2017-09-15 14:55:08 +02:00
Brad King
3449c18c36 Merge topic 'findopenmp-components'
d25f30a6 FindOpenMP: Add support for components
23530151 FindOpenMP: Minor environmental improvements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1266
2017-09-15 08:54:03 -04:00
Brad King
188cdb98a7 Merge topic 'codeblocks-exclude-external'
fb19b778 CodeBlocks: add option to exclude external files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1159
2017-09-15 08:53:04 -04:00
Christian Pfeiffer
d25f30a6f8 FindOpenMP: Add support for components
Language specific components are added to FindOpenMP to ease consumption
of the module's results.
2017-09-14 18:11:28 +02:00
Brad King
01b9d039e7 Merge topic 'get_filename_component-fix-program-split'
31f73eb1 get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semantics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1251
2017-09-14 07:39:24 -04:00
Alexandr (Sagrer) Gridnev
fb19b7789a CodeBlocks: add option to exclude external files
Add variable `CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES` to optionally
exclude files from outside the project root from the project file
written by the CodeBlocks extra generator.  This optionally restores
logic that had been removed by commit v2.8.3~40^2 (CodeBlocks Generator:
Do not omit files in the project file listing, 2010-10-05) in response
to QTCREATORBUG-2250.

Issue: #12110
Fixes: #17188
2017-09-14 13:21:59 +03:00
Brad King
31f73eb12d get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semantics
The KWSys `SystemTools::SplitProgramFromArgs` implementation goes into
an infinite loop when the value is just " " (a space).  Since the
"program path with unquoted spaces plus command-line arguments"
operation it is trying to provide is poorly defined (string parsing
should not depend on filesystem content), just stop using it.

Instead consider the main two use cases the old approach tried to handle:

* The value is the name or absolute path of a program with no quoting
  or escaping, but also no command-line arguments.  In this case we
  can use the value as given with no parsing, and assume no arguments.

* The value is a command-line string containing the program name/path
  plus arguments.  In this case we now assume that the command line
  is properly quoted or escaped.

Fixes: #17262
2017-09-13 10:47:04 -04:00
Minmin Gong
bc7c94fe13 MSVC: Add support for ARM64 architecture
Visual Studio 15.4 adds support for this architecture.

Fixes: #17213
2017-09-12 09:54:29 -04:00
Brad King
bf19bb5609 Merge topic 'timestamp'
014ad298 Timestamp: support %A and %B

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1228
2017-09-11 07:49:40 -04:00