To be able to include InstallRequiredSystemLibraries more than once
(e.g. to get the Debug and Release libraries separately), clear the
internal library list for non-matching configuration.
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.
ddec418a Features: Add compiler version support to WriteCompilerDetectionHeader.
b7029576 Project: Add configurable name for version computation macros.
78acaafe Project: Separate simulated compiler id from version detection.
567af1a5 WCDH: Issue a better message for version compatibility.
Create a Platform/Android module that includes Platform/Linux since
Android is based on Linux. Provide only the minimal settings needed to
get builds with Android NDK toolchains to work.
Disable use of RPATH since the Android loader ignores it and we cannot
predict the install destination anyway.
Android supports soname but shared library names must end in ".so" and
we cannot represent the versioned names with associated symlinks on all
host operating systems anyway. However, we do want the SONAME of
library files to be set so that linking to them by path to the library
file produces NEEDED entries with the soname and not the path. Add a
new CMAKE_PLATFORM_NO_VERSIONED_SONAME setting to tell the
cmTarget::GetLibraryNames method that not to use the VERSION or
SOVERSION target properties in the soname.
We already match lowercase 'rc'. Add 'RC' too. The latter is listed in
other CMake<LANG>Compiler modules as ignored for their languages already.
Signed-off-by: Tim Blechmann <tim@klingt.org>
The FindQt4 module is a CMake Domain object of type "module".
Our convention for domain object document titles is "------"
and domain object document sections is "^^^^^^". Switch to
these within the FindQt4 documentation.
58f7baab FindFreetype: Indent with 2 spaces instead of 4
444f8801 FindFreetype: Use lower-case name in call to FPHSA
836a28d5 FindFreetype: Move PATH_SUFFIXES argument for more consistency
4ad6dace FindFreetype: Add newlines to reduce code width
While at it, do not cache the value since it should always be
computed directly from DOXYGEN_DOT_EXECUTABLE.
Inspired-by: Lars Bilke <larsbilke83@googlemail.com>
As of Graphviz 2.31, their installer provides no PATH or registry
modifications. Glob possible install paths instead.
Inspired-by: Lars Bilke <larsbilke83@googlemail.com>
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.
Add to the Platform/Windows-GNU module list of VS registry entries those
for VS 2013. Also add the name "vcvars64.bat" used by VS 10 and above
for 64-bit tools.
After finding qmake we search in QT_BINARY_DIR for the other Qt tools.
Try all versioned executable names before trying the plain executable name.
This makes it much more likely that if 2 different major versions are installed
in the same prefix CMake will be able to detect a proper set of tools.
Update cmake_minimum_required calls in CMakeLists.txt in Modules and in
CMakeLists.txt generated by other modules, so that they are always in
sync with current CMake version.
Some modules change CMake minimum required version when they are
included. For example:
cmake_minimum_required(VERSION 2.8.12)
message("${CMAKE_MINIMUM_REQUIRED_VERSION}")
include(CheckTypeSize)
message("${CMAKE_MINIMUM_REQUIRED_VERSION}")
will produce the following output:
2.8.12
2.6
This patch ensures that when you include a CMake module the minimum
required version and the policies set are left unchanged.
Fixes Issue #14864
Previously when linking the intermediate link file for separable compilation
the CUDA_NVCC_FLAGS* were not used. This caused tremendous confusion when
using this feature, and I consider it to be a bug. This change should fix
this.
Clang discards the entire string if it is not used, removing
the ability to read the features from the compiled binary. That
is prevented by using the symbol.
GNU with -O3 also discards the string, so use the string in a
way which is determined by a runtime value (argc) to prevent
it being discarded.
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.
Remove the use of check_cxx_source_compiles which is now just getting in
the way.
Blacklist the cxx_alignof feature in the test with GNU 4.7. The test
file compiles, but it is documented as available first in GNU 4.8.
205215fb cmTarget: Add CXX_STANDARD_REQUIRED to control decay.
1df2116b Features: Decay language flag if requested is not available.
c4f4dac2 Project: Fix exit-on-error with compile feature tests.
5bb7ce72 Project: Use nullary form of main for compile feature tests.
64254e7a Project: Remove extern from static string in feature tests.
0d9c99bf Help: Fix order of help entries.
dc7639bd Tests: Fix name of cache variable.
3b59f8b7 Project: Refactor C compiler determination into multiple files.
8896501b CompilerId: Allow specifying a prefix for preprocessor defines.
23f451bb CompilerId: Guard the platform-default compiler code with a parameter.
30a99f5c CompilerId: Add option to generate compiler-id-specific defines.
36ed5894 CompilerId: Allow specifying the compiler-specific components to generate.
9a083bce Project: Split the compiler id detection into a separate function.
9d285600 Project: Generate the CXX compiler Id test from multiple files.
Just like -I flag has its -isystem counterpart which marks an include
directory as a system directory and prevents unwanted warnings, on Apple
systems there is -iframework -- a system directory replacement for -F.
Use this flag to implement include_directories(SYSTEM) for frameworks.
This will allow sharing of the logic of the order to test compilers in
and the preprocessor macros used to do that and to determine the
version components.
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.
When ncurses is built with USE=tinfo we need to find "tinfo" as a
dependency of the main library. Otherwise 'cbreak' is missing:
ld: ...: undefined reference to symbol 'cbreak'
ld: note: 'cbreak' is defined in DSO /lib/libtinfo.so.5 so try adding
it to the linker command line
See https://bugs.gentoo.org/show_bug.cgi?id=468622 for more information.
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
Take our CURSES_USE_NCURSES code path when CURSES_NEED_NCURSES is
enabled even if CURSES_CURSES_LIBRARY also happens to be found.
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
For example if one installs Xcode 4.6 on OS X 10.9, it doesn't contain
a 10.9 SDK, so fallback to the next newest version which, in this case,
happens to be a 10.8 SDK.
This fixes bug #14572.
The MBCS (Multi-Byte Character Set) has been deprecated with VS 2013,
and MSVC no longer ships with an MBCS-version of MFC by default.
However, it can be downloaded as an add-on.
Teach InstallRequiredSystemLibraries to install the MBCS MFC only
for VS < 12 or if it happens to exist on the system.
In commit v3.0.0-rc1~103^2~3 (ExternalProject: Reattempt download when
verification fails, 2014-01-15) a reference to ${CMAKE_COMMAND} was
added to generate a reference to the CMake command in a cmake script.
Escape the '$' so that the literal variable reference appears in the
script instead of writing the path to the current cmake. This is
necessary when the path to CMake contains spaces or other characters
special to CMake syntax.
bbc358c3 Merge branch 'master' into osx-init-early
0cce556b Xcode: Use sysroot and deployment target to identify compiler
0200d0a9 OS X: Factor a Darwin-Initialize module out of Platform/Darwin
416761e3 Add platform-specific initialization step when enabling languages
Use CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET to set the Xcode
SDKROOT and MACOSX_DEPLOYMENT_TARGET build settings. This is necessary
because some versions of Xcode select a different compiler based on
these settings. We need to make sure the compiler identified during
language initialization matches what will be used for the actual build.
Initialize variables CMAKE_OSX_SYSROOT, CMAKE_OSX_DEPLOYMENT_TARGET, and
CMAKE_OSX_ARCHITECTURES prior to enabling any languages. This will
allow compiler identification to consider these values.
Create a Modules/CMakeSystemSpecificInitialize.cmake module loaded after
CMakeSystem.cmake but before per-language initialization. Use it to
load an optional Platform/<os>-Initialize.cmake module. This will be
useful to do per-platform initialization that does not depend on the
language and use the results when enabling specific languages.
Old versions of aCC need a special compiler flag to get full C++98 template
support as e.g. CMake itself or the Complex and ComplexOneConfig tests need.
The same versions need a special flag to get a proper C++ library, too.
When the primary source tree path named by a DATA{} reference does not
exist, produce an AUTHOR_WARNING instead of a FATAL_ERROR. This is
useful when writing a new DATA{} reference to a test reference output
that has not been created yet. This way the developer can run the test,
manually verify the output, and then copy it into place to provide the
reference and eliminate the warning.
If the named source tree path is expected to be a file but exists as a
directory, we still need to produce a FATAL_ERROR.
Generalize the change from commit 39d0ade0 (Windows-GNU: Support
duplicate object names in large archives, 2014-04-14) to the default
archive rules. These rules have used an incremental append approach
since commit v2.8.0~1856 (Build large archives incrementally,
2008-08-04). Switch from "ar r" to "ar q" to be sure we always append
objects instead of replacing them.
Extend CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES with these paths. We
already have the equivalents under /usr. Systems that have these
directories have their dynamic loaders configured already. Do not allow
them to appear in the RPATH explicitly.
f21ac16e Replace MATCHES test on numbers with EQUAL test
7eacbaed Replace MATCHES ".+" tests with NOT STREQUAL ""
3a71d34c Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient
b0b4b460 Remove .* expressions from beginning and end of MATCHES regexs
5bd48ac5 Replace string(REGEX REPLACE) with string(REPLACE) where possible
2622bc3f Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
97f2b7f5 Ninja: set correct LANGUAGE_COMPILE_FLAGS when linking
49fcffc6 Ninja: cmake formatting, make code more readable
b735c8cb MinGW: link like on Unix and use compile flags when linking
Since commit v2.6.0~388 (Added build rule variables
CMAKE_<LANG>_ARCHIVE_..., 2008-01-29) we use separate "ar cr ..." and
"ar r ..." steps to incrementally add a large list of object files to an
archive. Since the "r" command replaces existing objects of the same
name in an archive, if multiple objects have the same file name and
appear in separate append steps then one overwrites the other. Instead,
use "ar cq ..." and "ar q ..." to always append to the archive.
We already remove the archive before creating it so this will not cause
objects to be appended to existing archives on incremental rebuilds.
The matches have already been calculated and can simply be taken from
CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very
similar regular expressions.
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.
Update the logic added by commit 2f9ad7c6 (Fix FindMPI for the intel
compiler on linux, 2012-03-20) to use the implicit link directories for
the current ${lang} instead of hard-coding C or CXX which may not be
enabled. This is necessary for Fortran-only projects.
f0de3f80 CMakeDetermineVSServicePack: Add VS 11 update 4
105658df CMakeDetermineVSServicePack: Match versions more robustly
101515b9 CMakeDetermineVSServicePack: Format documentation
7147ed5c CMakeRCInformation: Recognize 'windres' tools with '.' in name (#14865)
db924e00 CMakeRCInformation: Do not mention 'Fortran' in documentation
A 64-bit MinGW windres is named "i686-w64-mingw32.shared-windres". The
get_filename_component NAME_WE mode may strip the ".shared-windres" part
and cause the result to no longer contain "windres". Instead, match the
"windres" name in the full CMAKE_RC_COMPILER value first, and use the
get_filename_component code path only for other resource compilers.
Use the CMAKE_MATCH_* variables to simplify matching logic. Match
either 3 or 4 version components. Do not fail when there are only three
components available.
Expect cxx_variadic_templates to implement N2555.
N2555 is essentially a bugfix and predates most compiler releases which
aimed to experimentally support variadic templates.
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.
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.
QT4_CREATE_MOC_COMMAND is given a moc_flags argument that contains the
COMPILE_DEFINITIONS and a potentially large list of include directories.
Since it is a macro, the ${moc_flags} reference is replaced with this
content and sent through cmMakefile::ExpandVariablesInString (EVIS).
Since commit v3.0.0-rc1~138^2 (Qt4: Use generator expression in
COMPILE_DEFINITIONS, 2014-01-13) the COMPILE_DEFINITIONS value contains
a '$' so the EVIS fast-path is no longer used. Instead the full
cmCommandArgumentParserHelper is now used on the large input, which is
very slow (since it was originally created for hand-written code).
Change QT4_CREATE_MOC_COMMAND to a function instead of a macro to avoid
passing large content through EVIS. This makes it significantly faster.
* Remove Watcom linker caseexact options already defined in system
definition.
* Use win_dll system for SHARED_LIBRARY and SHARED_MODULE.
* Use explicit target definition -bt=.. option for proper initialization
of compiler Windows environment (predefined macros)
* Reorganize compiler options to global options and configuration
specific options
* Use option to optimize out stack checking code for release version
When adding a new external project, the "all" target will depend on
this.
This option allows one to add an external project will not be executed
when the "all" target is executed.
The reason for this is that an external project could be useful, for
example, only for running tests, and therefore not necessary during
the build.
When adding a new step using ExternalProject_Add_Step, the main target
will depend on this step.
This option allows one to add a step that will not be executed when the
main target for the external project is executed.
ExternalProject handles git remote branches by commit hash. Due to
this, the git repository ends in detached states, and local commits
are discarded.
Use "git rebase" for remote branches instead of "git checkout". If
there are uncommitted changes, use "git stash save/pop" to save changes
and restore them after the rebase. If any of these operations fails,
try to restore the original status and exit with a fatal error, asking
the user to resolve the conflicts manually.
This also makes the behaviour of ExternalProject using git more similar
to the svn version, and probably more likely to what the user expects
by setting GIT_TAG to a branch.
Previously the GTEST_ADD_TESTS function would miss parameterized tests
because it only considered TEST and TEST_F. Add TEST_P to the list of
considered tests and will run all instantiations of this parameterized
test together.
This is perhaps not as correct as searching for all instantiations of
this parameterized test and separating those into separate runs, but
this will at least run tests that were previously missing.
For reference: https://code.google.com/p/googletest/wiki/Documentation
Fixes issues #14812 and #14813 where find_package(OpenMP QUIET) and
find_package(Qt4 QUIET) would still print out messages when calling
check*() functions.
Also a partial fix for #14445 where building CMake
(without cmake-gui) when Qt5 is installed and Qt4 is not installed
and warnings come out of FindQt4.cmake.
Drop the CMAKE_NO_QUOTED_OBJECTS internal variable from the Makefile
generators. The underlying problem is with the Watcom linker, not with
WMake. The Watcom linker wants object files to be single-quoted. Add
<LINK-RULE>_USE_WATCOM_QUOTE platform information variables to tell the
generators to use Watcom-style single quotes for object files on link
lines.
On Windows, Watcom uses the GetCommandLine API to get the original
command-line string and do custom parsing that expects single quotes.
On POSIX systems, Watcom approximates the original command line by
joining all argv[] entries separated by a single space. Therefore we
need to double-quote the single-quoted arguments so that the shell does
not consume them and they are available for the parser to see.
693f8bf3 FindThreads: simplify checking for SunOS
858ce31f FindThreads: avoid useless checks if a thread library is already found
fdf7bd27 FindThreads: replace MATCHES with STREQUAL
Since commit v2.8.12~327^2 (Qt4Macros: Allow specifying a TARGET
in invokations of macros., 2013-02-26), a parameters file is
populated with moc arguments at generate-time.
When the compile definitions or include directories change, the
parameters file is updated but moc is not re-run in response.
Fix that by making the moc invocation depend on the parameters file.
Reported-At: https://bugreports.qt-project.org/browse/QTBUG-36970
Objective C sources should be compiled with the C compiler, not C++.
The Xcode generator correctly classifies ".m" sources already. The
cmSystemTools::GetFileFormat method was fixed by commit v2.8.0~1782 (fix
for 7045, use gcc for .m, 2008-08-19) but it is not used by any of the
generator since commit v2.4.0~2819 (major changes to support addition of
languages, 2004-09-22).
Fix the CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS table entries so that
cmGlobalGenerator::GetLanguageFromExtension tells the Makefile, Ninja,
and VS IDE generators to compile ".m" sources as C. This makes behavior
consistent on all generators.
Signed-off-by: Tim Blechmann <tim@klingt.org>
64c2342a Watcom: Enable 'WMake Makefiles' generator on Linux
5d9aa66c Watcom: Introduce OpenWatcom compiler id and fix compiler version
9292d3b8 Watcom: Detect compiler target architecture and platform
fbc883c9 Watcom: Add one blank line to Makefile for better readability
Distinguish "Open Watcom" from old "Watcom" by introducing a new
"OpenWatcom" compiler id. The __WATCOMC__ format is "VVRP" for Watcom
and "VVRP + 1100" for Open Watcom.
Use CMAKE_PREFIX_PATH, CMAKE_FRAMEWORK_PATH, and CMAKE_APPBUNDLE_PATH
cache and environment variables to extend PKG_CONFIG_PATH before calling
pkg-config.
In each of the path in these variables it searches for lib/pkgconfig.
Then, depending on the system, it searches for
lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig (debian) or for
lib64/pkgconfig (other 64 bit unixes). If any of these path is found,
it is appended to the PKG_CONFIG_PATH enviromnent variable.
Add two new arguments to the pkg_check_module and pkg_search_module
macro, NO_CMAKE_PATH and NO_CMAKE_ENVIRONMENT_PATH. The new signature
are therefore:
pkg_check_modules(<PREFIX> [REQUIRED] [QUIET]
[NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH]
<MODULE> [<MODULE>]*)
pkg_search_module(<PREFIX> [REQUIRED] [QUIET]
[NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH]
<MODULE> [<MODULE>]*)
By default, if CMAKE_MINIMUM_REQUIRED_VERSION is 3.1 or later (in
order to keep compatibility with the previous behavior), or if
PKG_CONFIG_USE_CMAKE_PREFIX_PATH is set, the CMAKE_PREFIX_PATH,
CMAKE_FRAMEWORK_PATH, and CMAKE_APPBUNDLE_PATH cache and environment
variables will be added to pkgconfig search path.
The NO_CMAKE_PATH and NO_CMAKE_ENVIRONMENT_PATH arguments disable this
behavior for the cache variables and the environment variables,
respectively, similarly to the find_package() command.
This example now works without need to enable C language:
cmake_minimum_required(VERSION x.x.x)
project(foo CXX)
include(CheckTypeSize)
check_type_size("short" SIZEOF_SHORT LANGUAGE CXX)
Fixes#14056
Add a CPACK_DEBIAN_COMPRESSION_TYPE option to set the compression type.
Default to 'gzip' to preserve existing behavior. Use "cmake -E tar"
for 'gzip', 'bzip2', and 'none'. Use system "tar" for 'lzma' and 'xz'.
If
find_package(PythonLibs)
find_package(PythonInterp)
is called, help PythonInterp to get a version of PYTHON_EXECUTABLE
consistent with the library versions found by PythonLibs.
According to the Intel release notes:
http://software.intel.com/sites/default/files/l-compiler-release-update.pdf
the __INTEL_COMPILER_UPDATE predefined macro was introduced to hold the
third version component.
Reported-by: Dirk Ribbrock <dirk.ribbrock@mathematik.uni-dortmund.de>
Co-Author: Rolf Eike Beer <kde@opensource.sf-tec.de>
Test the first argument directly for matching 'EXACT'. The error
check in its previous position was incorrect and would only trigger
with a version of '0' or similar.
During cross-compiling the toolchain file may use CMakeForceCompiler to
force a compiler setting. When using the Xcode generator try to convert
it to a full path by searching the PATH as is done for the Makefile
generators.
Add the 'SDL' path suffix to the FindSDL_*.cmake modules. Add a comment
explaining the purpose of suffixes as in commit v3.0.0-rc1~540^2
(FindSDL: Add path suffixes for <prefix>/include/..., 2013-10-08).
Inspired-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Commit v3.0.0-rc1~71^2~9 (Qt4: Use IMPORTED executable names with
custom commands., 2014-01-24) erroneusly changed this command to
use the wrong target.
b633b263 CPackWiX: Fix test to build with expected config
191f25e2 stringapi: Prevent a NULL dereference in WiX
219d6ad6 speedup: Avoid excess iterator dereferences
caaad357 speedup: Cache strings for comparisons
7abf4e31 stringapi: Use strings for dependency information
94fc63e2 stringapi: Use strings for cache iterator values
85fc9f26 stringapi: Command names
6557382d stringapi: Use strings for program paths
1a1b737c stringapi: Use strings for generator names
24b5e93d stringapi: Use strings for directories
11ed3e2c stringapi: Add string overload for the Def struct
b3bf31a5 stringapi: Miscellaneous char* parameters
5af95c39 typo: Match argument name with the header
2b17626e stringapi: Pass strings as install directories in CPack
3def29da stringapi: Use strings for feature arguments
acb116e3 stringapi: Return a string reference for the configuration
...
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
If a package is requested with an EXACT version, that doesn't imply
that dependencies must be found EXACTly too.
Extend the macro to allow specifying that a dependency must be found
by EXACT version instead.
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>
The parent commit taught FindPythonLibs to try to find PythonInterp
unconditionally. Some projects may want the libraries of a specific
version even when the corresponding interpreter is not available. Drop
the internal use of FindPythonInterp and just use the versions from it
if it happens to have been found by the project first. That will allow
projects to get a consistent version when they want both but not
otherwise force them to find the interpreter.
In InstallRequiredSystemLibraries the version number for RTDLL can be
calculated from the compiler version. This will support current and
future OW versions without updating the module again.
For example it is now possible to do:
feature_summary(WHAT ENABLED_FEATURES
DISABLED_FEATURES)
That produces an output like:
--
-- The following features have been enabled:
* Feature1
* Feature2
-- The following features have been disabled:
* Feature2
Skipping the lists that are empty.
Without this patch this would require to do:
message(STATUS "")
feature_summary(WHAT ENABLED_FEATURES
DESCRIPTION "The following features have been enabled:")
feature_summary(WHAT DISABLED_FEATURES
DESCRIPTION "The following features have been disabled:")
And empty lists would not be skipped.
The behaviour when WHAT has a single argument (ALL or any option) is
unchanged.
When possible, get consistent version of the Python interpreter, headers path,
and library.
Now find_package(PythonLibs) internally calls find_package(PythonInterp
QUIET) and uses the resulting PYTHON_VERSION_MAJOR and
PYTHON_VERSION_MINOR to prefer these versions when looking for the
header path and library. The Python_ADDITIONAL_VERSIONS variable has
priority over the interpreter version.
Co-Author: Adam Wolf
Co-Author: Gert Wollny <gw.fossdev@gmail.com>
Create each DLL import library by passing "option implib=..." to the
linker for its SHARED library. This works even when there are no
symbols to be exported. Leave the option out for MODULE libraries
because we do not need an import library for them. For executables,
retain the separate invocation of wlib because we want an import
library only when the ENABLE_EXPORTS property is set, and in that
case the project should provide symbols.
Suggested-by: J Decker <d3ck0r@gmail.com>
Now it only links with the Qt libraries specified by the user,
instead of automatically including all dependencies.
Fixes#14750 and thanks to Orion Poplawski.
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.
If there is no ARGV1, that is fine; version will be made empty, and no
version will be passed to find_package().
This is relevant when find_dependency is invoked multiple times,
sometimes with a version specified and sometimes without.
find_dependency(dep1 3.4)
find_dependency(dep2) # version still set to 3.4.
Teach ExternalProject_Add a new BUILD_ALWAYS option to skip using
the build step stamp file and execute the step on every build.
Extend the BuildDepends test with a case to cover this option.
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.
Create platform information modules Platform/Darwin-Intel-(C|CXX).cmake
and helper module Platform/Darwin-Intel.cmake. Teach existing module
Platform/Darwin-Intel-Fortran.cmake to use the helper too. Move
information from Platform/Darwin-icc.cmake into these files and drop
information already in Platform/Darwin.cmake to avoid duplication.
Some distributions place boost_mpi next to the MPI libraries against
which it was built instead of next to the other Boost libraries. If
find_package(MPI) has already been run prior to find_package(Boost) then
MPI_CXX_LIBRARIES or MPI_C_LIBRARIES may be set to the location of the
MPI libraries. Teach FindBoost.cmake to look there for boost_mpi and
boost_mpi_python after looking next to the other Boost libraries but
not consider the location to be Boost_LIBRARY_DIR.
In CMakeGraphVizOptions.cmake, allow the options GRAPHVIZ_GENERATE_PER_TARGET
and GRAPHVIZ_GENERATE_DEPENDERS to enable the generation of per target graphs
and subgraphs respectively. Both options are TRUE per default to maintain
current behavior.
In commit v2.8.5~176^2~2 (FindOpenSSL: We should only use hints to find
OpenSSL, 2011-03-28) values for HINTS and PATHS of find_* calls were
computed everywhere but only used on Windows. Use them everywhere.
Set a global property in the find_package implementation. Track and
reset that property in the find_dependency macro. Read the property
in FeatureSummary when determining whether to print output.
This means that packages which are found only as dependencies are not
listed by FeatureSummary, but if a project uses find_package elsewhere
directly, then it will be listed by FeatureSummary.
Suggested-by: Alex Merry
http://thread.gmane.org/gmane.comp.kde.devel.frameworks/10640
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.
dd72b19f Find{Java,JNI}: Use /usr/libexec/java_home on OS X
70560ee1 FindJNI: Overhaul finding JDK libraries and headers on OS X
fcd66a7f Find{Java,JNI}: Consider JAVA_HOME before ENV{JAVA_HOME}
4b3614b2 Find{Java,JNI}: Use ENV{JAVA_HOME} first when set
41d2f2c4 write_basic_package_version_file: use PROJECT_VERSION
7e142c5a project: Manage VERSION variables
16d040c9 project: Add optional LANGUAGES keyword
00007dcc Help: Format project command and variable documentation
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.
If no JAVA_HOME or ENV{JAVA_HOME} is set then try running this
tool to get the system default Java home.
Suggested-by: Larry Shaffer <larrys@dakotacarto.com>
Drop the hard-coded framework paths and "-framework JavaJM" on APPLE.
Save and restore the value of CMAKE_FIND_FRAMEWORK. Use its value to
choose and order between a normal search for jvm&jawt and a framework
search for JavaVM. When JAVA_HOME is set explicitly by the user then
force a normal search by setting CMAKE_FIND_FRAMEWORK to NEVER. Once
the library is found, set CMAKE_FIND_FRAMEWORK to help find_path locate
the matching headers (framework v. normal).
Add a helper module CMakeFindJavaCommon shared between FindJava
and FindJNI to select a JAVA_HOME value. Prefer a CMake variable
or cache entry first, then an environment variable.
Commit 321e348e (QtAutogen: Use Qt 4 IMPORTED targets to find
executable locations., 2014-01-24) attempted to fix this problem,
but only solved it for a particular ordering of find_package for
Qt 4 and Qt 5.
Add a test to ensure that it works with both orderings.
f7ae1d8a QtAutogen: Short-circut some logic when moc is not available.
4b989d5f QtAutogen: Separate source file processing from AUTOMOC.
c48d877d QtAutogen: Make some methods appropriately file-static.
394e86df QtAutogen: Fix autouic target options in the presence of a config.
964d7f2a QtAutogen: Remove unused variables.
0d934efd QtAutogen: Remove read of SKIP_AUTOUIC target property.
321e348e QtAutogen: Use Qt 4 IMPORTED targets to find executable locations.
e96683b0 Qt4: Use IMPORTED executable names with custom commands.
e6182f5d Qt4: Create IMPORTED executable targets for all Qt executables.
Finding Qt 5 can overwrite the QT_MOC_EXECUTABLE variable with the
moc from Qt 5. Use the IMPORTED target with the explicit version in
the name to avoid that.
a432b93b file DOWNLOAD: Display the curl result status when a hash mismatch occurs.
1cb9ef81 file DOWNLOAD: Test non-zero return status.
f73f0fb3 file DOWNLOAD: Add test for bad hash.
b5e2265f ExternalProject: Reattempt download when verification fails.
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.
In commit 2412d9bc (Use 'uname -m' for processor on Cygwin, 2010-09-21)
it was pointed out that POSIX requires 'uname -m' but not 'uname -p':
http://www.opengroup.org/onlinepubs/9699919799/utilities/uname.html
On OS X x86_64, 'uname -p' returns i386 while 'uname -m' returns x86_64.
Since the latter is the POSIX-compliant option trust its value.
However, on OS X ppc, 'uname -m' returns 'Power Macintosh' so add a
special-case to convert that to 'powerpc'.
When downloading an URL with ExternalProject, reattempt the download three
times if the file hash verification fails.
The re-attempt is limited to non-local URL's. The same download CMake script
is re-used after removing any file that resulted from the previous download
attempt. Up to three re-attempts are performed.
When not installing in /usr (i.e. /usr/local) on Debian/Ubuntu, the
multiarch path is not in ldconfig path, and therefore libraries cannot
be found, unless the user manually modifies the files in
/etc/ld.so.conf.d, in order to include /usr/local/lib/<arch>.
This patch fixes this issue by using "lib/<arch>" only if the user is
installing the software in /usr, and uses "lib" in all the other cases.
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.
Commit 5bb53f6b (cmTarget: Deprecate COMPILE_DEFINITIONS_ properties
with a policy., 2013-12-30) deprecated the config-specific
COMPILE_DEFINITIONS_* properties in favour of using generator
expressions.
Set the directory property in UseQt4.cmake to match the
INTERFACE_COMPILE_DEFINITIONS on the Qt4::QtCore and Qt5::Core
IMPORTED targets. Setting QT_NO_DEBUG is sufficient because qglobal.h
sets the corresponding QT_DEBUG definition if required.
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.
There are many style errors in these files. This patch fixes only
the syntactical errors.
The script which ported these to rst tripped on some incorrectly
formatted blocks in the original input documentation. Use a new
script to find problematic code (and then fix them manually):
#!/usr/bin/env python
import os
rootDir = '.'
def checkFile(fname):
f = open(fname)
lines = f.readlines()
started = False
counter = 0
for l in lines:
if "#" in l:
started = True
elif started:
return
lin = l.find("(")
if lin != -1 and l.find(")", lin) == -1 and \
not "(To distribute this file outside of CMake, substitute the full" in l:
for lp in lines[counter+1:]:
if lp == "# ::\n":
print "\n\n######### " + fname + "\n\n"
print ''.join(lines[max(counter-2, 0):counter+6])
break
elif lp == "#\n" :
continue
break
counter += 1
for dirName, subdirList, fileList in os.walk(rootDir):
for fname in fileList:
checkFile(os.path.join(dirName, fname))
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.
Added a new variable CPACK_WIX_PATCH_FILE that users can point at an
XML patch file. Fragments defined within the patch file will be inserted
at supported insertion points (currently Component, File and Directory).
If TortoiseSVN is not installed in the default path, the svn executable
installed by TortoiseSVN is not found.
Using the registry key should always find it.
Xcode 5.1 output no longer puts "./" in the path to the linker output
for the CompilerId test binary. Update our regex to match the path
with or without the component.
In commit ecd84147 (Fortran: Detect pointer size in gfortran on MinGW,
2011-11-29) we started testing for __SIZEOF_POINTER__ but not all GNU
Fortran compilers define this. Check also for __SIZEOF_SIZE_T__ which
at least one version of gfortran defines without also defining
__SIZEOF_POINTER__.
In the code path for launching the VS IDE tools, avoid using
CMAKE_MAKE_PROGRAM. Instead use the variables CMAKE_VS_DEVENV_COMMAND,
CMAKE_VS_MSBUILD_COMMAND, and CMAKE_VS_MSDEV_COMMAND to lookup the
location of the build tool needed. Choose the proper tool based on
availability and necessity for the language (e.g. Intel Fortran must
build with devenv.com and not MSBuild.exe).
Creates a hierarchy of WiX features from CPack components and component groups.
Switch to the FeatureTree UI in case components have been defined.
Handles the component REQUIRE and HIDDEN options
and the component group EXPANDED option.
The previous version added -jN to the make invokation if UNIX
was set, but this was true also when cross compiling.
What we are actually interested in is CMAKE_HOST_UNIX, i.e.
whether the build host is UNIX.
Or we should check more exactly what CMAKE_MAKE_PROGRAM is.
Alex
Add an architecture-specific library directory path suffix for each
component. Use different search path for SDL_sound. Project files in
VisualC directory suggest that a win32lib will hold the libraries.
Reported-by: Paul Hampson <Paul.Hampson@Pobox.com>