Commit Graph

6662 Commits

Author SHA1 Message Date
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
Roger Leigh 82ecc2a3a8 FindIce: Add versions 3.6.1 and 3.6.2 2016-06-15 15:35:06 +01:00
Chuck Atkins 90d114ed8c FindCUDA: Use the correct runtime in REQUIRED_VARS check
When enabling the CUDA static runtime, the current module always uses
the shared runtime in the REQUIRED_VARS check.  This change should
select the correct runtime to be checked for as required based on the
CUDA_USE_STATIC_CUDA_RUNTIME option.

Fixes #16096
2016-06-14 09:55:35 -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 ff4697fc94 Merge topic 'FindProtobuf-proto-in-subdirs'
d4b8e813 FindProtobuf: fix protobuf_generate_*() to handle proto files in subdirs.
2016-06-10 09:10:02 -04:00
Brad King fbf461dde2 Merge topic 'FindFreetype-dedup-arguments'
746a4245 FindFreetype: Factor out common find command arguments
2016-06-10 09:09:59 -04:00
Brad King 09e6c9eba7 Merge topic 'FindCUDA-android'
7229ae72 FindCUDA: Refactor Android(Tegra) support
e9bfe8da FindCUDA: Adjust vertical whitespace
2016-06-10 09:09:57 -04:00
Brad King b29f1514d0 Merge topic 'FindOpenSSL-BoringSSL'
e937b4c3 FindOpenSSL: Do not assume that the version regex finds something
2016-06-10 09:09:54 -04:00
Vladimír Vondruš d4b8e81353 FindProtobuf: fix protobuf_generate_*() to handle proto files in subdirs. 2016-06-09 16:13:45 +02:00
Boris Fomitchev 7229ae728f FindCUDA: Refactor Android(Tegra) support
Reviewed-by: James Bigler <jamesbigler@gmail.com>
2016-06-09 09:25:55 -04:00
Boris Fomitchev e9bfe8da04 FindCUDA: Adjust vertical whitespace 2016-06-09 09:24:40 -04:00
Brad King 5aa89a1ae0 Merge topic 'java-export-targets'
0bd91ad4 UseJava: Fix race condition creating java class list
89df91b9 Help: Add notes for topic 'java-export-targets'
95d84369 Tests: Add test for exported JARs
5341c0d8 UseJava: Add infrastructure to export targets
d91ec044 Tests/Java: Clean up style of Java test code
2016-06-09 09:18:17 -04:00
Matthew Woehlke 0bd91ad405 UseJava: Fix race condition creating java class list
Modify logic to unconditionally create an empty class list response file
to instead only create the empty file if no classes are being compiled.
Otherwise, the response file is created via a custom command that
generates the correct list.

This fixes a race condition on certain systems (e.g. HFS on OS X) where
the dependency for creating the "correct" list can have the "same" (due
to limited precision of the filesystem) timestamp as the empty file
created at configure time, resulting in an empty class list being
incorrectly used to invoke `jar` (resulting in `jar` being unhappy that
it was not given any input files). Although one would have some hope
that this doesn't affect "real" projects, it definitely does affect the
JavaExportImport unit test, causing the same to fail randomly when run
on an HFS partition.
2016-06-09 09:12:15 -04:00
Stuart Mentzer 746a424573 FindFreetype: Factor out common find command arguments 2016-06-09 08:55:24 -04:00
Vladimír Vondruš e937b4c387 FindOpenSSL: Do not assume that the version regex finds something
BoringSSL's openslv.h does not have the version information.
2016-06-09 08:51:01 -04:00
Brad King fb8b8dd106 Merge topic 'add-FindVulkan'
adf4df28 Add FindVulkan.cmake.
2016-06-08 12:56:07 -04:00
Matthäus G. Chajdas adf4df28ca Add FindVulkan.cmake.
This adds FindVulkan with corresponding tests.
2016-06-08 12:44:03 -04:00
Roger Leigh 132b898968 FindBZip2: Search for additional bz2d debug library name 2016-06-07 22:46:40 +01:00
Matthew Woehlke 5341c0d84a UseJava: Add infrastructure to export targets
Add additional functions to UseJava.cmake to create "exported" targets,
similar to those of C/C++ libraries. In support of this, ensure that the
JAR_FILE property of jar targets is always an absolute path.
2016-06-07 08:50:35 -04:00
Brad King 9b15a15fe9 Merge topic 'SunOS-PathScale'
fcfe121f Platform: add flag definitions for PathScale compiler on SunOS (#16135)
2016-06-07 08:34:07 -04:00
Brad King d546456765 Merge topic 'productbuild'
63e5eb5f Help: Add notes for 'productbuild' topic
2e3c67d1 productbuild: Add new productbuild cpack generator.
50a3d340 PackageMaker: factor out common code for creating pkg files.
2016-06-06 11:19:20 -04:00