Commit Graph

6682 Commits

Author SHA1 Message Date
Eon Jeong ad2497aa05 FindBISON: Change usage of [VERBOSE <file>] to [VERBOSE [<file>]] 2016-07-18 09:06:16 -04:00
Ben Campbell 0a6c227d64 FindGIF: Detect version from GIF 4.1.6 and above
GIF 4.1.6 introduced version macros in the header file.  Use them
to get a full version.

Fixes #16196.
2016-07-15 09:10:59 -04:00
Brad King c8e59d2dfa Merge topic 'toolchain-flag-init'
8a98cf64 Honor CMAKE_*_LINKER_FLAGS[_<CONFIG>]_INIT set in toolchain files
37d15c39 MSVC: Set all CMAKE_*_LINKER_FLAGS_INIT directly
55c884ed Embarcadero: Set all CMAKE_*_LINKER_FLAGS_INIT directly
aec3c79a Strip CMAKE_*_LINKER_FLAGS[_<CONFIG>] initializer whitespace
2016-07-15 09:04:30 -04:00
Brad King 8a98cf6432 Honor CMAKE_*_LINKER_FLAGS[_<CONFIG>]_INIT set in toolchain files
Document these variables.

Change our convention for setting these variables from:

    set(CMAKE_EXE_LINKER_FLAGS_INIT "...")

to

    string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ...")

so that any value previously set by a toolchain file will be used.
2016-07-14 15:47:32 -04:00
Nils Gladitz 58677c327f FindPostgreSQL: Fix initialization of PostgreSQL_LIBRARIES 2016-07-14 18:18:26 +02:00
Brad King 4e427f4949 Merge topic 'FindOpenMP-updates'
73e9f36e FindOpenMP: Detect version (specification date) from compiler
8f1103c0 FindOpenMP: Cleanup all variables unconditionally
ec963f04 FindOpenMP: Improve documentation formatting
2016-07-14 09:24:14 -04:00
Brad King 6f36dce0cf Merge topic 'ExternalData-SecurityFix'
9b588b2b ExternalData: Hide security-sensitive details from output
2016-07-14 09:24:05 -04:00
Brad King 2364819d37 Merge topic 'ExternalProject-alt-urls'
2eec433f ExternalProject: Add support for multiple alternative URLs
2016-07-14 09:23:50 -04:00
Brad King f5c19a9dcc Merge topic 'no-implicit-link-clang-rt'
35322226 CMakeParseImplicitLinkInfo: Exclude libclang_rt libraries
2016-07-14 09:23:35 -04:00
Brad King 37d15c399e MSVC: Set all CMAKE_*_LINKER_FLAGS_INIT directly
Avoid copying CMAKE_EXE_LINKER_FLAGS_INIT to the others.
2016-07-13 15:05:32 -04:00
Brad King 55c884ed3b Embarcadero: Set all CMAKE_*_LINKER_FLAGS_INIT directly
Avoid copying CMAKE_EXE_LINKER_FLAGS_INIT to the others.
2016-07-13 15:01:26 -04:00
Brad King aec3c79acb Strip CMAKE_*_LINKER_FLAGS[_<CONFIG>] initializer whitespace 2016-07-13 14:41:21 -04:00
Sujin Philip 73e9f36ea6 FindOpenMP: Detect version (specification date) from compiler
Port changes from VTK commit fda6a31cb9 (Added Improved FindOpenMP
module, 2015-04-23).  Improve use of try_compile to avoid needing
to pass OpenMP flags as libraries.
2016-07-13 11:49:01 -04:00
Alex Turbov 9b588b2bdf ExternalData: Hide security-sensitive details from output
Do not disclose credentials when printing URIs used to fetch external resources.
2016-07-13 18:41:57 +03:00
Brad King 8f1103c0fd FindOpenMP: Cleanup all variables unconditionally 2016-07-13 11:02:01 -04:00
Brad King ec963f04cb FindOpenMP: Improve documentation formatting
Also drop link to OpenMP compilers because our supported list may
not include all compilers.
2016-07-13 10:56:46 -04:00
Lars Schmertmann 2eec433f98 ExternalProject: Add support for multiple alternative URLs
Now it is possible to pass multiple URLs as a list that will be tried in
and foreach(). So it will try next URL if the previous failed.

