Commit Graph

569 Commits

Author SHA1 Message Date
Brad King b1883bc8b7 Merge topic 'try_compile-config-flags'
d582c23a try_compile: Add policy CMP0066 to honor CMAKE_<LANG>_FLAGS_<CONFIG>
2016-06-30 09:47:41 -04:00
Brad King b5ec5b0901 Avoid using KWSys auto_ptr by adopting it ourselves
Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to
our own implementation adopted from the KWSys auto_ptr implementation.
Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers
that do not warn about it.

Automate the client site conversions:

    git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \
      's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
2016-06-29 09:47:58 -04:00
Brad King d582c23a47 try_compile: Add policy CMP0066 to honor CMAKE_<LANG>_FLAGS_<CONFIG>
In the `try_compile` source file signature we propagate the caller's
value of `CMAKE_<LANG>_FLAGS` into the test project.  Extend this to
propagate `CMAKE_<LANG>_FLAGS_<CONFIG>` too instead of always using the
default value in the test project.  This will be useful, for example, to
allow the MSVC runtime library to be changed (e.g. `-MDd` => `-MTd`).
However, some projects may currently depend on this not being done,
so we need to activate the behavior using a policy.

This change was originally made by commit v3.6.0-rc1~160^2 (try_compile:
Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes, 2016-04-11) but without the
policy and so had to be reverted during the 3.6 release candidate cycle.

Fixes #16174.
2016-06-29 09:11:02 -04:00
Brad King c2c2a2f4c7 Merge topic 'vs-tool-override'
ed05f11d VS: Add a VS_TOOL_OVERRIDE source file property
2016-06-23 08:59:29 -04:00
Gilles Khouzam 35a6cac2d3 VS: Add VS_SDK_REFERENCES target property to reference external SDKs
Allow one to specify external SDK references such as
`Microsoft.AdMediatorWindows81, Version=1.0`.
2016-06-22 08:34:12 -04:00
Gilles Khouzam ed05f11dd2 VS: Add a VS_TOOL_OVERRIDE source file property
This property allow to specify a specific Visual Studio tool for a
source file overriding the default tool behavior.  For example, a
`.resw` file being processed as a `PriResource` file.  This has the
advantage of being able to teach CMake to process new file types without
code modifications.
2016-06-20 10:46:14 -04:00
Alex Turbov e63151ff54 cmake: Add an option to control what files needs to be traced
Even in relatively small projects using `--trace` (and `--trace-expand`)
may produce a lot of output.  When developing a custom module usually
one is interested in output of only a few particular modules.

