1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-26 06:34:13 +08:00

1155 Commits

Author SHA1 Message Date
Melven Roehrig-Zoellner
e04f1d1b47 CodeBlocks: add option for the CB compiler ID
CodeBlocks uses his own compiler ID string which may differ from
CMAKE_<LANG>_COMPILER_ID. In particular CodeBlocks supports a large
number of different compiler configurations (with different IDs)
This commit adds a cache variable "CMAKE_CODEBLOCKS_COMPILER_ID",
so the user might adjust it when needed.
2017-11-27 14:41:54 -05:00
Brad King
1882ba2e05 Merge topic 'extend-compile-language-genex'
2ae880fa Genex: Enable COMPILE_LANGUAGE for COMPILE_OPTIONS with Visual Studio
2b7d59f3 Genex: Enable COMPILE_LANGUAGE for file(GENERATE) with Visual Studio
0f6f7c8a Genex: Fix COMPILE_LANGUAGE messages to allow file(GENERATE) with Xcode
c5a82d0f Tests: Decouple COMPILE_LANGUAGE in file(GENERATE) from COMPILE_OPTIONS
25773650 Tests: Remove unnecessary result files from RunCMake.File_Generate

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !1511
2017-11-27 09:00:44 -05:00
Brad King
08f66764b3 Merge topic 'server-target-isGeneratorProvided'
afd9a339 server: return whether or not a target is generator provided

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1475
2017-11-27 08:52:06 -05:00
Brad King
0c1912e3e5 Merge topic 'serverFixTestDiscovery'
fe2c2b0f server: ctestInfo fix to return all tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1479
2017-11-27 08:51:35 -05:00
Justin Goshi
afd9a339a1 server: return whether or not a target is generator provided
Some generators auto-generate targets. For example VS generators create
the ALL_BUILD target. Add the ability to mark targets as generator
provided and return that info through cmake-server codemodel.
2017-11-20 14:29:50 -05:00
Brad King
2ae880fa8f Genex: Enable COMPILE_LANGUAGE for COMPILE_OPTIONS with Visual Studio
Since commit v3.9.0-rc4~3^2~1 (VS: Fix target_compile_options for CUDA,
2017-06-21), the evaluation of `COMPILE_LANGUAGE` receives the proper
language.  The set of compile flags used for a target's C and C++
sources is based on the linker language.  By default this is always the
C++ flags if any C++ sources appear in the target, and otherwise the C
flags.  Therefore we can define the `COMPILE_LANGUAGE` generator
expression in `COMPILE_OPTIONS` to match the selected language.

This is not exactly the same as for other generators, but is the best VS
can do.  It is also sufficient for many use cases since the set of
allowed flags for C and C++ is almost the same in Visual Studio.
Furthermore, since the VS generator moves many of the flags to
declarative `.vcxproj` elements, it will automatically avoid passing
C++ flags for C sources.

Issue: #17435
2017-11-20 13:51:25 -05:00
Brad King
1da5a6ea39 Merge topic 'cuda-sep-comp-var'
00e13993 CUDA: Add CMAKE_CUDA_SEPARABLE_COMPILATION variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alexander Korsunsky <a.korsunsky@gmail.com>
Merge-request: !1495
2017-11-20 09:45:58 -05:00
Justin Goshi
fe2c2b0ffb server: ctestInfo fix to return all tests
Prior to this change we were looking at targets. But tests are
associated with directories. This change fixes how we gather all tests.
2017-11-17 09:19:26 -08:00
Brad King
00e13993fd CUDA: Add CMAKE_CUDA_SEPARABLE_COMPILATION variable
Use its value to initialize the `CUDA_SEPARABLE_COMPILATION` target
property when targets are created.

