Add an OPENSSL_USE_STATIC_LIBS option to enable it. Adjust
CMAKE_FIND_LIBRARY_SUFFIXES to only look for .a and .lib files. Also
adjust the search paths on Windows for installer locations of static
libraries.
Provide each variant in ZLIB_LIBRARIES and ZLIB::ZLIB imported location
properties when one is found, while maintaining support for manually
setting the library via ZLIB_LIBRARY.
When the Fortran_HL component is specified, the hdf5_hl library is not included
in HDF5_LIBRARIES which causes a bunch of undefined references at link
time. This commit adds hdf5_hl to the list of libraries to search for when the
Fortran_HL component is specified.
Define HDF5_{Fortran_,}HL_COMPILE_LINE so that HDF5_{Fortran_,}HL_INCLUDE_DIR
and HDF5_{Fortran_,}HL_LIBRARIES are found when the macro is invoked for HL and
Fortran_HL components. (Use patch from debian cmake-data package.)
Starting with Xcode 7 the OSX and iOS SDKs contain only stub
files for dynamic system libraries. These stub files contain
some meta data and a list of exported sysbols in plain text.
They are handled by the toolchain like regular dylibs.
The handling of multilevel dependencies has been fixed in Visual Studio 2013.
The work around used for VS 2010 and VS 2012 does not work for VS 2013 any more.
Switch to normal object build rules for VS 2013 and newer.
Exposed by a CMP0054 warning with code like:
cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
project(MyProj NONE)
enable_language(C)
enable_language(CXX)
While at it, use STREQUAL for testing the compiler id against "GNU".
Suggested-by: Rolf Eike Beer <eike@sf-mail.de>
If CMAKE_MINIMUM_REQUIRED_VERSION is not set because no
cmake_minimum_required() call is present this line can lead to an error as that
string is empty so too few arguments are passed to if():
See also "/var/tmp/paludis/build/kde-krdc-15.08.0/work/build/CMakeFiles/CMakeOutput.log".
See also "/var/tmp/paludis/build/kde-krdc-15.08.0/work/build/CMakeFiles/CMakeError.log".
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:112 (elseif):
given arguments:
"VERSION_LESS" "3.1"
Unknown arguments specified
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:501 (_pkgconfig_parse_options)
/usr/share/cmake/Modules/FindOpenSSL.cmake:43 (pkg_check_modules)
This version is generated by the Windows Visual Studio
project files for unknown reasons, but is required to
pick up the debug version of the library created by
current versions of Xerces-C.
Since commit v2.8.7~31^2 (HP: Drive shared library linking with compiler
front end, 2011-12-12) the C compiler is used to link shared libraries
instead of calling the linker directly, so linker options need to be
wrapped as -Wl,-foo instead of -foo.
The compiler version reported since commit v2.8.2~1018 (CTest-side
support for compiler name and compiler version, 2009-10-12) only
reported the version of the compiler used to build CMake, and only
if it defined "_COMPILER_VERSION". Instead use the version of
the compiler used to build the project CTest is testing.
By default Mercurial command "clone" will implicitly call "update" with
the "default" branch after downloading the cloned repository. However
ExternalProject_Add() always generates a second "update" command after
cloning with a tag which is either specified or "tip" (equivalent to
"default" by default). Therefore ExternalProject will first clone then
update to default branch then update to another specified branch if
provided. This leads to potentially very long clone operation (in
particular when the repository default branch contain subrepos) which
can lead to transaction abort triggered by the server.
Simply use "hg clone -U" to avoid the implicit update during clone.
Our following call to "hg update" will take care of updating anyway.
Protobuf 2.6.x and lower do not use CMake (cmake is usable in Protobuf
3.x) but provide legacy Visual Studio projects files. Search their
output directories in 64-bit builds.
The Fortran compiler version detection infrastructure added by commit
v3.3.0-rc1~436^2~9 (Fortran: Add infrastructure to detect compiler
version, 2015-02-17) forgot to update CMakeFortranCompiler.cmake.in to
save the compiler version persistently as we do already in
"CMake{C,CXX}Compiler.cmake.in". Add the missing line now.
As dumpbin.exe is no longer reliable for gcc libraries on MinGW because
it crashes on many common libraries like libgcc_s and libgfortran it is
now necessary too resort to using objdump for DLL dependency walking.
Using objdump has a secondary problem in that it generates a lot of
output for large libraries and causes fixup_bundle() to take many
minutes to process what took fractions of a second with
"dumpbin.exe /dependents".
Add a 'grep' pre-filter in the execute_process() command pipeline to
reduce this output to a minimum for a several orders of magnitude speed
up. If grep is not available just use the full output.
As there does not seem to be a reliable way of detecting MinGW, callers
of fixup_bundle() may have to set the variable gp_tool to "objdump" if
dumpbin.exe is installed on the build machine to stop it using the
broken MS dumpbin.exe for library dependency walking.
Since commit v2.8.5~121^2~2 (FindMPI: Handle multiple languages,
2010-12-29) we called the GetPrerequisites is_file_executable function
but passed the name of a CMake variable instead of its value. Therefore
the function has always failed and caused the search for the compiler
name to run even with an absolute path. Switch to using if(IS_ABSOLUTE)
instead and drop use of GetPrerequisites.
Since commit v2.4.0~4325 (...use gcc -shared, even for C++ libraries,
2003-03-13) we use the C compiler "gcc" to link C++ shared libraries
compiled with "g++". At the time "g++" did not know how to link shared
libraries correctly. This has long since been fixed so simply drop the
special case.
Since commit v3.1.0-rc1~564^2 (OS X: Use -iframework for system
framework directories, 2014-05-05) we test the version of Clang to see
if it supports -iframework. Fix the version test used for AppleClang
since it uses a different version scheme than upstream Clang.
Run our check for the '_' prefix using a bzip2 API function as declared
with a prototype in the real header file. This is needed in case the
function is provided in a DLL import library where the symbol name may
not match without proper markup from the header.
If someone in KDE wants to port away from OLD policies, they might want to do
so one policy at a time. This patch will allow them to use
find_package(KDE4 NO_POLICY_SCOPE)
in callers to get around the CMP0011 warning, while still getting the policy
settings contained within.
The module is not needed anymore for try_compile or try_run. It cannot
be used with CMP0022 NEW behavior due to generator expressions in
INTERFACE_LINK_LIBRARIES, so document it as deprecated. Whatever
problems other than try_compile and try_run anyone tried to solve with
this module will have to be addressed another way.
3e6b2ab6 CPack/DEB: component version of PACKAGE_CONTROL_EXTRA
506f6bc0 CPack/DEB: Remove duplicate string(TOUPPER) calls
32e9276a Tests/RunCMake/CPack/DEB: add verifyDebControl
47d1f118 Tests/RunCMake/CPack: found files should be preserved
Add a TARGET_MESSAGES property to control whether Makefile targets print
the "Built target " completion messages. Default to ON to preserve
existing behavior.
Teach the Makefile and Ninja generators to substitute for an <INCLUDES>
placeholder instead of putting -I in <FLAGS>. Update our values for
CMAKE_<LANG>_COMPILE_OBJECT,
CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and
CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE
to place <INCLUDES> just before <FLAGS>.
Update our values for
CMAKE_<LANG>_COMPILE_OBJECT,
CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and
CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE
to place <DEFINES> before <FLAGS> consistently across supported
compilers. We already do this for most compilers, so update the rest
for consistency.
Extend the workaround added by commit v3.2.0-rc1~278^2 (FindMPI:
Workaround Intel MPI 5.0.1 exit code problem, 2014-12-04) with an
additional/alternate keyword to recognize the case with recent GCCs.
The Apple Clang 6.1 compiler that comes with Xcode 6.3 is aware of the
modern -std=c++14 and -std=gnu++14 flags, so use them instead of the
"1y" flags.
Suggested-by: darkapostle@rule506.net