The FindVTK module only existed to help find_package(VTK) calls work in
old projects written to use "USE_VTK_FILE" instead of "VTK_USE_FILE".
Drop it to allow find_package(VTK) calls to search for VTKConfig.cmake
directly.
The FindITK module only existed to help find_package(ITK) calls work in
old projects written to use "USE_ITK_FILE" instead of "ITK_USE_FILE".
Drop it to allow find_package(ITK) calls to search for ITKConfig.cmake
directly.
df84281d Help: Add notes for topic 'vs-nsight-tegra-generator'
69e198dc VS: Generate Nsight Tegra project revision number
5365c9ac VS: Map Nsight Tegra file types in .vcxproj files
178f56a5 VS: Fix Tegra-Android platform linking of libraries by name
7115702f Tests: Add test for VS Nsight Tegra generator support
a6289499 VS: Generate ANDROID_GUI executables as app packages
c12e4699 Add 'ANDROID_API' target property to set Android Target API
9a4df52a Add 'ANDROID_GUI' target property to mark Android applications
16569abf cmTarget: Track internally whether platform is Android
ef0fd4f0 VS: Teach vcxproj generation about the Tegra-Android platform
d09b60f5 VS: Detect compiler id of Nsight Tegra-Android toolchains
2f071466 VS: Teach VS >= 10 to recognize CMAKE_SYSTEM_NAME 'Android'
Also add a 'CMAKE_ANDROID_GUI' variable to set the property default
so a project can easily make all executables Android applications.
An Android application executable file has the same extension as a
shared library (.so).
When CMAKE_SYSTEM_NAME is 'Android', check for an installation of
'NVIDIA Nsight Tegra Visual Studio Edition' and generate .vcxproj
files for the "Tegra-Android" platform. Also make the installed
version available in a CMAKE_VS_NsightTegra_VERSION variable.
be6a555d Tests: Test setting a generator platform in a toolchain file
d506fee8 Tests: Use -A option to pass generator platform selection
11c9ddd6 ExternalProject: Use -A option to pass generator platform
29bd843e CTest: Use -A option to pass generator platform selection
eb7d8156 cmake: Add -A option to specify a generator platform
858d5a0b Fix if() checks of CMAKE_SYSTEM_NAME on Cygwin
e177e7af FPHSA: Avoid if() dereferencing of quoted variable
425acc52 cmcurl: Use if(DEFINED) to simplify conditions
cede5cbd libarchive: Avoid depending on if() to dereference a quoted variable
2d97178b FindGTK2: Avoid depending on if() to dereference a quoted variable
0b12815d Modules/Test*.cmake: Use if(DEFINED) to simplify conditions
188a1f23 If: Introduce policy CMP0054 - don't dereference quoted variables in if()
b900c1cc If: Extract cmConditionEvaluator from if() implementation
Define the 'cmake -A' option to set CMAKE_GENERATOR_PLATFORM
without having to spell out the whole variable name. We choose
the name '-A' for "platform" because '-P' is already taken, and
in the common use case the "platform" is actually an architecture
(e.g. x64).
Teach the RunCMake test infrastructure to use -A to pass the generator
platform. Extend the RunCMake.GeneratorPlatform test with a case to
verify that the -A option cannot be repeated.
The ctest_configure command already reads the CTEST_CMAKE_GENERATOR
variable to get the value for the cmake -G option. Read new variable
CTEST_CMAKE_GENERATOR_PLATFORM to pass on as CMAKE_GENERATOR_PLATFORM.
The "ctest --build-and-test" mode already has "--build-generator" to
specify the -G option to CMake. Add a "--build-generator-platform" option
to specify a value to pass on as CMAKE_GENERATOR_PLATFORM.
For VS generator names that do not specify the platform name, read
CMAKE_GENERATOR_PLATFORM to get it.
Extend the RunCMake.GeneratorPlatform test with a case covering
use of the x64 platform when the test generator is a Visual Studio
generator whose name does not specify a platform.
Reject the option by default. It will be implemented on a per-generator
basis. Pass the setting into try_compile project generation. Add cache
entry CMAKE_GENERATOR_PLATFORM and associated variable documentation to
hold the value persistently.
Add a RunCMake.GeneratorPlatform test to cover basic use cases for the
option. Verify that CMAKE_GENERATOR_PLATFORM is empty by default, and
that it is rejected when the generator does not support a user setting.
Explain that try_compile calls need to be protected with conditions to
avoid running more than once so that it is easy to isolate a single
try_compile to perform with --debug-trycompile.
39fefde2 VS: Add test case for Windows Phone and Windows Store
89da8465 MSVC: Define 'WIN32' for Windows Store and Windows Phone
ed7f085f Help: Add notes for topic 'vs-windows-apps'
dd11ae8f VS: Do not compile C sources as WinRT (#15100)
b8e40538 VS: Mark Windows Phone and Store targets as App Containers
0432f062 VS: Always ignore ole32 on Windows Phone 8.0
e6ff2f8b VS: Generate Windows Metadata for WinRT components
ee48f4c7 VS: Generate Windows Phone and Windows Store projects as Unicode
cb1aceed VS: Add VS_WINRT_COMPONENT property to enable CompileAsWinRT
401269e4 VS: Handle .pfx files explicitly in generator
23782171 VS: Handle AppxManifest sources explicitly in generator
bc373c6d VS: Set Window Phone/Store app type in CMake-generated targets
d89b2889 VS: Mark CMake-generated targets as Utility in .vcxproj files
03ad8f28 CMakeDetermineCompilerABI: Link with standard libraries on MSVC
The MSVC /ZW flag is valid only for C++ sources. Whenever we enable
CompileAsWinRT for the whole target, disable it for all C sources.
Update the documentation of VS_WINRT_COMPONENT to drop the statement
about undefined behavior for non-C++ sources, because it is now
defined as expected.
cbd1d42b Help: Add notes for topic 'vs-masm'
0f8522a6 VS: Add MASM support to VS 8 and 9 (#8170, #14984)
a43f4400 VS: Move internal MasmEnabled member up to VS 7 generator
df3b007d VS: Add test for MASM support
e8727449 VS: Populate MASM tool build settings in .vcxproj files
0271a5f9 VS: Manually fix MASM flag table entries
1d662e48 VS: Generate MASM flag tables from MSBuild tool files
4f6940df VS: Fix ASM_MASM support in VS >= 10
d7866c52 ASM_MASM: Fix selection of ml64
0374abdb ASM_MASM: Add preprocessor definitions to compile lines
5b0a46e1 ASM_MASM: Do not require compiler to be a full path
802dbe52 cmLocalVisualStudio7Generator: Rename local 'lang' var
Deprecate VS_WINRT_EXTENSIONS and document VS_WINRT_COMPONENT as for VS
generators only. Also define _WINRT_DLL in SHARED libraries in order to
get a .lib produced.
Inspired-by: Paul Annetts <paul@lightunobscured.com>
- autodetects Ice on all major platforms
- allows building with all supported Visual Studio versions on Windows
- autodetects the slice path on most platforms
- separately detects the Ice programs, headers, slice files and
libraries so that any Ice configuration or installation errors can
be accurately reported, making diagnosis of Ice problems simpler
aa21001b Help: Add notes for topic 'vs-special-source-file-properties'
6fe770e1 VS: Add a source file property to set the hlsl shader type
9b4dc2ad VS: Add a source file property to mark content for Windows App deployment
f063a914 VS: Re-arrange WriteExtraSource to support tool configuration
653529ce CTest: Allow / to be in the build name, and be consistent with the build name
39b5df2f ctest_update: Add CTEST_UPDATE_VERSION_ONLY option to only note the version
This allows ctest_update to get the current version without actually
changing the repository. This is useful when using Jenkins or an
external project to update the source to a specific version, but you
still want the current version to show up in CDash.
Copy the CheckCSourceCompiles module and port it to Fortran.
Extend the FortranOnly test to try using the new module.
Suggested-by: Nicolas Bock <nicolasbock@gmail.com>
Create a VS_DEPLOYMENT_CONTENT source file property, supporting
generator expressions, to compute whether a source file should be marked
as DeploymentContent or ExcludedFromBuild in Windows Phone and Windows
Store projects.
Inspired-by: Minmin Gong <minmin.gong@gmail.com>
5d3d9a22 Help: Add notes for topic 'vs-windows-phone-and-store'
401a00d9 VS: Set WindowsPhone and WindowsStore min VS version required
709cebde VS: Generate WindowsPhone and WindowsStore application types
72395ab2 VS: Add .sln "Deploy" mark for WindowsPhone and WindowsStore binaries
2074f581 MSVC: Add system libs for WindowsPhone and WindowsStore
c72f0887 MSVC: Add default WindowsPhone and WindowsStore compile flags
1c94558a MSVC: Disable incremental linking for WindowsPhone and WindowsStore
592098e2 Define 'WINDOWS_PHONE' and 'WINDOWS_STORE' variables
aa42a78f Add WindowsPhone and WindowsStore platform information modules
b94ddf6c CMakeDetermineCompilerId: Recognize WindowsPhone and WindowsStore
d7938bff VS: Select WindowsPhone and WindowsStore default toolsets
3abd150c VS: Save WindowsPhone and WindowsStore system internally
5bf1c5cc Help: Document add_custom_command PRE_BUILD/PRE_LINK for exe/lib only (#15059)
2a58c872 Help: Revise and format 'add_custom_command' docs
cb88742d Help: Remove stray content from 'add_custom_command' docs
State explicitly that the PRE_LINK mode is not for targets created by
the add_custom_target command. The existing wording for PRE_BUILD being
treated as PRE_LINK by non-VS generators will now imply this restriction
for PRE_BUILD too.
Format the reStructuredText markup manually. Organize the command
options into a definition list. Use inline markup to cross-reference
related documents.
Document the COMPILE_DEFINITIONS_<Config> properties as deprecated.
Add new sections for deprecated properties and move POST_INSTALL_SCRIPT
and PRE_INSTALL_SCRIPT there as well.
Previously this generator expression was used internally by the
target_link_libraries command to honor private linking requirements of
static libraries in their INTERFACE_LINK_LIBRARIES. Remove the check
that limits $<LINK_ONLY> to this use case to make it available for
project code to use too.
This reverts commit cfab942e5f.
Since commit v2.8.11~362^2 (Generate an early-return guard in target
Export files, 2012-11-30) an external include guard is not needed.
In the cmake-generator-expressions(7) manual, link to the variables
that correspond to the PLATFORM_ID, C_COMPILER_ID, CXX_COMPILER_ID,
C_COMPILER_VERSION, and CXX_COMPILER_VERSION generator expressions.
Fix cmTarget::GetSourceFiles to set EvaluateForBuildsystem on the
$<TARGET_PROPERTY:...,INTERFACE_SOURCES> generator expression so that
the $<TARGET_OBJECTS> generator expression is allowed within an
INTERFACE_SOURCES value.
Extend the InterfaceLibrary test to cover this case. Extend the
RunCMake.TargetObjects test to cover failure of $<TARGET_OBJECTS>
when used through $<TARGET_PROPERTY:...,INTERFACE_SOURCES> in a
non-buildsystem context.
2c470b77 add_library: Allow arbitrary non-linked sources in OBJECT libraries
de4f3e2c Tests: Fix broken dependency in ObjectLibrary test
54bf5858 Tests: Resolve TODO comment left in ObjectLibrary test
This commit adds support for ThreadSanitizer to ctest. ThreadSanitizer
is part of the clang compiler and also gcc 4.8 and later. You have to
compile the code with special flags. Then your code gets the the
ThreadSanitizer ability built into it. To pass options to the
ThreadSanitizer you use an environment variable. This commit teaches
ctest to parse the output from ThreadSanitizer and send it to CDash.
Loosen this restriction on OBJECT libraries to allow source files of any
name to be generated by custom commands or listed for reference in IDE
projects so long as they would not affect linking of a normal library.
Update the rejection message to be more specific about the looser
restriction.
Extend the ObjectLibrary test to cover a ".cmake" file generated by a
custom command in an OBJECT library.
f0e298ad Help: Add notes for topic 'vs14-generator'
5c105140 Tests: Simplify LoadCommand tests
b1cbd577 FindBoost: Add -vc140 mangling for VS 14
bdc7d9c8 VS14: Fix Cl and Link flag tables as previous versions
d96b3f68 VS14: Generate flag tables from MSBuild v140 tool files
65624c39 VS14: Add Visual Studio 14 generator (#14982)
8635ac23 Tests/Preprocess: Remove unnecessary VS version tests
Call the generator "Visual Studio 14" without any year because this
version of VS does not provide a year in the product name.
Copy cmGlobalVisualStudio12Generator to cmGlobalVisualStudio14Generator
and update version numbers accordingly. Add the VS14 enumeration value.
Teach the platform module Windows-MSVC to set MSVC14 and document the
variable. Teach module InstallRequiredSystemLibraries to look for the VS
14 runtime libraries.
Teach tests CheckCompilerRelatedVariables, VSExternalInclude, and
RunCMake.GeneratorToolset to treat VS 14 as they do VS 10, 11, and 12.
Co-Author: Pawel Stopinski <diokhan@go2.pl>
Installing large directories, e.g., the output of a doxygen run, prints
one line per file resulting in too much noise in the build output. Add
an option to the install(DIRECTORY) command to not print anything upon
make install.
Extend the RunCMake.install test with cases covering MESSAGE_NEVER
behavior of the install(DIRECTORY) command.
Suggested-by: Stefan Eilemann <Stefan.Eilemann@epfl.ch>
Create a variable to allow users to control which installation
messages are printed. In particular, provide a "LAZY" setting
that prints "Installing" messages but not "Up-to-date" messages.
This is desirable for incremental re-installations.
Suggested-by: J Decker <d3ck0r@gmail.com>
Extend the cmake command-line interface to support
cmake -E env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...
This will be useful to run processes with modified environments
without using a shell or a full "cmake -P" script to wrap it.
Extend the RunCMake.CommandLine test to cover success and failure cases.
Inspired-by: Jonathan Bohren <jbo@jhu.edu>
f0a0f3dc WCDH: Fix compiler id test for compatibility macros.
627ad96b Project: Detect other compilers before detecting Clang.
bc950169 WCDH: Remove noise from generated defines.
eecd93fc Features: Escape the COMPILE_OPTIONS for dialects.
The DECL part is redundant, and the language part is not needed. The
source language and context already determines the language, so there
is no need to repeat it in the define name.
The add_library(INTERFACE) and Interface Libraries documentation
list all the INTERFACE_* properties and target_* commands that
can be used to define the interface. Add INTERFACE_SOURCES
and target_sources() to these lists for completeness.
7eef823e Help: Add comma to assist parsing of ctest_build command docs.
5fb9b16d Help: Document that file(GENERATE) re-writes only when needed.
95135ac3 Help: Add missing external link marker.
Delay use of CMAKE_GENERATOR_TOOLSET until the CMakeSystem.cmake
file has been configured and loaded during the first project() or
enable_language() command. This gives the toolchain file named by
CMAKE_TOOLCHAIN_FILE a chance to set CMAKE_GENERATOR_TOOLSET. This
point is still early enough to set the generator toolset prior to
the initialization of any languages that might use the toolset.
The cmake::GeneratorToolset member variable remains an indication
of what was specified by the -T option or loaded from the cache.
It does not need to be updated based on the toolchain file setting.
The cmMakefile::TryCompile can still pass cmake::GeneratorToolset
into the inner instance because the try-compiled project will do
platform and language initialization using the CMakeSystem module
configured for the outer project.
Extend the RunCMake.GeneratorToolset test with cases that use a
toolchain file to set CMAKE_GENERATOR_TOOLSET.
Add support for Cobertura coverage files written by Java.
Add a test which uses the report from a Java run of Cobertura to calculate coverage.
In the documentation of CTEST_COVERAGE_COMMAND, give a sample .sh file to merge
the Cobertura .ser files and generate the XML report from the merged file.
In the ctest(1) manual and ctest_start() command documentation, convert
mentions of CTest Script variables to cross-references so they will be
rendered as links.
Explicitly specify the sequence of underline characters we use in the
CMake documentation. It is the same sequence as that suggested in the
Sphinx documentation, but we have our own descriptions.
This is the convention suggested in the Sphinx documentation and is
already used in several other places in the CMake documentation.
Update a few places where we were using other characters.
Explain how to use $<BUILD_INTERFACE> and $<INSTALL_INTERFACE> directly
in the documentation of the target_include_directories command and
INTERFACE_INCLUDE_DIRECTORIES target property. Otherwise readers need
to notice the link to the cmake-buildsystem(7) manual and find the
example in that to understand the need for these expressions.
Also fix the explanation in cmake-buildsystem(7) to not claim that
relative paths may be used inside a BUILD_INTERFACE expression.
Note in a few places of the cmake_policy() command documentation
that the cmake_minimum_required() command can set policies too.
Inspired-by: Peter Kümmel <syntheticpp@gmx.net>
Teach set_property and get_property an "INSTALL" property type to be
associated with install-tree file paths. Make the properties available
to CPack for use during packaging. Add a "prop_inst" Sphinx domain
object type for documentation of such properties.
Link to it from the documentation of related properties, variables
and commands.
Extend the cmake-developer(7) documentation with notes on
extending feature support for compilers.
Organize the documentation by sub-command to keep the signatures and
their descriptions nearby. Use inline and explicit reST markup. Revise
wording as necessary for the updated layout. Clarify behavior of the
file(GENERATE) command w.r.t. conflicting file names.
The ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS access type was switched on an
undocumented variable and its lookup caused an unnecessary performance
impact. Remove it.
Allow setting build properties based on the features available
for a target. The availability of features is determined at
generate-time by evaluating the link implementation.
Ensure that the <LANG>_STANDARD determined while evaluating
COMPILE_FEATURES in the link implementation is not lower than that
provided by the INTERFACE of the link implementation. This is
similar to handling of transitive properties such as
POSITION_INDEPENDENT_CODE.
Add source file properties to control Xcode file type attributes:
XCODE_EXPLICIT_FILE_TYPE => explicitFileType
XCODE_LAST_KNOWN_FILE_TYPE => lastKnownFileType
Add a RunCMake.XcodeProject test to verify generated project content.
Add properties and variables corresponding to CXX equivalents.
Add features for c_function_prototypes (C90), c_restrict (C99),
c_variadic_macros (C99) and c_static_assert (C11). This feature
set can be extended later.
Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader
to conditionally represent the c_restrict feature.
Provide a function to write a portable header to detect compiler
features. Generate a preprocessor #error for unknown compilers
and compiler versions whose features are not yet recorded. This
error condition might be relaxed in the future, but for now it
is useful for verification of expectations.
ba387cb8 Help: Add notes for topic 'package-disable-registry'
be8ae960 Allow the Package Registry to be disabled (#14849)
d09fda5d Tests: Improve FindPackageTest for in-source builds
ac24a1c0 Tests: Improve FindPackageTest exported package version
When a project is packaged for redistribution the local package
registries should not be updated or consulted. They are for developers.
Add variables to disable use of package registries globally:
* CMAKE_EXPORT_NO_PACKAGE_REGISTRY that disables the export(PACKAGE)
command
* CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY that disables the User Package
Registry in all the find_package calls.
* CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY that disables the
System Package Registry in all the find_package calls.
Update documentation and unit tests.
Use the highest standard compile flags available if requested language
version is too new.
This supports use-cases like
set(CMAKE_CXX_STANDARD 14)
# Compiled with -std=c++11 with GNU 4.7, which has no -std=c++14
# or equivalent flag
add_executable(main main.cpp)
This can be used in combination with preprocessor defines which
communicate the availability of certain language features for
optional use.
This option was removed during conversion to the reStructuredText
documentation. Restore it. Process documentation starting at
Help/index.rst so that all manuals are included in the output.
Warn project developers at runtime that the module should not be used
anymore. Issue the diagnostic only when the project requires a new
enough CMake to use the alternative. Honor the
CMAKE_(ERROR|WARN)_DEPRECATED settings.
Allow directories in the source tree or build tree only if the
install tree is a subdirectory of the source tree or build tree,
as appropriate.
Re-use the test files in the RunCMake.include_directories test
to run in multiple scenarios. Bump the required CMake version
in the test to 3.0 to ensure that the new policy warnings are
emitted correctly.
Expect cxx_variadic_templates to implement N2555.
N2555 is essentially a bugfix and predates most compiler releases which
aimed to experimentally support variadic templates.
This can be used to set the compiler features required by particular
targets. An error is issued at CMake time if the compiler does not
support the required feature. If a language dialect flag is required
by the features used, that will be added automatically.
Base the target_compile_features command on cmTargetPropCommandBase. This
gives us 'free' handling of IMPORTED, ALIAS, INTERFACE, non-compilable
and missing targets.
Extend the interface of the target_compile_features command with
PUBLIC and INTERFACE keywords. Populate the INTERFACE_COMPILER_FEATURES
target property if they are set. Consume the INTERFACE_COMPILER_FEATURES
target property from linked dependent targets to determine the final
required compiler features and the compile flag, if needed.
Use the same pattern of origin-debugging which is used for other
build properties.
Record the availability of this feature for GNU 4.8 on (UNIX AND
NOT APPLE) only. In the future, availability can be recorded for
earlier GNU, for other platforms and for other compilers. Initially
the affected configurations are as restricted as possible to allow
for easy testing while extending the features vector in only one
dimension.
The error message when using the set_property API directly is not
very good, but follow up commits will provide origin debugging of
the property and a target_compile_features command which will
provide a configure-time backtrace when possible.
Use the contents of it to upgrade the CXX_STANDARD target property,
if appropriate. This will have the effect of adding the -std=c++11
compile flag or other language specification on GNU when that is
needed for the feature.
Add a feature test using the compiler macros and the preprocessor to
determine available features.
Add a CMAKE_CXX_COMPILE_FEATURES variable which contains all features
known to the loaded compiler, and a CMAKE_CXX_KNOWN_FEATURES variable
containing all features known to CMake. Add language standard specific
variables for internal use to determine the standard-specific compile
flags to use.
This will be extended to other languages in the future. Follow-up
commits will add features which will be recorded by the feature test.
9407174b target_sources: New command to add sources to target.
81ad69e0 Make the SOURCES target property writable.
6e636f2e cmTarget: Make the SOURCES origin tracable.
3676fb49 cmTarget: Allow transitive evaluation of SOURCES property.
e6971df6 cmTarget: Make the source files depend on the config.
df753df9 cmGeneratorTarget: Don't add computed sources to the target.
869328aa cmComputeTargetDepends: Use valid config to compute target depends.
5de63265 Genex: Only evaluate TARGET_OBJECTS to determine target sources.
aa0a3562 cmGeneratorTarget: Compute target objects on demand
042c1c83 cmTarget: Compute languages from object libraries on demand.
fdcefe3c cmGeneratorTarget: Compute consumed object libraries on demand.
c355d108 cmComputeTargetDepends: Track object library depends.
e5da9e51 cmTarget: Allow any generator expression in SOURCES property.
5702e106 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property.
857d30b5 cmGlobalGenerator: Add interface to call ForceLinkerLanguages
28e1d2f8 cmStringCommand: Add GENEX_STRIP subcommand.
bf98cc25 Genex: Evaluate TARGET_OBJECTS as a normal expression.
8cd113ad cmTarget: Store strings instead of cmSourceFile* to represent SOURCES.
4959f341 cmSourceFileLocation: Collapse full path for directory comparisons.
fcc92878 cmSourceFileLocation: Remove unused Update method.
59e8740a cmTarget: Remove AddSourceFile method
26d494ba cmTarget: Use string API to add sources to cmTarget objects.
d38423ec cmTarget: Add a method to obtain list of filenames for sources.
...
13684e2b cmMakefile: Port PolicyOptionalWarningEnabled to string APIs
8018fcca Merge branch 'master' into revise-compiler-id-policies
a41c0a9d Do not warn by default when policy CMP0025 or CMP0047 is not set
d339653e Help: Revise and format policy CMP0025 and CMP0047 docs
Extend the cmGeneratorExpressionDAGChecker with an interface
returning the name of the top target. Use that to determine
when there is a DAG violation, as required by the RunCMake.Languages
tests.
The output of this expression may contain macros for IDEs to replace
such as $(Configuration), $(CURRENT_ARCH) etc. To avoid generating
content which is not usable in other contexts, report an error if
there is an attempt to use it in other contexts.
This commit may be reverted in the future if a solution to the
above difference is implemented.
Remove use of UseObjectLibraries from Makefile and Ninja generators. It
is not needed now because those generators use GetExternalObjects
which already contains the objects from object libraries.
The VS10 generator calls both the UseObjectLibraries and the GetExternalObjects
methods. Ensure that duplicates are not created by skipping objects
from object libraries in handling of GetExternalObjects.
Similarly, fix VS6, VS7 and Xcode object handling by skipping
external objects from OBJECT_LIBRARY usage as appropriate.
The error message in the BadSourceExpression1 test is now reported
by the generator expression evaluator, so it has different text.
These policies are triggered by the use of a particular compiler rather
than outdated CMake code in a project. Avoid warning in every project
that enables a language by not displaying the policy warning by default.
Add variable CMAKE_POLICY_WARNING_CMP<NNNN> to control the warning
explicitly; otherwise enable the warning with --debug-output or --trace.
This breaks with strict policy convention because it does not provide
developers with any warning about the behavior change by default.
Existing projects will continue to build without a warning or change in
behavior. When a developer changes the minimum required version of
CMake in a project to a sufficiently high value (3.0), the project will
suddenly get the new compiler id and may break, but at least the
breakage comes with a change to the project rather than the version of
CMake used to build it.
Breaking strict policy convention is worthwhile in this case because
very few projects will be affected by the behavior change but every
project would have to see the warning if it were enabled by default.
Add inline reST markup as appropriate. Word CMP0047 docs more like
those of CMP0025. State explicitly that the policies must be set
before the project or enable_language command calls.
As well as the traditional variables, providing imported targets is
suggested, and the relative advantages and disadvantages briefly
discussed.
A mini-tutorial walking through creating a simple find module is
provided.
This changes the recommended version variable from Foo_VERSION_STRING to
Foo_VERSION, because there is really no need to have different variable
names for package version files vs. find modules. It notes the old
variable name, though, and suggests setting it for compatibility.
Not everything that isn't MSVC is GCC. I have support for LDC's depfile
format on its way upstream[1], but its future is uncertain. CMake should
at least support this for future depfile formats.
[1]https://github.com/martine/ninja/pull/721
Rely on evaluation in cmCustomCommandGenerator for the generators.
When tracing target dependencies, depend on the union of dependencies
for all configurations.
Restore support for the undocumented <CONFIG>_LOCATION target property
removed by commit v3.0.0-rc1~175^2 (cmTarget: Remove support for
<CONFIG>_LOCATION property, 2013-12-30) as part of the CMP0026 OLD
behavior.
489b1c23 Windows: Use response files to specify link libraries for GNU tools
745caae6 Makefile: Rename linker response file boolean to be more specific
5e8e4d0f cmLocalGenerator: Add response file option to OutputLinkLibraries
b9aa5041 cmLocalGenerator: Simplify GetIncludeFlags output formatting
971653b7 cmLocalGenerator: Add format option to ConvertToLinkReference
0c0ef9e7 cmLocalGenerator: Add format option to ConvertToIncludeReference
02bebd60 cmLocalGenerator: Add format option to ConvertToOutputForExisting
c8751709 Makefile: Factor out some duplicate link libraries generation
Work around the command-line-length limit by using an @linklibs.rsp
response file to pass the flags for link libraries. This allows
very long lists of libraries to be used in addition to the existing
support for passing object files via response file.
Suggested-by: Peter Keuschnigg <peter.keuschnigg@pmu.ac.at>
Recently used cmake-gui locations are searched only on Windows because
the Windows registry is used to record the values. This behavior is
historical and may be removed by a policy in the future so rather than
implementing it on other platforms simply document the current behavior.
This command does not support generator expressions. The documentation
was mistakenly extended to claim it in commit v3.0.0-rc1~60^2~3 (Help: Mark
up the buildsystem commands documentation, 2014-02-03).
Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files
2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY
properties. Those properties now exclusively handle linker PDB files.
Since STATIC libraries do not link their compiler PDB file becomes more
important. Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and
"COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB
file location and pass the value to the MSVC /Fd option.
048be205 Help: Add release notes for the 'faster-parsers' topic
7c565d2f cmGeneratorExpression: Improve parsing in StripEmptyListElements
68eb1757 cmGeneratorExpressionLexer: Use a switch statement to parse
67253133 ExpandListArguments: Optimize the parser
Move the note about VS 6 into the PDB_NOTE.txt common include file
and include it from the per-config properties too. Also re-word
the note to clarify the separate compiler and linker flags involved
and state explicitly that compiler flags are not affected.
6e89c8a5 install: Support generator expressions in FILES and PROGRAMS mode
f11f7b34 cmInstallFilesGenerator: Add reference to calling cmMakefile
e190236c Help: Format install() command documentation
Teach the install(FILES) and install(PROGRAMS) commands to evaluate
generator expressions in the list of files.
Extend the ExportImport test to cover installation cases involving
generator expressions.
Historically CMake used three version components for the feature level.
We released new features while incrementing only the third version
component. Since commit v2.8.2~105^2~4 (New version scheme to support
branchy workflow, 2010-04-23) we used the fourth version component for
bug-fix releases and the development date:
<major>.<minor>.<patch>[.<tweak>][-rc<n>] = Release
<major>.<minor>.<patch>.<date>[-<id>] = Development
This solidified use of three components for the feature level, and was
necessary to continue releasing 2.x versions because:
* Some existing projects performed floating-point comparisons of
${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} to 2.x numbers
so ``x`` could never be higher than 9.
* Version 2.9.<date> was used briefly in post-2.8.0 development in
CVS prior to the transition to Git, so using it in releases may
have caused confusion.
Now that we are moving to 3.x versions, these two restrictions go away.
Therefore we now change to use only two components for the feature
level and use the scheme:
<major>.<minor>.<patch>[-rc<n>] = Release
<major>.<minor>.<date>[-<id>] = Development
People will be tempted to put things there for convenience, thereby
causing conflicts similar to
http://thread.gmane.org/gmane.comp.compilers.clang.devel/35162/focus=35169
where it is conceivable that the LLVM developers could put a flag on
a target for convenience, which would cause conflicts for some downstreams.
When building boost with an alternate namespace the libraries generated
will have a different naming convention. This is often done to ensure
no symbol conflicts with external libraries built against a different
version of boost. If the namespace used is "myprivateboost::" instead
of "boost::" then the libraries built will be named myprivateboost_foo
instead of boost_foo. Add an option to specify a custom namespace used
to alter the library names that get searched for.
Manually read through version control history since the 2.8.12.2
release and write release notes for important user-facing changes.
Co-Author: Stephen Kelly <steveire@gmail.com>
Starting with 3.0 we will use only two components for the feature level,
and policies are only ever introduced with a bump to the feature level
version.
4b7f2f52 Help: Add hyperlink targets for argument types in cmake-language(7)
113df227 Remove ChangeLog.manual
79f55909 Remove ChangeLog.txt
d25dbc90 Tests/BundleTest: Drop use of ChangeLog.txt
ccc87047 Help: Add documents to collect notes between releases
70309e70 Help: Add documents for release notes
34ea1f15 Utilities/Sphinx: Add option to build 'text' format
Describe the meaning of each version component in more detail in the
documentation of CMAKE_VERSION. Simplify the per-component version
variable documentation by referencing the main variable.
Include information about how to compare version strings. Also add
an historical note about the version scheme used prior to commit
v2.8.2~105^2~4 (New version scheme to support branchy workflow,
2010-04-23).
Add a release/dev.txt file and include it from release/index.rst in
development versions. Add a "Changes Since Release" section with a
toctree that globs adjacent "dev/*" documents. Add a sample topic
document explaining how topic-specific release note documents work.
This approach will allow developers to write release notes for their
changes as they are made. The release manager may then consolidate and
organize the notes for a specific release version.
Add a release/index.rst document titled "CMake Release Notes" to hold
the toctree for release notes. Add a "Release Notes" section to the
top-level html document index to link to the new document.
The old documentation stated that "all header files" were considered,
which was not true for any sensible definition of "all header files".
Only header files with certain names are considered.
Document the filename patterns matched for parsing.
4271a4ed Help: Add information about INTERFACE_AUTOUIC_OPTIONS.
7935f4de Help: Note that AUTOMOC consumes the defines and includes from targets.
2739a6f9 Help: Move Qt tool invocation information to a generic cmake-qt manual.
Add an introduction about the use of different package types, and the
ability to use Qt 4 and 5 versions together in a single buildsystem.
Add a section about automatic linking of the qtmain.lib library and
how to disable it.
Teach the project() command to set variables
{PROJECT,<PROJECT-NAME>}_VERSION{,_MAJOR,_MINOR,_PATCH,_TWEAK}
holding the project version number and its components. Add project()
command option "VERSION" to specify the version explicitly, and default
to the empty string when it is not given.
Since this clears variables when no VERSION is given, this may change
behavior for existing projects that set the version variables themselves
prior to calling project(). Add policy CMP0048 for compatibility.
Suggested-by: Alex Neundorf <neundorf@kde.org>
Teach the project() command to recognize an optional "LANGUAGES"
keyword after the project name and prior to the list of languages.
Do not allow multiple copies of the keyword. If the keyword is
specified and no languages are listed, imply NONE.
Introduce policy CMP0047 to control resetting the id for
compatibility.
De-duplicate content in the QNX platform file by including the GNU
one. QNX is a form of GNU platform.
Do not clear CMAKE_SHARED_LIBRARY_${lang}_FLAGS variables. They
are populated again later by the Compiler/GNU.cmake file anyway.
Modify the CMAKE_CXX_COMPILE_OBJECT variable only when the QCC
compiler id is in use, and the language is CXX. Use the QNX
recommended flag for QCC instead of the gcc compatible -x flag.
Populate new module files to handle system includes and depfiles
when using the QCC compiler.
Remove code which unsets the system include and depfiles related
variables. When a GNU driver is used instead of the QCC one, the
appropriate flags will be used. These variables were previously
cleared for lowest-common-denominator compatibility with both
drivers.
Define a new 'CMAKE_CONFIGURE_DEPENDS' directory property that projects
can use to specify input files to the CMake configuration process.
Extend the RunCMake.Configure test to verify that the build system
re-runs CMake when this input changes.
Add documentation entries for variables
CMAKE_OSX_ARCHITECTURES
CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT
Explain what each does and when/how they should be set.
Remove independent doc listing for Qt4ConfigurationSettings, Qt4Macros
and UseQt4. These are implementation details.
Recommend the use of IMPORTED targets.
Remove references to the UseQt4 file, which is obsolete in light of
the IMPORTED targets.
Add documentation for automatic tool invocation and options.
Remove reference to variables which should not be needed in modern
implementations.
73e9340 get_target_property: Error on non-existent target.
ab9f58f FindQt4: Ensure target exists before calling get_target_property.
37ebeb9 FindQt4: Fix use of get_target_property to use actual target name.
6aabb6a Genex: Use case-sensitive comparison for COMPILER_ID.
5bb53f6 cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.
3917d86 Genex: Add a nullary form for CONFIG
5169130 Help: Document the target properties exported to IMPORTED targets.
ee21f1c CompatibleInterface: Test debugging of not-set property.
80e9fe9 Help: Note that language-specific 'built-ins' are set by the project command.
0b5bf8a Help: Mention CMAKE_DISABLE_FIND_PACKAGE_<PackageName> in package docs.
28c865b Tests: simplify Qt4 target usage
6cfe6b8 Help: Fix typo: 'target' -> 'target property'
b7deca4 Test: Remove obsolete commented code.
9c9f69f Genex: Make EQUAL support upper case binary literals
6eb3218 Genex: Fix case of methods in the dag checker.
646c6ec Genex: Use a preprocessor loop to implement transitive DAG check.
711fb38 Genex: List transitive properties and methods as a table, not two lists.
802a28f Add cmHasLiteralSuffix API.
This is consistent with other similar expressions such as PLATFORM_ID,
and makes the CONFIGURATION expression obsolete.
Fix an off-by-one error in
GeneratorExpressionContent::EvaluateParameters exposed by a unit test.
Remove the test for 'bad' nullary use of $<CONFIG>.
Add a unit test to verify that $<CONFIG> and $<CONFIGURATION> have
the same value.
Describe how to define a buildsystem of binary targets, how to
express dependencies between them, how to add build specifications,
how to specify usage requirements, transitive and compatible
propagation and the various pseudo targets.
There is not really any need to. Downstreams can either rely on it
being provided by CMake, or copy and distribute it.
Change the documented include for the find_dependency macro.
Teach the export command to handle export sets defined by invocations
of install(TARGETS ... EXPORT foo). This makes maintenance of targets
exported to both the build tree and install tree trivial.
Revise the organization introduced in commit 2c7cd95c (Help: Organize
top-level index, 2013-10-28) to drop "Other Manuals" and put them in
"Reference Manuals" because the distinction between them has blurred.
Perhaps a better breakdown of the reference manuals will emerge in
the future.
While at it, sort the reference manual toctree by name.
Manually update reStructuredText formatting. Use a definition list
for the possible if() tests supported. Add inline literal markup
as appropriate. Also make minor wording tweaks to make it flow
better with the new markup.