Fixes #15749.
2016-07-13 09:44:34 -04:00
Brad King 291e41855c Merge topic 'findicu'
e3bff7b3 Help: Add notes for topic 'findicu'
4a63be15 FindICU: New module
2016-07-13 09:26:55 -04:00
Brad King 7a31a2717b Merge topic 'FindHDF5-fix-misc-issues'
d5e4516e FindHDF5: Cleanup inconsistent use of HDF5_ROOT
4ece8bdd FindHDF5: Properly fail when required components are not found.
87c1cd9c FindHDF5: Fix h5cc arg parsing to work with homebrew on Mac
2016-07-13 09:26:52 -04:00
Brad King 64095e36ee Merge topic 'cpack-rpm-debug-logging-fix'
83799aa9 CPack/RPM: Debug logging should only print if requested for
2016-07-13 09:26:44 -04:00
Brad King 4b726a3f5c Merge topic 'fix-cpack-rpm-different-package-names'
672e6d2e CPack/RPM: Add missed CPACK_RPM_FILE_NAME fallback variable
2016-07-13 09:26:40 -04:00
Harry Mallon 83799aa934 CPack/RPM: Debug logging should only print if requested for 2016-07-13 09:23:24 -04:00
Roger Leigh 4a63be15dd FindICU: New module 2016-07-13 09:15:16 -04:00
Brad King 9c9ac043b4 Merge branch 'FindHDF5-fix-misc-issues' into release 2016-07-13 08:57:16 -04:00
Chuck Atkins d5e4516ec2 FindHDF5: Cleanup inconsistent use of HDF5_ROOT 2016-07-12 15:32:10 -04:00
Chuck Atkins 4ece8bdd0f FindHDF5: Properly fail when required components are not found. 2016-07-12 13:40:41 -04:00
Chuck Atkins 87c1cd9c51 FindHDF5: Fix h5cc arg parsing to work with homebrew on Mac 2016-07-12 11:08:11 -04:00
Brad King 353222262a CMakeParseImplicitLinkInfo: Exclude libclang_rt libraries
These libraries are used for Clang runtime analysis support with
flags like `-fsanitize=memory` and are not actually implicitly
linked libraries.

Fixes #16194.
2016-07-11 16:30:02 -04:00
Alex Turbov 672e6d2e20 CPack/RPM: Add missed CPACK_RPM_FILE_NAME fallback variable
In commit v3.6.0-rc1~66^2 (CPack/RPM different package names,
2016-05-15) we forgot the non-uppercased fallback variable name
`CPACK_RPM_<COMPONENT>_FILE_NAME`.  Add it now.
2016-07-11 11:19:24 -04:00
Felix Geyer 566086187f Fix typos. 2016-07-10 11:05:56 +02:00
Ruslan Baratov af7da934a7 ExternalProject: Use default file name if extracting from URL fails
The download/extract step uses the file name only internally so we can
just use a fallback default name if one cannot be extracted from the
URL.
2016-07-07 09:35:42 -04:00
Brad King 0ca8f3e699 Merge topic 'toolchain-flag-init'
a66004be Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain files
cdde77e5 OpenWatcom: Partially modernize platform information modules
f9dbe22c Intel: Do not use GNU-like flags on Windows
5a3ed0d7 Intel: Do not use MSVC-like flags for Fortran
2016-07-07 09:02:23 -04:00
Brad King a66004bee0 Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain files
Document these variables.

Change our convention for setting these variables from:

    set(CMAKE_C_FLAGS_INIT "...")

to

    string(APPEND CMAKE_C_FLAGS_INIT " ...")

so that any value previously set by a toolchain file will be used.