Fixes: #17478
2017-11-17 09:51:39 -05:00
Brad King
2ea17412a9 FindOpenGL: Add policy CMP0072 to prefer GLVND for legacy GL
Fixes: #17449
2017-11-17 07:17:28 -05:00
Brad King
163be8714a Merge topic 'update-ctest-documentation'
3b272ff8 Help: Add 'Label and Subproject Summary' section to ctest(1) manual
002d0a1c Help: Normalize capitalization of 'CTest' in ctest(1) manual
9d3aa95c Help: Divide ctest(1) manual options into sections
7904b659 Tests: Remove incorrect use of 'test-timeout' option
e80dc2ad cmCTest: Remove dead code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1427
2017-11-10 08:05:45 -05:00
Betsy McPhail
3b272ff8e4 Help: Add 'Label and Subproject Summary' section to ctest(1) manual 2017-11-10 07:53:45 -05:00
Betsy McPhail
002d0a1cf9 Help: Normalize capitalization of 'CTest' in ctest(1) manual 2017-11-10 07:53:42 -05:00
Betsy McPhail
9d3aa95ca4 Help: Divide ctest(1) manual options into sections 2017-11-10 07:52:45 -05:00
Brad King
38bb98de51 Merge topic 'cmakeServerRequiredCMakeVersion'
cdf5f34b server: return minimum cmake required version for each project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1462
2017-11-10 07:51:13 -05:00
Domen Vrankar
7e896029cd CPack: enable setting default dir creation permissions
Introduces CPACK_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS
variable which adds support for functionality introduced
by CMAKE_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS variable.

Fixes #17333

# Conflicts:
#	Help/release/dev/cmake-default-dir-install-permissions.rst
2017-11-08 20:27:11 +01:00
Domen Vrankar
deeba85f81 CMake: enable setting default dir creation permissions
Introduces CMAKE_DEFAULT_DIRECTORY_INSTALL_PERMISSIONS
variable which enables the user to specify the default
permissions for directory creation. This setting is then
used to auto set the permissions on directories which
are implicitly created by install() and file(INSTALL)
commands such as CMAKE_INSTALL_PREFIX directories.
2017-11-08 20:27:03 +01:00
Brad King
30fcf13be6 Merge topic 'imported-promotion'
6a3922be Add new target-property `IMPORTED_GLOBAL`.
854e482a cmTarget: Simplified and fixed a string-comparision.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1254
2017-11-08 09:08:15 -05:00
Justin Goshi
cdf5f34b0c server: return minimum cmake required version for each project 2017-11-07 12:15:57 -08:00
Betsy McPhail
e80dc2ad7f cmCTest: Remove dead code
The option 'ctest-config' is ignored.
2017-11-07 14:15:20 -05:00
Deniz Bahadir
6a3922bebe Add new target-property IMPORTED_GLOBAL.
The purpose of this new `IMPORTED_GLOBAL` target-property is to prolong
the lifetime and scope of `IMPORTED` targets in such a way as if they
had been created with the keyword `GLOBAL` in the first place.

* It can only be set to `TRUE`. That means, a local `IMPORTED` target
  can be promoted to global scope but a global `IMPORTED` target cannot
  be degraded to local scope!
* Setting it to `TRUE` only succeeds if done from within the same
  directory in which the `IMPORTED` target was created in the first
  place.

Fixes #17256.
2017-11-07 15:08:41 +01:00
Brad King
1348f97784 Merge topic 'server-test-info'
35a52bd1 server: add "ctestInfo" request to get test info

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1414
2017-11-07 08:18:59 -05:00
Justin Goshi
35a52bd1b4 server: add "ctestInfo" request to get test info 2017-11-03 09:39:01 -07:00
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
cec4b86f0a Merge topic 'server-codemodel-install-dest'
296eb9ad cmake-server: Add target install destinations to codemodel

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1382
2017-10-25 08:17:03 -04:00
Justin Goshi
296eb9ad4c cmake-server: Add target install destinations to codemodel
Protocol version is updated to 1.2 since this is a change
to what was released in cmake version 3.10.
2017-10-24 14:58:07 -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
Shane Parris
5d67e9025d file(DOWNLOAD|UPLOAD): Add 'NETRC' and 'NETRC_FILE' suboption 2017-10-18 15:21:42 -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
Brad King
60f982aab4 Merge topic 'imported-interface-no-system'
22beb07f Help: Clarify documentation of NO_SYSTEM_FROM_IMPORTED
2de0e0fd Do not initialize NO_SYSTEM_FROM_IMPORTED on INTERFACE libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1386
2017-10-16 09:51:46 -04:00
Gregor Jasny
5de37a4a64 cmake: Add --open option for IDE generators 2017-10-13 21:28:34 +02:00
Brad King
f64c554cc9 Merge branch 'imported-interface-no-system' into release-3.10
Merge-request: !1386
2017-10-13 14:36:45 -04:00
Brad King
22beb07f98 Help: Clarify documentation of NO_SYSTEM_FROM_IMPORTED
This property is meant to be set on the consumers of imported targets,
not the imported targets themselves.