Add a `--trace-source=<file>` option to enable tracing only a subset of
source files.  The final output would be only from requested modules,
ignoring anything else not matched to given filename(s).
2016-06-17 11:46:23 -04:00
Brad King 9e47255604 Merge topic 'xcode-mig-support'
8be00e44 Help: Add release note about XCODE_FILE_ATTRIBUTES source file property
27eb657d Xcode: Add support for mig files
811f6c82 Xcode: Add XCODE_FILE_ATTRIBUTES source file property
ef494edf Xcode: Don't emit empty settings blocks.
82ebbf68 Xcode: Add function to conditionally add Xcode Attributes
025edea0 Xcode: Add const qualifiers
2016-06-17 11:06:47 -04:00
Brad King e4cb7d7609 Merge topic 'link_what_you_use'
a0902efa Help: Add notes for topic 'link_what_you_use'
96242f80 Add options to run `ldd -u -r` as a "link-what-you-use" tool
2016-06-17 11:06:44 -04:00
Bill Hoffman 96242f8022 Add options to run `ldd -u -r` as a "link-what-you-use" tool
Create a LINK_WHAT_YOU_USE target property and corresponding
CMAKE_LINK_WHAT_YOU_USE variable to enable this behavior.
Extend link commands by running `ldd -u -r` to detect shared
libraries that are linked but not needed.
2016-06-17 10:56:40 -04:00
James Touton 811f6c8252 Xcode: Add XCODE_FILE_ATTRIBUTES source file property
This adds values to the ATTRIBUTES list in PBXBuildFile settings.
2016-06-17 10:49:06 -04:00
Daniel Scharrer 896ad251de Teach find_library and find_package to search lib32 paths (#11260)
Add a ``FIND_LIBRARY_USE_LIB32_PATHS`` global property analogous to the
``FIND_LIBRARY_USE_LIB64_PATHS`` property.  This helps find commands on
multilib systems that use ``lib32`` directories and either do not have
``lib`` symlinks or point ``lib`` to ``lib64``.
2016-06-10 11:09:16 -04:00
Brad King fb8b8dd106 Merge topic 'add-FindVulkan'
adf4df28 Add FindVulkan.cmake.
2016-06-08 12:56:07 -04:00
Brad King 5804068c22 Merge topic 'doc-ctest_update'
1b18180e Help: Document CTest Git fetch-and-reset behavior
558e4d1e Help: Document ctest_update branch following behavior
2016-06-08 12:56:05 -04:00
Matthäus G. Chajdas adf4df28ca Add FindVulkan.cmake.
This adds FindVulkan with corresponding tests.
2016-06-08 12:44:03 -04:00
Brad King 1b18180ed4 Help: Document CTest Git fetch-and-reset behavior 2016-06-08 09:58:43 -04:00
Clinton Stimpson 2e3c67d1b6 productbuild: Add new productbuild cpack generator.
This cpack generator basically replaces the obsolete PackageMaker generator.
2016-06-03 14:41:57 -06:00
Brad King d256ba078a try_compile: Optionally forward custom platform variables to test project
Add a `CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable to specify a list
of custom variables to be forwarded to a `try_compile` test project.
This will be useful for platform information modules or toolchain files
to forward some platform-specific set of variables from the host project
(perhaps set in its cache) to the test project so that it can build the
same way.
2016-05-25 09:36:19 -04:00
Brad King c13408279f Add a variable to specify language-wide system include directories
Create a `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` variable to specify
system include directories for for `<LANG>` compiler command lines.
This plays a role for include directories as the existing
`CMAKE_<LANG>_STANDARD_LIBRARIES` variable does for link libraries.
2016-05-25 09:30:31 -04:00
Brad King 7807b3a9db Help: Document CMAKE_<LANG>_STANDARD_LIBRARIES variable
Also drop documentation of non-existent CMAKE_STANDARD_LIBRARIES
variable.
2016-05-24 11:40:25 -04:00
Nicolas Despres 8a862a4d4b Ninja: Support embedding of CMake as subninja project
Add a `CMAKE_NINJA_OUTPUT_PATH_PREFIX` variable.  When it is set, CMake
generates a `build.ninja` file suitable for embedding into another ninja
project potentially generated by an alien generator.
2016-05-17 09:34:12 -04:00
Brad King 3e503fe1ac Help: Document `cmake --build` as a separate command mode (#16093)
The `--build` mode was confusingly documented among other options,
falsely implying that it can be used anywhere on the command line.
Move the documentation to a dedicated section and clarify its usage
as s separate command line mode.
2016-05-10 09:45:45 -04:00
Brad King d4faed2f7f Help: Document `cmake --find-package` as a separate command mode 2016-05-10 09:37:55 -04:00
Brad King 96c8a4769f Merge topic 'doc-cmake-E-updates'
960afaad Help: Improve 'cmake -E md5sum' documentation
25ee2c86 Help: Add missing space in cmake(1) manual
2016-05-03 10:17:04 -04:00
Brad King 5f948d2aa4 Help: Add policy summaries to cmake-policies(7)
In Sphinx output formats that print the toctree the policy numbers in
links from the cmake-policies(7) manual are not descriptive.  Convert
the toctree entries to cross-reference syntax and add the summary of
each policy.  For now simply duplicate the policy summary line.  We
already maintain copies in `cmPolicies.h` and `Help/policy/*.rst` docs.
2016-05-02 15:16:07 -04:00
Brad King b74d73e507 Help: Organize cmake-policies(7) manual by version of introduction 2016-05-02 15:16:07 -04:00
Bartosz Kosiorek 960afaad7f Help: Improve 'cmake -E md5sum' documentation 2016-05-02 10:02:12 -04:00
Bartosz Kosiorek 25ee2c86c1 Help: Add missing space in cmake(1) manual 2016-05-02 09:51:29 -04:00
Robert Maynard d028b94872 Features: Specify minimum version Intel C++ 12.1
Versions below 12.1 do not provide enough information to properly detect
if compiling with c++98 or c++0x enabled so remove them from the
supported list.
2016-04-28 09:16:31 -04:00
Brad King de3c7bd799 Merge topic 'AddDocumentationForEclipseVariables'
7b3a1069 Help: Document Eclipse-generator related variables (#15827)
2016-04-18 08:57:32 -04:00
Alex Neundorf 7b3a1069bf Help: Document Eclipse-generator related variables (#15827) 2016-04-18 08:56:19 -04:00
Stafen Teleman 5dc6cfd6ea Solaris: Add a CMAKE_HOST_SOLARIS variable (#16061) 2016-04-15 13:25:45 -04:00
Daniel Pfeifer 5e62444cff Add options to run clang-tidy with the compiler
Create a <LANG>_CLANG_TIDY target property (initialized by a
CMAKE_<LANG>_CLANG_TIDY variable) to specify a clang-tidy command line
to be run along with the compiler.
2016-04-13 09:56:10 -04:00
Brad King fd40b0f875 Merge topic 'ctest-run-submodule-sync'
c18d91ad Help: add release notes for topic 'ctest-run-submodule-sync'
7f560743 cmCTestGIT: run `git submodule sync` before updating submodules
06b310b5 cmCTestGIT: add an option to initialize submodules on update
56c1ea40 cmCTestGIT: fix git version references
2016-04-05 09:38:06 -04:00
Ben Boeckel 06b310b5d5 cmCTestGIT: add an option to initialize submodules on update
Currently, CTest will not initialize any submodules within the already
checked out source tree. Add an option to do so. The use case for not
doing so is that some submodules may not be necessary for the current
test and keeping network usage down may be important.
2016-04-01 15:50:31 -04:00
Felix Geyer 49e82c15d5 Fix spelling typos in comments and documentation (#16037)
The Debian package checker tool (lintian) detected several typos in
CMake.
2016-03-29 14:31:02 -04:00
Brad King 917d49ed93 Merge topic 'cmake-depend-in-project-only'
b06e17da Help: Add notes for topic 'cmake-depend-in-project-only'
52540245 Tests: Add test for CMAKE_DEPENDS_IN_PROJECT_ONLY variable
b1e1aa1e Makefile: Optionally scan only source and build trees for dependencies
2016-03-24 08:49:43 -04:00
Brad King 5b2acf6c1c Merge topic 'vs-startup-project'
ad140c6e VS: Put ALL_BUILD in the PREDEFINED_TARGETS_FOLDER
f069be05 VS: Fix default target support for targets nested inside a folder
c05ea485 VS: Improve unit test macros
78ec0461 VS: Add option to choose the `.sln` startup project (#15578)
2016-03-24 08:49:41 -04:00
Brad King 6201c1a6ce Merge topic 'timeout_after_match'
de7afd29 Help: Add notes for topic 'timeout_after_match'
993e48d0 CTest: Optionally use a secondary test timeout after matching output
2016-03-22 16:09:28 -04:00
Attila Krasznahorkay b1e1aa1e6a Makefile: Optionally scan only source and build trees for dependencies
Add a `CMAKE_DEPENDS_IN_PROJECT_ONLY` variable to activate the behavior.
2016-03-22 16:04:15 -04:00
Zack Galbreath 993e48d045 CTest: Optionally use a secondary test timeout after matching output
Allow a test N seconds to complete after we detect a matching line in
its output.  Activate this behavior with a new TIMEOUT_AFTER_MATCH test
property.
2016-03-22 11:17:55 -04:00
Davy Durham 78ec046130 VS: Add option to choose the `.sln` startup project (#15578)
Add a `VS_STARTUP_PROJECT` directory property to specify the project
that should be placed first in the `.sln` file so that it will be
selected as the default startup project.

Co-Author: Taylor Braun-Jones <taylor.braunjones@avigilon.com>
2016-03-22 07:57:00 -04:00
Andrej Bosik a22f996725 VS: Optionally generate remote directory for WinCE projects
Teach the VS 2008 and 2005 generators to set the `RemoteDirectory`
in `DeploymentTool` and the `RemoteExecutable` in `DebuggerTool`.
Use a `DEPLOYMENT_REMOTE_DIRECTORY` target property to specify the
value.
2016-03-15 14:34:26 -04:00
Brad King b42866a34a Drop Visual Studio 6 generator
This generator has been deprecated since CMake 3.3.  Remove it.
Update documentation, modules, and tests to drop content specific
to this generator.
2016-03-09 09:42:18 -05:00
Brad King 345d5926ee Merge topic 'deprecate-CMakeForceCompiler'
d929c35f CMakeForceCompiler: Deprecate this module and its macros
2016-03-09 08:50:04 -05:00
Brad King d929c35f08 CMakeForceCompiler: Deprecate this module and its macros
We originally deprecated this module in commit v3.5.0-rc1~295^2
(CMakeForceCompiler: Deprecate this module and its macros, 2015-10-19).
Then a use case was found to still require the module so the deprecation
was reverted for CMake 3.5 by commit v3.5.0-rc3~4^2 (CMakeForceCompiler:
De-deprecate until more use cases have alternatives, 2016-02-17).  Since
then `CMAKE_TRY_COMPILE_TARGET_TYPE` was introduced to provide an
alternative solution for that use case.  Deprecate the module again.
2016-03-08 10:42:28 -05:00
Philippe Proulx a4194debea Add FindLTTngUST module to find LTTng-UST library
Also detect the library version number.  Provide results as variables
and as an imported target, LTTng::UST.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
2016-03-07 11:46:49 -05:00
Fabian Otto 6122909c33 VS: Add option to set `ConfigurationType` of a .vcxproj file
Add a VS_CONFIGURATION_TYPE target property to set this value
explicitly.  This is useful to build a Windows Kernel Mode Driver,
for example.
2016-02-26 10:52:13 -05:00
Brad King 79d4b5bec9 Merge topic 'try_compile-target-type'
7f1bd9fe try_compile: Add option to control type of target
2016-02-26 10:31:28 -05:00
Brad King 12f065521c Merge topic 'doc-typos'
33507e2a Help: Fix typos in cmake-packages.7 manual
2016-02-24 11:10:36 -05:00