Automate the conversion with:

    sed -i 's/set *(\(CMAKE_\(C\|CXX\|Fortran\|RC\|ASM\|${[^}]\+}\)_FLAGS\(_[^_]\+\)\?_INIT \+"\)/string(APPEND \1 /' \
      Modules/Compiler/*.cmake Modules/Platform/*.cmake

and follow up with some manual fixes (e.g. to cases that already
meant to append).  Also revert the automated changes to contexts
that are not protected from running multiple times.
2016-07-06 10:13:31 -04:00
Brad King cdde77e5f6 OpenWatcom: Partially modernize platform information modules
Migrate from the old `<os>-<cc>.cmake` layout to the modern
`<os>-<id>-<lang>.cmake` layout.  Keep settings common to C and C++ in a
`Windows-OpenWatcom.cmake` helper module with an include blocker.
For now just add both C and CXX settings in the helper module.
2016-07-06 10:10:10 -04:00
Brad King 7e53e6c9cc Merge topic 'ExternalProject-more-url-filenames'
57c337e2 ExternalProject: Match filenames in URLs with query strings and anchors
2016-07-06 09:36:13 -04:00
Brad King 7c8c07d03c Merge topic 'FindJNI-cleanup'
4e11c966 FindJNI: Improve formatting of FPHSA call
2016-07-06 09:36:10 -04:00
Brad King 0bcb9efdff Merge topic 'FindJNI-ubuntu-paths'
26d16380 FindJNI: Fix support for Ubuntu 15.10
2016-07-06 09:36:00 -04:00
Brad King 73f480b0ad Merge topic 'FindJava-doc-update'
10a7459a FindJava: Do not document variables we do not provide
2016-07-06 09:35:51 -04:00
Brad King f45befed3a Merge topic 'FindBoost-extras'
cb1a434c FindBoost: Add check headers for `zlib` and `bzip2`
2016-07-06 09:35:47 -04:00
Brad King 8df2e68614 Merge topic 'cpack-rpm-better-directive-match'
a351edd2 CPackRPM: Handle directives of form %foo and %foo(anything)
2016-07-06 09:35:29 -04:00
Brad King 06af626ef2 Merge topic 'cpack-ifw-list-variable'
9e505285 CPackIFW: Using cpack_append_list_variable_set_command
cd1415b5 CPackComponents: add cpack_append_list_variable_set_command
2016-07-06 09:35:06 -04:00
Andrew Fuller a351edd245 CPackRPM: Handle directives of form %foo and %foo(anything)
Directives that are legal inside the %files section of an RPM spec may
contain a variety of characters particularly when specifying %caps which
can include +, _, and space.  Watch for parenthesis to determine what
forms the prefix vs. path.

Fixes #14362.
2016-07-05 15:27:56 -04:00
Brad King 57c337e2ef ExternalProject: Match filenames in URLs with query strings and anchors
While at it, refactor logic to consolidate the filename extraction
and verification into a single match.

Inspired-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-07-05 14:57:13 -04:00
O Libre 4e11c9660f FindJNI: Improve formatting of FPHSA call
Pass one argument per line for better readability.
2016-07-05 14:35:24 -04:00
Brad King c7e0c3005b Merge branch 'FindJNI-ubuntu-paths' into release 2016-07-05 14:34:02 -04:00
O Libre 26d16380b0 FindJNI: Fix support for Ubuntu 15.10
The library search paths added by commit v3.6.0-rc1~281^2~1 (FindJNI:
Add support for Ubuntu 15.10, 2016-03-08) were incorrect.  Fix them.
2016-07-05 14:33:46 -04:00
Alex Turbov cb1a434ce0 FindBoost: Add check headers for `zlib` and `bzip2`
The official Windows builds of Boost have internal implementations for
`zlib` and `bzip2` libraries used by Boost::iostreams library, e.g.

* boost_bzip2-vc140-mt-1_59.lib
* boost_zlib-vc140-mt-1_59.lib

Add check headers for these so that users can specify them as
components without any warnings.

Reviewed-by: Roger Leigh <rleigh@dundee.ac.uk>
2016-07-05 14:22:01 -04:00
Brad King 10a7459a22 FindJava: Do not document variables we do not provide
Drop Java_INCLUDE_DIRS and Java_LIBRARIES from the documentation since
we do not provide them.  Also add a link to FindJNI to help users find
it.  Fixes #16180.
2016-07-05 14:18:21 -04:00
Brad King f9dbe22ca2 Intel: Do not use GNU-like flags on Windows
Refactor options out of `Modules/Compiler/Intel-{ASM,C,CXX,Fortran}.cmake`
into a common helper in `Modules/Compiler/Intel.cmake`.  Condition
them to be used only on non-Windows hosts where the Intel compiler
is GNU-like instead of MSVC-like.

Previously this worked only because the options were later overridden
by `Modules/Platform/Windows-Intel*.cmake`, but it is cleaner to not
set the options in the first place.
2016-07-05 13:58:42 -04:00
Brad King 5a3ed0d780 Intel: Do not use MSVC-like flags for Fortran
Teach `Modules/Platform/Windows-MSVC.cmake` not to use MSVC options
for Fortran.  We use the `__windows_compiler_msvc` for the Intel
Fortran compiler on Windows for other settings, but we do not want
the flags.

Previously this worked only because the options were later overridden
by `Modules/Platform/Windows-Intel*.cmake`, but it is cleaner to not
set the options in the first place.
2016-07-05 13:58:36 -04:00
Brad King 3643390d49 Strip CMAKE_<LANG>_FLAGS[_<CONFIG>] initializer whitespace 2016-07-01 14:01:41 -04:00
Brad King cff9c11de7 Merge topic 'doc-updates'
c05d240e Help: Document CMAKE_TRY_COMPILE_PLATFORM_VARIABLES example
dab3ccf2 InstallRequiredSystemLibraries: Document UCRT option use case
2016-07-01 09:12:36 -04:00
Brad King dab3ccf294 InstallRequiredSystemLibraries: Document UCRT option use case
Suggested-by: Hendrik Sattler <post@hendrik-sattler.de>
2016-06-30 08:54:46 -04:00
Konstantin Podsvirov 9e505285e3 CPackIFW: Using cpack_append_list_variable_set_command
This is necessary for proper processing of the list items.
2016-06-29 19:14:05 +03:00
Konstantin Podsvirov cd1415b548 CPackComponents: add cpack_append_list_variable_set_command
It's like add variable, but wrap each item to quotes.
Can be used for multi args properties.
2016-06-29 19:10:41 +03:00
Brad King 843402b04a GenerateExportHeader: Add option to specify custom content 2016-06-28 09:43:52 -04:00
Brad King f23d846a97 Merge topic 'FindHDF5-handle-unsuffixed'
234deec2 FindHDF5: create all the *_LIBRARIES when using hdf5-config.cmake
963b576f FindHDF5: cache the correct path to the high level libraries
9f2728ce FindHDF5: When component targets not found fallback to compiler wrappers
149539d9 FindHDF5: Handle HDF5 builds with non-suffixed components
f30b0fec FindHDF5: correctly add lang to each component target name.
2016-06-28 09:06:37 -04:00
Brad King 4adab7093a Merge topic 'ios-universal-fixes'
11c3a8dc CMakeIOSInstallCombined: add some sanity checks
aff1e77f CMakeIOSInstallCombined: do not merge content of OUTPUT and ERROR variables
2016-06-27 10:40:33 -04:00
Brad King cd29388615 Merge branch 'FindHDF5-handle-unsuffixed' into release 2016-06-27 10:29:09 -04:00
Ruslan Baratov 11c3a8dc11 CMakeIOSInstallCombined: add some sanity checks 2016-06-25 13:48:31 +02:00
Ruslan Baratov aff1e77f48 CMakeIOSInstallCombined: do not merge content of OUTPUT and ERROR variables 2016-06-25 13:37:44 +02:00
Robert Maynard 234deec2ea FindHDF5: create all the *_LIBRARIES when using hdf5-config.cmake 2016-06-24 15:28:23 -04:00
Robert Maynard 963b576fd2 FindHDF5: cache the correct path to the high level libraries 2016-06-24 15:26:22 -04:00
Robert Maynard 9f2728cef3 FindHDF5: When component targets not found fallback to compiler wrappers 2016-06-23 12:31:26 -04:00
Robert Maynard 149539d9c2 FindHDF5: Handle HDF5 builds with non-suffixed components 2016-06-23 10:57:58 -04:00
Robert Maynard f30b0fec74 FindHDF5: correctly add lang to each component target name. 2016-06-23 10:56:29 -04:00
Rolf Eike Beer 8b3ffbe4af GetPrerequisites: fix typo in comment 2016-06-23 08:55:07 -04:00
Rolf Eike Beer 460a589d20 GetPrerequisites: fix typo in comment 2016-06-22 21:38:08 +02:00
Brad King 54e293db06 Merge topic 'FindZLIB-fixup'
4bb83514 FindZLIB: Do not mark unused variable as advanced
2016-06-22 08:53:04 -04:00
Brad King ed59f4ba67 Merge topic 'GetPrerequisites-findstr'
867b73e2 GetPrerequisites: Optimize on Windows by filtering `objdump` output
2016-06-22 08:53:02 -04:00
Brad King cc9f6f3b98 Merge topic '14068-ctest-target-set-buildname-with-only-c-compiler'
6509ad29 CTest: Properly set buildname if only C langage is enabled
2016-06-21 13:57:14 -04:00
Brad King e260f30d23 Merge topic 'FindGLEW-debug'
6087b9e4 FindGLEW: Search for debug and release configurations separately
2016-06-21 13:57:11 -04:00
Brad King 91392a66e1 Merge topic 'FindLua-match-header-and-lib'
eecd307e FindLua: Iterate through all include subdirs to find a suitable header
3532cbce FindLua: Check header file against suitable versions
281c707b FindLua: Factor out a helper function for version extraction
92c67b9f FindLua: Prefix private APIs with `_lua_`
2016-06-21 13:57:09 -04:00
Brad King 447f0618db Merge topic 'FindBoost-imported-fallback-to-release'
c9fca42f FindBoost: Make imported targets fall back to `Release`
2016-06-21 13:57:04 -04:00
Brad King 736ffc627c Merge topic 'aix-clang'
5cc34162 AIX: Add support for Clang compiler
2016-06-21 13:57:02 -04:00
Brad King 4bb8351414 FindZLIB: Do not mark unused variable as advanced
We no longer define the ZLIB_LIBRARY cache entry, so we should not mark
it as advanced either.  We only use this variable when someone else
defines it in order to remain compatible with older versions of this
module, but we never create the entry ourselves anymore.
2016-06-21 08:56:56 -04:00
Laurent Tarrisse 867b73e275 GetPrerequisites: Optimize on Windows by filtering `objdump` output
Extend the optimization from commit v3.4.0-rc1~264^2 (GetPrerequisites:
Optionally filter "objdump" output for speed, 2015-07-29) to work
on Windows by using `findstr` in place of `grep`.
2016-06-21 08:48:09 -04:00
Jean-Christophe Fillion-Robin 6509ad29f6 CTest: Properly set buildname if only C langage is enabled
Fixes #14068
2016-06-20 15:45:25 -04:00
FARBOS Arnaud 6087b9e439 FindGLEW: Search for debug and release configurations separately 2016-06-20 15:07:32 -04:00
Ivan Ivanov eecd307e24 FindLua: Iterate through all include subdirs to find a suitable header
Fixes #15756.
2016-06-20 14:46:06 -04:00
Ivan Ivanov 3532cbce18 FindLua: Check header file against suitable versions 2016-06-20 14:40:40 -04:00
Ivan Ivanov 281c707b65 FindLua: Factor out a helper function for version extraction 2016-06-20 14:38:32 -04:00
Ivan Ivanov 92c67b9f01 FindLua: Prefix private APIs with `_lua_` 2016-06-20 14:37:49 -04:00
Andreas Weis c9fca42fd1 FindBoost: Make imported targets fall back to `Release`
FindBoost only detects Debug and Release configurations.  All other
configurations will fall back to the configuration listed as the first
entry in `IMPORTED_CONFIGURATIONS`.  Switch the order so that `Release`
is listed first, as this is a better fallback than `Debug` for the
`RelWithDebInfo` and `MinSizeRel` configurations.  See issue #16091.
2016-06-20 10:14:10 -04:00
Wu Zhao 5cc34162ad AIX: Add support for Clang compiler
The platform information module for GNU on AIX can be reused for Clang
on AIX because clang accepts almost all of the same options.
2016-06-20 09:59:31 -04:00
Brad King efb6d317e3 Merge topic 'FindQt4-doc-QtDeclarative-imported'
5ed2881c FindQt4: Document Qt4::QtDeclarative imported target (#16157)
2016-06-20 09:56:04 -04:00
Brad King 95c5e00186 Merge topic 'pkgconfig-targets'
8345c646 FindPkgConfig: define the imported targets also when the data comes from cache
2016-06-20 09:55:59 -04:00
Brad King 5f3bfab7b7 Merge topic 'FindFreetype-debug-lib'
b213a7f6 FindFreetype: Find release and debug libraries separately
2016-06-20 09:55:52 -04:00
Brad King 5c7b2aafbd Merge topic 'revert-vs-clang-minsize'
78249be2 VS: Fix regressed mapping for the cl `/Os` compiler flag
2016-06-20 09:55:48 -04:00
Brad King 4fdb97db8d Merge branch 'pkgconfig-targets' into release 2016-06-20 09:24:30 -04:00
Brad King 45b62646db Merge branch 'FindQt4-doc-QtDeclarative-imported' into release 2016-06-20 09:09:08 -04:00
Brad King 5ed2881cb2 FindQt4: Document Qt4::QtDeclarative imported target (#16157) 2016-06-20 08:49:31 -04:00
Rolf Eike Beer 8345c6463d FindPkgConfig: define the imported targets also when the data comes from cache 2016-06-19 09:35:05 +02:00
Stuart Mentzer b213a7f6ab FindFreetype: Find release and debug libraries separately 2016-06-17 11:52:18 -04:00
Brad King 5889eb43ea Merge topic 'ice-debug'
86bcdbcd FindIce: Support finding both release and debug libraries
2016-06-17 11:06:42 -04:00
Brad King 4160d68189 Merge branch 'revert-vs-clang-minsize' into release 2016-06-17 10:20:16 -04:00
Brad King 78249be29d VS: Fix regressed mapping for the cl `/Os` compiler flag
In commit v3.6.0-rc1~279^2~10 (VS: in Clang/C2 toolset, setup correct
compiler settings, 2016-02-18) a flag mapping was added for the clang
`-Os` flag.  However, this collides with a mapping we already had for
the MSVC flag of the same name.  This is a symptom of a larger problem
in that the VS generators need a per-toolset flag map (issue #16153).

For now, simply drop the new mapping and drop `-Os` from clang compiler
flags in the MinSizeRel configuration.

Reported-by: Felix Bruns <felixbruns@gmail.com>
2016-06-17 10:18:47 -04:00
Brad King f3d76a88b7 Merge topic 'ice-3.6.2'
82ecc2a3 FindIce: Add versions 3.6.1 and 3.6.2
2016-06-16 09:52:58 -04:00
Brad King 993991a07d Merge topic 'findcuda-use-correct-runtime-for-required'
90d114ed FindCUDA: Use the correct runtime in REQUIRED_VARS check
2016-06-16 09:46:52 -04:00
Roger Leigh 86bcdbcde5 FindIce: Support finding both release and debug libraries
Search for both release and debug library variants, and use
SelectLibraryConfigurations to choose the appropriate
library.  Also add both release and debug libraries to the
imported targets.
2016-06-16 12:23:37 +01:00