Fixes: #17348
2017-10-13 14:32:15 -04:00
Brad King
2de0e0fdfa Do not initialize NO_SYSTEM_FROM_IMPORTED on INTERFACE libraries
The change in commit v3.8.0-rc1~276^2 (Allow NO_SYSTEM_FROM_IMPORTED on
imported INTERFACE libraries, 2016-11-21) was incorrect.  The property
is not meant to be set on imported targets at all.  It is meant to be
set on their consumers that compile sources.  Since INTERFACE libraries
have no sources to compile, the property is not needed on them.

Revert most of that change.  Unfortunately we must still tolerate
project code setting NO_SYSTEM_FROM_IMPORTED on INTERFACE libraries
because they were allowed by CMake 3.8 and 3.9.

Issue: #17348
2017-10-13 14:32:14 -04:00
Brad King
1ed11f1c0d Help: Minor text clarifications in cmake-language(7) manual
Clarify definitions of `bracket_open` and `bracket_close` productions.

In note about unquoted arguments containing unescaped double quotes,
provide examples of how they can be written as quoted arguments.

Also clarify location of nested calls supported by variable function
scope.

Suggested-by: Дилян Палаузов <dilyan.palauzov@aegee.org>
2017-10-10 11:26:00 -04:00
Brad King
b96ca728f1 Add infrastructure to detect secondary compiler version information
Create a `CMAKE_<LANG>_COMPILER_VERSION_INTERNAL` variable to hold
a secondary/internal compiler version number detected at the same
time as the primary compiler version.  This will be useful for some
compilers where we need such a number to determine correct usage.

Inspired-by: Stefan Andersson <tfosm@hotmail.com>
Suggested-by: Norbert Lange <norbert.lange@andritz.com>
Issue: #17264
2017-10-03 08:11:27 -04:00
Brad King
f952f16d23 Help: Fix placement of one variable in cmake-variables manual
The `CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND` variable was recently
added slightly in the wrong place for the sorted ordering.
2017-10-02 11:40:40 -04:00
Sebastian Holtermann
75c98b5ef4 Autogen: Doc: Add documentation for (CMAKE_)AUTOMOC_COMPILER_PREDEFINES
Also adds the documentation for CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND.

Closes #17275
2017-09-29 15:00:47 +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
Brad King
194dd9ea8b Merge topic 'autogen-macro-names2'
93c8d55d Autogen: Update (CMAKE_)AUTOMOC_MACRO_NAMES release notes
084ace47 Autogen: Tests: Update AUTOMOC_MACRO_NAMES test
08041dd1 Autogen: Doc: Update documentation for (CMAKE_)AUTOMOC_MACRO_NAMES
7b33d67b Autogen: Create info file directory before writing
786b5be0 Autogen: Define all macro names in CMAKE_AUTOMOC_MACRO_NAMES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1321
2017-09-29 08:53:13 -04:00
Sebastian Holtermann
08041dd15e Autogen: Doc: Update documentation for (CMAKE_)AUTOMOC_MACRO_NAMES 2017-09-28 09:21:44 +02:00
Craig Scott
a2eec58dfa Merge topic 'document_env_variables'
e6b77c5f Help: Document CMake's environment variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1235
2017-09-27 09:01:35 -04: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
Brad King
05e234cb16 Merge topic 'autogen-per-config-sources'
4603d6b0 Autogen: Docs: Add documentation internal links
f86ba8ee Autogen: Reintroduce per-config sources support
5d3bca64 Autogen: Rename cmQtAutoGen::GeneratorType to cmQtAutogen::Generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1307
2017-09-27 07:15:12 -04:00
Robert Maynard
e6b77c5f1a Help: Document CMake's environment variables 2017-09-26 08:44:45 -04:00