Commit Graph

5197 Commits

Author SHA1 Message Date
Rex Dieter 90245fe86e FindImageMagick: Use pkgconfig hints if available (#14012)
Tested-by: bastien ROUCARIES <roucaries.bastien@gmail.com>
2014-07-14 15:05:28 -04:00
Brad King 6c8364e6cb FindCurses: Overhaul Curses and NCurses search logic (#15011)
Produce a more consistent result by finding only a single include
directory and reporting which headers may be included from it.  The
previous search for each header separately might find pieces from
separate and incompatible packages.

While at it, provide the CURSES_INCLUDE_DIRS result variable to be
consistent with other modules.
2014-07-14 11:23:02 -04:00
Brad King c72642f927 Merge topic 'FindCurses-blank-at-eof'
ccf2fca1 FindCurses: Remove blank line at end of file
2014-07-14 09:42:40 -04:00
Brad King 23eb0aaef5 Merge topic 'wince-fix-dll-linking'
7e1283e4 MSVC: Fix linking of DLLs on WinCE (#15013)
2014-07-14 09:37:57 -04:00
Brad King ccf2fca1fa FindCurses: Remove blank line at end of file 2014-07-14 09:14:49 -04:00
Brad King 7e1283e48c MSVC: Fix linking of DLLs on WinCE (#15013)
On WinCE we must link both shared libraries and executables with the
/subsystem:windowsce flag.  Teach Platform/Windows-MSVC to pass it
to the linker in both cases.

Suggested-by: Gunnar Roth <gunnar.roth@gmx.de>
2014-07-10 15:10:32 -04:00
Brad King 49910f1a2c Merge topic 'FindSWIG-swig3.0'
7400695e FindSWIG: Add support for swig 3.0 application
2014-07-09 10:02:43 -04:00
Brad King 77e4f5490e Merge topic 'CMakeExpandImportedTargets-CMP0045'
49f32168 CMakeExpandImportedTargets: Do not read property on non-target (#15008)
2014-07-09 10:02:41 -04:00
Brad King 49f3216854 CMakeExpandImportedTargets: Do not read property on non-target (#15008)
Avoid behavior that is disallowed by CMP0045.  Check whether a target
exists before trying to read its properties.
2014-07-07 10:58:43 -04:00
Sylvain Joubert 7400695ee3 FindSWIG: Add support for swig 3.0 application 2014-07-07 09:18:50 -04:00
Brad King f1626aa101 Merge topic 'dev/export-from-obj-libs'
5ca1d3d5 GenerateExportHeader: support exporting from OBJECT libraries
2014-07-07 08:54:37 -04:00
Brad King c9feebb9e8 Merge topic 'WriteCompilerDetectionHeader-valid-prefix'
b47c125f WCDH: Ensure that the prefix argument to the macro is valid.
2014-07-07 08:54:33 -04:00
Brad King f59ad29a0e Merge topic 'no-cross-install_name_tool'
591a7388 OS X: Only search for install_name_tool if the toolchain has it
2014-07-07 08:54:25 -04:00
Ben Boeckel 5ca1d3d59c GenerateExportHeader: support exporting from OBJECT libraries 2014-07-03 10:23:40 -04:00
Stephen Kelly b47c125ff7 WCDH: Ensure that the prefix argument to the macro is valid.
The prefix must be a C-identifier because it is written as the
prefix of preprocessor macros and possibly structs.
2014-07-02 19:37:04 +02:00
Brad King 164bd68a03 Merge topic 'FindJNI-ppc64le'
18ac6713 FindJNI: search for ppc64 on ppc64le as well
2014-07-02 09:54:46 -04:00
Florent Castelli 591a7388cf OS X: Only search for install_name_tool if the toolchain has it
When cross compiling, toolchains won't have install_name_tool,
which is provided by Xcode and command line tools on OS X.
This is a Mach-O specific utility and not required on all platforms.
2014-07-02 09:42:22 -04:00
Brad King 9750a5581d Merge topic 'cuda_osx_clang'
32bcec5f FindCUDA: Fix OSX Clang & no C language enabled
2014-07-01 09:23:17 -04:00
Brad King 31ec558be1 Merge topic 'FindVTK-drop-4.0-support'
117e7e11 FindVTK: Drop support for finding VTK 4.0
2014-07-01 09:23:15 -04:00
Brad King 117e7e1177 FindVTK: Drop support for finding VTK 4.0
Convert to a simple thin-wrapper around the find_package(VTK NO_MODULE).
This makes the code much simpler and improves error messages.
2014-07-01 08:41:52 -04:00
Dinar Valeev 18ac6713e8 FindJNI: search for ppc64 on ppc64le as well
IcedTea 2.5 have changed libarch for ppc64le to ppc64. Adjust FindJNI
to look for both for backward compatibility.

Signed-off-by: Dinar Valeev <dvaleev@suse.com>
2014-07-01 12:07:37 +02:00
Brad King 1a575a91d2 Merge topic 'FindQt4-ignore-qt5'
567d4d8d FindQt4: Don't further process qmake if it does not belong to Qt4
2014-06-30 14:50:37 -04:00
Brad King 1563668fd0 Merge topic 'vs14-generator'
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
2014-06-30 14:50:34 -04:00
Brad King 4f7f665183 Merge topic 'FindOpenMP-intel-qopenmp'
4671f3ab FindOpenMP: ICC 15 deprecates -openmp, use -qopenmp
2014-06-30 14:50:33 -04:00
Brad King 2e8a5ac31f Merge topic 'FindJPEG-new-windows-name'
115811dc FindJPEG: Add alternative name 'libjpeg'
2014-06-30 14:50:31 -04:00
Adam Strzelecki 32bcec5fab FindCUDA: Fix OSX Clang & no C language enabled
When setting default CUDA_HOST_COMPILER we must dereference CMAKE_C_COMPILER,
i.e. /usr/bin/clang should be used instead /usr/bin/cc which is symlink.
Otherwise CUDA thinks it is GCC and issues -dumpspecs which is unknown option
to Clang.

Also in case neither CMAKE_C_COMPILER is defined (project does not use C
language) nor CUDA_HOST_COMPILER is specified manually we should skip -ccbin
and let nvcc use its own default C compiler.
2014-06-30 11:23:36 -04:00
Nils Gladitz 567d4d8dc6 FindQt4: Don't further process qmake if it does not belong to Qt4
If the only qmake that can be found belongs to Qt5 the find module
would otherwise still further interrogate it and issue diagnostics
which are specific to Qt4.
2014-06-27 16:24:40 +02:00
Brad King 2196cae4ec Merge topic 'UseSWIG-fix-noproxy-check'
e932ac9c UseSWIG: Fix check for noproxy flag (#14990)
2014-06-27 09:42:54 -04:00
Adam Strzelecki 4671f3ab7d FindOpenMP: ICC 15 deprecates -openmp, use -qopenmp
Intel Composer XE 2015 Beta 2 deprecates all options starting with -o
for sake of compatibility with other compilers expecting anything goes
after -o... is output file name.
2014-06-27 09:30:51 -04:00
Sebastian Elsner 115811dcbd FindJPEG: Add alternative name 'libjpeg'
Newer versions of jpeglib build the .lib file on Windows with a
different name by default.  Its now called libjpeg.lib instead of
jpeg.lib.
2014-06-27 09:26:05 -04:00
Brad King b1cbd577c1 FindBoost: Add -vc140 mangling for VS 14
Co-Author: Pawel Stopinski <diokhan@go2.pl>
2014-06-25 14:51:25 -04:00
Brad King 65624c39e3 VS14: Add Visual Studio 14 generator (#14982)
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>
2014-06-25 14:51:19 -04:00
Brad King e932ac9cad UseSWIG: Fix check for noproxy flag (#14990)
The check for this flag added by commit v3.0.0-rc1~284^2 (UseSWIG: Name
python module according to swig flags, 2013-11-26) can get false
positives on flags like "-noproxydel".  Improve the check to match only
"-noproxy".

Suggested-by: Garth Wells <gnw20@cam.ac.uk>
2014-06-25 13:57:24 -04:00
Brad King a51efd1e6d Merge topic 'update-cdash-location'
57ddde52 Update CDash server URL
1bd4e006 Tests: Fix CMAKE_TESTS_CDASH_SERVER parsing
2014-06-25 10:53:05 -04:00
Philipp Moeller 144b255b08 FindGLUT.cmake: Add imported targets and documentation
Also let find_library really search for frameworks on OS X.
2014-06-24 14:08:02 -04:00
Brad King 57ddde524b Update CDash server URL
It is now at open.cdash.org and does not start in "/CDash".
2014-06-24 13:54:52 -04:00
Philipp Möller c90c7fca6e FindX11: fix documentation formatting error
While at it, remove excess indentation.
2014-06-24 08:24:33 -04:00
Philipp Möller 3d82a2234a FindGLEW: Add imported target and documentation 2014-06-23 11:09:29 -04:00
Philipp Möller 5a7ff42100 FindZLIB: Add imported target and documentation 2014-06-23 11:09:25 -04:00
Brad King 0474aa4a78 Merge topic 'FindOpenCL-fix-ENV'
d4295539 FindOpenCL: Added missing ENV for each environment variable reference
2014-06-23 10:27:58 -04:00
Matthäus G. Chajdas d429553976 FindOpenCL: Added missing ENV for each environment variable reference
Also add an 'include' path suffix that may appear after the value of
some of the environment variables.
2014-06-23 10:26:52 -04:00
Bjoern Thiel 15a19c31e5 InstallRequiredSystemLibraries: Allow repeat use per-config
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.
2014-06-16 15:36:25 -04:00
Stephen Kelly f0a0f3dcb4 WCDH: Fix compiler id test for compatibility macros.
Enable the alignment features for Clang.
2014-06-13 18:50:10 +02:00
Stephen Kelly 627ad96bd3 Project: Detect other compilers before detecting Clang.
Commit v2.8.10.1~5^2 (Fix PathScale compiler id for Clang-based
upstream, 2012-11-05) re-ordered the detection logic for PathScale.

Other compiler vendors are also producing Clang-based frontends, so
detect "actual" Clang as one of the last compilers to allow for others
doing the same.

    http://llvm.org/devmtg/2014-04/PDFs/Posters/ClangIntel.pdf
    http://docwiki.embarcadero.com/RADStudio/XE5/en/Clang-based_C%2B%2B_Compilers
2014-06-13 18:50:10 +02:00
Stephen Kelly bc950169c7 WCDH: Remove noise from generated defines.
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.
2014-06-13 18:50:10 +02:00
Brad King 1f00d738bd Merge topic 'doc-WCDH-align-macros'
34f95bcf WCDH: Document the alignof and alignas wrapper macros.
2014-06-12 11:28:47 -04:00
Eric Berge dbc0f63d11 ProcessorCount: Update for HPUX 11iv3 2014-06-10 13:27:58 -04:00
Stephen Kelly 34f95bcfff WCDH: Document the alignof and alignas wrapper macros. 2014-06-10 18:07:32 +02:00
Brad King 487b6ccdcd Merge topic 'WriteCompilerDetectionHeader-compiler-versions'
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.
2014-06-10 09:17:43 -04:00
Brad King 2944bf164e Merge topic 'android-platform'
42f74df6 Add basic Android platform module
2014-06-10 09:17:39 -04:00
Stephen Kelly ddec418a8f Features: Add compiler version support to WriteCompilerDetectionHeader. 2014-06-09 23:42:20 +02:00
Brad King 074ac5dbe9 Merge topic 'WriteCompilerDetectionHeader-deprecated-define'
62863106 WCDH: Add compatibility defines for deprecation.
2014-06-09 10:28:45 -04:00
Brad King d20792f302 Merge topic 'windows-RC-extension'
514c2e3d CMakeRCCompiler: Handle uppercase 'RC' as resource file format extension
2014-06-09 10:28:38 -04:00
Stephen Kelly 62863106f0 WCDH: Add compatibility defines for deprecation. 2014-06-09 10:28:24 -04:00
Brad King 94770baf30 FindOpenGL: Fix typo in documented target name
We provide "OpenGL::GL", not "OpenGL::OpenGL".

Reported-by: Daniel Pfeifer
2014-06-09 08:54:22 -04:00
Brad King 42f74df6d4 Add basic Android platform module
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.
2014-06-06 14:03:42 -04:00
Tim Blechmann 514c2e3d9e CMakeRCCompiler: Handle uppercase 'RC' as resource file format extension
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>
2014-06-06 10:11:15 -04:00
Philipp Möller b7804cb6ce FindOpenGL: Provide imported targets for GL and GLU
Create OpenGL::GL and OpenGL::GLU imported targets using the locations
found.
2014-06-05 14:29:45 -04:00
Philipp Möller 0496c4302e FindOpenGL: Organize and format module documentation 2014-06-05 09:58:40 -04:00
Stephen Kelly b70295760c Project: Add configurable name for version computation macros. 2014-06-05 14:02:52 +02:00
Stephen Kelly 78acaafebe Project: Separate simulated compiler id from version detection. 2014-06-05 14:02:52 +02:00
Stephen Kelly 567af1a596 WCDH: Issue a better message for version compatibility. 2014-06-05 13:58:27 +02:00
Brad King 06ab7db30c FindQt4: Use standard section header underline convention
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.
2014-06-02 14:11:54 -04:00
Brad King 7e011a3db3 Merge topic 'dpkg-shlibdeps-locale'
21ec5f84 CPackDeb: Invoke "dpkg-shlibdeps --version" with C locale
2014-05-29 09:58:45 -04:00
Brad King 0fbec3d3c2 Merge topic 'FindDoxygen-windows-dot'
f49b6a33 FindDoxygen: Deprecate DOXYGEN_DOT_PATH
7980eab8 FindDoxygen: Improve search for Graphviz "dot" on Windows
2014-05-29 09:58:39 -04:00
Brad King 1468e986e1 Merge topic 'cxx14-features'
dd043c3f Features: Add support for C++14 features.
2014-05-29 09:58:37 -04:00
Brad King ca2b012cb9 Merge topic 'FindFreetype-updates'
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
2014-05-28 12:34:35 -04:00
Brad King c8c359bb0f Merge topic 'GNUtoMS-vs-12'
668e571d GNUtoMS: Add support for VS 2013 (#14936)
2014-05-28 12:34:32 -04:00
Nils Gladitz 21ec5f8451 CPackDeb: Invoke "dpkg-shlibdeps --version" with C locale
The version message is localized and may not match when a non-english locale is in use.
2014-05-28 13:17:57 +02:00
Brad King f49b6a33f6 FindDoxygen: Deprecate DOXYGEN_DOT_PATH
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>
2014-05-27 16:40:40 -04:00
Brad King 7980eab8d5 FindDoxygen: Improve search for Graphviz "dot" on Windows
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>
2014-05-27 16:34:18 -04:00
Taylor Holberton 58f7baab14 FindFreetype: Indent with 2 spaces instead of 4
This is more consistent with style elsewhere.
2014-05-27 10:42:10 -04:00
Taylor Holberton 444f880146 FindFreetype: Use lower-case name in call to FPHSA
Use 'find_package_handle_standard_args' because lower-case style is
now preferred.
2014-05-27 10:42:10 -04:00
Taylor Holberton 836a28d537 FindFreetype: Move PATH_SUFFIXES argument for more consistency 2014-05-27 10:42:10 -04:00
Taylor Holberton 4ad6dacede FindFreetype: Add newlines to reduce code width
This also makes argument lists easier to update.
2014-05-27 10:42:10 -04:00
Stephen Kelly ca5d990f02 Help: Add a manual for compiler feature control.
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.
2014-05-27 09:35:00 -04:00
Brad King 668e571d61 GNUtoMS: Add support for VS 2013 (#14936)
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.
2014-05-27 09:24:26 -04:00
Stephen Kelly dd043c3f21 Features: Add support for C++14 features.
Record the features implemented by GNU 4.9 and Clang 3.4.
2014-05-22 18:01:23 +02:00
Brad King 04fc5dd493 Merge topic 'OpenBSD-paths'
bd32b682 OpenBSD: honor the LOCALBASE and X11BASE environment variables
2014-05-22 10:37:46 -04:00
Brad King 99d718c51d Merge topic 'FindQt_versioned_tools'
0645eedb FindQt[34]: Prefer matching versioned tool names
2014-05-22 10:37:45 -04:00
Rolf Eike Beer 0645eedb71 FindQt[34]: Prefer matching versioned tool names
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.
2014-05-22 08:56:05 -04:00
Rolf Eike Beer bd32b682f2 OpenBSD: honor the LOCALBASE and X11BASE environment variables 2014-05-21 20:38:55 +02:00
Brad King 04a0e5ff14 Merge topic 'clang-features'
cda23319 Features: Record for Clang 3.4
2014-05-21 10:31:54 -04:00
Brad King 20a32a4b72 Merge topic 'GNUInstallDirs-OpenBSD'
d4fdd9c1 GNUInstallDirs: use the proper default for info and man paths on OpenBSD
2014-05-21 10:31:52 -04:00
Brad King 7e62353a4c Merge topic 'OpenBSD_no_multilib'
956b7190 OpenBSD: disable FIND_LIBRARY_USE_LIB64_PATHS
2014-05-21 10:31:50 -04:00
Rolf Eike Beer 956b719087 OpenBSD: disable FIND_LIBRARY_USE_LIB64_PATHS
OpenBSD has no multilib paths.
2014-05-20 18:36:34 +02:00
Rolf Eike Beer d4fdd9c189 GNUInstallDirs: use the proper default for info and man paths on OpenBSD 2014-05-20 18:14:10 +02:00
Stephen Kelly 0dffbb93de Features: Ensure that list exists to remove from. 2014-05-20 16:42:54 +02:00
Stephen Kelly cda233194f Features: Record for Clang 3.4
Clang 3.4 supports all features currently known to CMake.
2014-05-20 16:03:48 +02:00
Brad King d01320d4b7 Merge topic 'preserve_cmake_minimum_required_version'
1890c668 Keep cmake_minimum_required calls in sync with current version
81a3f228 Do not change minimum required version in modules
2014-05-20 09:40:16 -04:00
Brad King c1edede31f Merge topic 'compile-features-C-language'
e0890d03 Features: Extend concept to C language.
2014-05-20 09:40:14 -04:00
Daniele E. Domenichelli 1890c668e9 Keep cmake_minimum_required calls in sync with current version
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.
2014-05-19 16:55:12 +02:00
Daniele E. Domenichelli 81a3f22882 Do not change minimum required version in modules
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
2014-05-19 16:55:12 +02:00
Brad King 7019152aa2 Merge topic 'FindCUDA-separable-compilation-flags'
6ad14c71 FindCUDA: Use CUDA_NVCC_FLAGS* for separable compilation
2014-05-19 10:40:24 -04:00
James Bigler 6ad14c71bb FindCUDA: Use CUDA_NVCC_FLAGS* for separable compilation
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.
2014-05-19 09:14:15 -04:00
Stephen Kelly f6f1095413 Features: Use the features symbol in the feature-test compile.
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.
2014-05-15 19:38:25 +02:00
Stephen Kelly e0890d03a4 Features: Extend concept to C language.
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.
2014-05-15 00:15:18 +02:00
Stephen Kelly 5c04dfe465 Features: Only require AppleClang policy to be NEW on APPLE. 2014-05-14 23:55:34 +02:00
Brad King 2e347eb183 Merge topic 'WriteCompilerDetectionHeader-module'
62a4a67d Add the WriteCompilerDetectionHeader module.
2014-05-14 13:58:30 -04:00
Stephen Kelly 62a4a67dc5 Add the WriteCompilerDetectionHeader module.
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.
2014-05-14 13:57:30 -04:00