Commit Graph

6808 Commits

Author SHA1 Message Date
Brad King b22294bc41 Android: Populate compiler flags for current ABI
Initialize the CMAKE_{C,CXX}_FLAGS{,_<CONFIG>} cache entries with
flags for each ABI as specified by NDK toolchain `setup.mk` files.
2016-08-23 12:51:58 -04:00
Boris Fomitchev 2dc9a754b5 FindCUDA: Support `2.1(2.0)` architecture notation
Also tweak some messages and comments.
2016-08-23 10:47:27 -04:00
Peter Boettcher 7ded655f7b FindCUDA: Take NVCC include directories from target properties
Fixes issue where include directories specified on the target are
not passed on to NVCC.  This includes both target_include_directories()
as well as include directories added by dependency chaining.

Closes: #14201
2016-08-16 14:16:35 -04:00
Brad King e240a7c017 Merge topic 'ExternalProject-SOURCE_SUBDIR'
a8345d65 ExternalProject: Add SOURCE_SUBDIR option
2016-08-16 13:26:22 -04:00
Brad King 074d098ffb Merge topic 'FindMatlab-mingw'
8ba204a6 FindMatlab: Use pre-built libraries for MinGW if needed
2016-08-16 13:26:19 -04:00
Brad King 447b142b6a Merge topic 'issue-tracker-urls'
2bdba83e issues: update references to the CMake issue tracker
2016-08-16 13:26:15 -04:00
Matthew Woehlke a8345d65f3 ExternalProject: Add SOURCE_SUBDIR option
Add a new SOURCE_SUBDIR option to ExternalProject_Add that allows
specifying the location of the CMakeLists.txt to use as the project root
relative to the SOURCE_DIR.

This is helpful for projects that have unusual layouts, or projects that
provide both a superbuild and project-only build depending on which
CMakeLists.txt is used.

Fixes: #15118
2016-08-16 13:18:18 -04:00
Ben Boeckel 2bdba83e4b issues: update references to the CMake issue tracker
References to specific comments are left as-is since comments were not
migrated.
2016-08-15 09:34:06 -04:00
Sebastian Niemann 8ba204a696 FindMatlab: Use pre-built libraries for MinGW if needed 2016-08-15 09:28:54 -04:00
Brad King 7fe5c79dd0 Merge topic 'FindCUDA-fixes'
1aa5c1be FindCUDA: Fix missing librt on Linux when using static cuda runtime.
aab1f6e9 FindCUDA: Restore default behavior of CUDA_USE_STATIC_CUDA_RUNTIME
2016-08-15 08:59:48 -04:00
Brad King d47abe40b6 Merge topic 'GetPrerequisites-fix-regression'
a2d5c25a GetPrerequisites: Fix regression in gp_resolved_file_type
2016-08-15 08:59:43 -04:00
Brad King b6a3102a9f Android: Add a CMAKE_BUILD_TYPE default
Android NDK builds are always `debug` or `release`.  We may populate
flags for these configurations that are needed to produce compatible
binaries.  Ensure they are used by default.
2016-08-12 10:40:54 -04:00
Brad King d1e3cec2aa Android: Add Clang -target option for current ABI 2016-08-12 10:40:54 -04:00
Brad King 504db72d99 Android: Add placeholders for compiler/abi-specific settings
The Android NDK source repository at

  https://android.googlesource.com/platform/ndk.git

has `<ndk>/build/core/toolchains/*/setup.mk` files that store tables of
information for their build system.  Add an equivalent file for each
compiler/abi combination.
2016-08-12 10:40:54 -04:00
Brad King fa63257821 Android: Avoid interfering with common pre-existing toolchain files
Commonly used Android toolchain files that pre-date CMake upstream
support may need to be updated to work with our new functionality.
They typically set CMAKE_SYSTEM_VERSION to 1, so detect that and
skip our upstream Android settings.  When such toolchain files are
updated to account for our upstream support, they can then set
CMAKE_SYSTEM_VERSION to a valid Android API and get new behavior.
2016-08-12 10:40:54 -04:00
Brad King 6299693f8a Android: Search for NDK and standalone toolchain in more places
Commonly used Android toolchain files that pre-date CMake upstream
support use a few environment and CMake variables as search locations.
Use them too to aid transition.
2016-08-12 10:40:53 -04:00
Brad King 29b51379de Android: Detect and save a standalone toolchain without the NDK 2016-08-12 10:40:53 -04:00
Brad King 7d9b49fbdf Android: Detect settings from the CMAKE_SYSROOT if it is set 2016-08-12 10:40:53 -04:00
Brad King 4389664a26 Android: Detect and save a toolchain from the NDK 2016-08-12 10:40:53 -04:00
Brad King 328191f65f Android: Set CMAKE_SYSROOT automatically
Compute CMAKE_SYSROOT automatically for the current API and architecture
selection.  This causes the --sysroot option to be passed to GNU and
Clang compilers.
2016-08-12 10:40:52 -04:00
Brad King 9e032304ea Android: Detect and save the architecture, ABI, and processor
Add new CMakeSystem.cmake entries for the architecture and ABI.
Store the processor in CMAKE_SYSTEM_PROCESSOR.
2016-08-12 10:40:52 -04:00
Brad King fde59c4d88 Android: Detect and save the API level
Store the Android API level in CMAKE_SYSTEM_VERSION.  If it is not
provided by the user, initialize it from CMAKE_ANDROID_API or fall back
to finding the latest available in the NDK.
2016-08-12 10:40:52 -04:00
Brad King 52b6effd81 Android: Detect and save the NDK directory
Add a new CMakeSystem.cmake entry for the NDK location.
2016-08-12 10:40:52 -04:00
Brad King 8e0cb45e55 Android: Suppress new functionality with Nsight Tegra in VS IDE builds
Support for NVIDIA Nsight Tegra Visual Studio Edition was previously
implemented in the CMake VS IDE generators.  Avoid interfering with
that functionality for now.  Later we may try to integrate this.
2016-08-12 10:40:52 -04:00
Brad King d5e7d5f3eb Android: Add placeholders for platform-specific initialization
Add infrastructure modules to be loaded when initializing builds
targeting Android platforms.
2016-08-12 10:40:51 -04:00
Brad King 64be1ae4a3 Android: Add placeholders for platform-specific compiler selection
Add infrastructure modules to be loaded for determining a compiler
selection when targeting Android platforms.
2016-08-12 10:40:51 -04:00
Brad King 47866770ce Android: Add placeholders for platform-specific compiler settings
Add infrastructure modules to be loaded for Clang and GNU compilers
when targeting Android platforms.
2016-08-12 10:40:51 -04:00
Brad King 735f168bf0 CMakeDetermine*Compiler: Add hook to save custom compiler information
Provide a way for Platform/<os>-Determine-<lang>.cmake modules to save
platform-specific information about the compiler in the configured
CMake<lang>Compiler.cmake modules.
2016-08-12 10:40:51 -04:00
Brad King c148803a57 CMakeDetermineSystem: Load platform-specific helper modules
Once CMAKE_SYSTEM_NAME is known, load a platform-specific

  Platform/<os>-Determine

module in order to enable custom determination of the other settings
needed for the CMakeSystem module (e.g. CMAKE_SYSTEM_PROCESSOR).  Also
add a hook in Modules/CMakeSystem.cmake.in to allow platform-specific
information to be saved.
2016-08-12 10:40:51 -04:00
Brad King a2d5c25a7a GetPrerequisites: Fix regression in gp_resolved_file_type
Since commit v3.6.0-rc1~287^2 (GetPrerequisites: Fix
gp_resolved_file_type on non-canonical paths, 2016-03-08) we
accidentally convert relative paths (e.g. system dll file names) to
absolute paths even when we do not know the base directory.  Fix this by
canonicalizing only paths that are already absolute.

Closes: #16240
2016-08-12 10:24:48 -04:00
Stephen Sorley 1aa5c1bec8 FindCUDA: Fix missing librt on Linux when using static cuda runtime.
Commit 7229ae72 (FindCUDA: Refactor Android(Tegra) support, 2016-04-19)
changed the logic to only add librt to the link line for CUDA versions
6.5 and older.  However, newer versions of CUDA still require librt.
2016-08-12 09:28:38 -04:00
Stephen Sorley aab1f6e984 FindCUDA: Restore default behavior of CUDA_USE_STATIC_CUDA_RUNTIME
Fix bug introduced by commit 7229ae72 (FindCUDA: Refactor Android(Tegra)
support, 2016-04-19).  `CUDA_USE_STATIC_CUDA_RUNTIME` should be enabled
by default if `cudart_static` is available, and silently disabled if
it is not.
2016-08-12 09:26:30 -04:00
Brad King 50ada755e3 Merge topic '15687-xcode-support-system-include'
93ac2a78 Xcode: Obey SYSTEM keyword for includes (#15687)
2016-08-10 11:16:01 -04:00
Gregor Jasny 93ac2a78d5 Xcode: Obey SYSTEM keyword for includes (#15687)
CMake used to put all header search paths into HEADER_SEARCH_PATHS
attribute. Unfortunately this attribute does not support to declare
a search path as a system include.

As a hack one could add a -isystem /path to the cflags but then include
ordering is not deterministic. A better approach was chosen with this
patch by not filling HEADER_SEARCH_PATHS at all and to populate
the C, C++, and Fortran flags directly. The include paths used by
Xcode should be now identical to the ones used by Unix Makefiles and
Ninja generator.
2016-08-09 20:30:07 +02:00
Neil Carlson e9c984267e NAG: Use -PIC for Fortran position-independent executable code
The Numerical Algorithms Group (NAG) Fortran compiler documents -PIC for
position-independent code and does not have a separate option for PIE.
We added `-PIC` for PIC in commit v2.8.11~174^2 (NAG: Use -PIC for
Fortran position-independent code, 2013-02-18).  Follow up for PIE.

Closes: #16236
2016-08-09 11:15:14 -04:00
Brad King 4689d16e8a Merge topic 'fix-string-append'
551b4c90 Revert the use of string(APPEND) in .cmake.in files
3a7be4f3 prefer list(APPEND) over string(APPEND) where appropriate
2016-08-09 09:20:21 -04:00
Brad King a5b73e719a Merge topic 'GetPrerequisites-grep-a'
5f3c8f6a GetPrerequisites: Always filter objdump output as text
2016-08-09 09:20:18 -04:00
Brad King 892ffe4ebd Merge topic 'wix-custom-install-dir'
17bbf6af CPackWIX: Implement new CPACK_WIX_SKIP_PROGRAM_FOLDER feature
2016-08-09 09:20:13 -04:00
Daniel Pfeifer 551b4c9062 Revert the use of string(APPEND) in .cmake.in files
The generated files may be consumed by older cmake versions which do not
support string(APPEND).
2016-08-08 21:45:41 +02:00
Daniel Pfeifer 3a7be4f394 prefer list(APPEND) over string(APPEND) where appropriate 2016-08-08 21:28:52 +02:00
Alexander Shishenko 5f3c8f6ab2 GetPrerequisites: Always filter objdump output as text
When using `grep` to filter the output, add the `-a` flag to tell
it never to treat the output as binary.  Otherwise when LANG != C
in the environment the non-ascii text may break the filter.
2016-08-08 14:05:21 -04:00
Brad King 314a953982 Merge topic 'update-cle-version-info'
e52302d6 CrayLinuxEnvironment: Add alternative methods to get version info
2016-08-08 10:02:11 -04:00
Matthäus G. Chajdas 88f2455f04 FindOpenCL: Fix search on macOS.
The original patch was provided by jerry <jerry.c.t@web.de>.
2016-08-08 09:57:30 -04:00
Michael Stürmer 17bbf6af1e CPackWIX: Implement new CPACK_WIX_SKIP_PROGRAM_FOLDER feature
The new variable allows setting of a custom absolute installation prefix
outside of the ProgramFiles folders.
2016-08-08 13:42:23 +02:00
Chuck Atkins e52302d6cb CrayLinuxEnvironment: Add alternative methods to get version info
Closes: #16229
2016-08-05 09:01:43 -04:00
Brad King ff386d1121 Modules: Make imported targets fall back to `Release`
Find modules only detect 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.

This approach is recommended by documentation in `cmake-developer(7)`
added by commit v3.2.0-rc1~286^2~1 (Help: Document IMPORTED_CONFIGURATIONS
target property for Find modules, 2014-12-04).
2016-08-03 11:14:29 -04:00
Brad King c2bc47f266 Merge topic 'CMakeFindFrameworks-custom-locations'
9970cdcb CMakeFindFrameworks: Allow custom framework locations
2016-08-03 09:20:56 -04:00
Brad King aabf8772fd Merge topic 'gcc-fvisibility-version'
85e03142 GNU: Use -fvisibility on GCC 4.0 and 4.1 too
2016-08-03 09:20:54 -04:00
Brad King a85e2a89de Merge topic 'FindProtobuf-restore-PROTOBUF_IMPORT_DIRS'
5790d9b6 FindProtobuf: Restore support for PROTOBUF_IMPORT_DIRS
2016-08-03 09:20:50 -04:00
Brad King ec807f6edf Merge topic 'port-to-sco'
56539d89 SCO_SV: Enable so filename versioning
16a3a735 cmELF: Port to SCO OpenServer 5.0.7/3.2
2016-08-03 09:20:47 -04:00
Brad King ef729c5bc2 Merge topic 'ExternalProject-no-DS_Store'
52aecc0c ExternalProject: Ignore macOS .DS_Store files in tarball extraction
2016-08-03 09:20:44 -04:00
Brad King 7b65e49529 Merge topic 'wix-root-description'
e29bfbf2 CPackWIX: Support custom title and description for the root feature
2016-08-03 09:20:38 -04:00
Brad King 8ba870bad6 Merge topic 'FindCUDA-no-windows-librt'
f4e979b1 FindCUDA: Do not look for librt on Windows
2016-08-03 09:20:35 -04:00
Brad King 573397bb54 Merge topic 'FindCUDA-arch'
15a6ae5c FindCUDA: Add search path for nvcc on Arch
2016-08-03 09:20:32 -04:00
Brad King 16e449cc72 Merge topic 'intel-gnu11-support'
088f14eb Intel-C: standard flags are also supported in 12.0
27a3ca15 Intel-C: support gnu89 and gnu99 extension flags
cc223e1e Intel-C: declare support for gnu11
2016-08-03 09:20:25 -04:00
Brad King a382c3013c Merge topic 'fix-findhdf5-definitions'
8eb0b56c FindHDF5: Make sure compile definition vars keep the -D flag
2016-08-03 09:20:19 -04:00
Hans Gaiser 15a6ae5cb7 FindCUDA: Add search path for nvcc on Arch 2016-08-02 15:36:07 -04:00
Ben Boeckel 088f14eb72 Intel-C: standard flags are also supported in 12.0 2016-08-02 13:10:56 -04:00
Ben Boeckel 27a3ca15e5 Intel-C: support gnu89 and gnu99 extension flags 2016-08-02 13:10:41 -04:00
Ben Boeckel cc223e1eed Intel-C: declare support for gnu11
Without extensions, functions like `strdup` are not available since they
are actually controlled by feature flags such as _SVID_SOURCE and
_BSD_SOURCE. When using `-std=c11` on Intel, none of these flags are
set, so the functions are not declared properly leading to compile
errors.

Reported-by: Adam J. Stewart <ajstewart426@gmail.com>
Closes: #16226
2016-08-02 11:42:45 -04:00
Konstantin Sinitsyn 5790d9b6f5 FindProtobuf: Restore support for PROTOBUF_IMPORT_DIRS
Support was accidentally dropped by commit v3.6.0-rc1~273^2
(FindProtobuf: Rename variables to match case of module name,
2016-03-01).
2016-08-02 10:50:24 -04:00
David Keller 9970cdcb59 CMakeFindFrameworks: Allow custom framework locations
Read a variable to get non-standard locations to be searched,
e.g. brew, port.

Signed-off-by: David Keller <david.keller@litchis.fr>
2016-08-02 10:41:40 -04:00
Chuck Atkins 8eb0b56c2a FindHDF5: Make sure compile definition vars keep the -D flag 2016-08-02 10:34:51 -04:00
Brad King 52aecc0c38 ExternalProject: Ignore macOS .DS_Store files in tarball extraction
Do not consider a top-level `.DS_Store` file when deciding whether a
tarball contains exactly one directory whose contents should be used as
the resulting top-level of the extraction.

Fixes #16218.

Suggested-by: Patrice Kouame
2016-08-02 10:14:26 -04:00
Patrick Welche 56539d89da SCO_SV: Enable so filename versioning
Take changes used by pkgsrc [1]:

* so filename versioning requires CMAKE_SHARED_LIBRARY_SONAME_C_FLAG.

[1] http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/cmake/patches/
2016-08-02 10:09:52 -04:00
Brad King 85e0314201 GNU: Use -fvisibility on GCC 4.0 and 4.1 too
This flag is needed for the `<LANG>_VISIBILITY_PRESET` target property.
It has been supported since GCC 4.0, not 4.2 as we previously recorded.

Fixes #16222.
2016-08-02 09:24:54 -04:00
Stephen Sorley f4e979b126 FindCUDA: Do not look for librt on Windows
Otherwise an incorrect warning appears when compiling with CUDA SDK 6.5
or older and CUDA_USE_STATIC_CUDA_RUNTIME is true.
2016-08-02 09:15:22 -04:00
Michael Stürmer e29bfbf272 CPackWIX: Support custom title and description for the root feature
These can now be specified through the WIX generator specific
CPack variables CPACK_WIX_ROOT_FEATURE_TITLE and
CPACK_WIX_ROOT_FEATURE_DESCRIPTION.
2016-08-02 14:05:08 +02:00
Brad King 5ec03c93fc Merge topic 'wix-disabled-components'
ad453f05 CPackWIX: Support CPACK_COMPONENT_<compName>_DISABLED
6f108f84 CPackComponent: Document the *_HIDDEN and *_DISABLED variables
2016-08-01 14:59:53 -04:00
Daniel Pfeifer 5d0d980d99 Use string(APPEND) in Modules
Automate with:

find Modules -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
2016-07-28 00:41:13 +02:00
Brad King e09518ca50 Merge topic 'nsis-protect-uninst-exec'
11768733 NSIS: Quote uninstaller path when executing it in a shell
2016-07-22 09:17:19 -04:00
Nils Gladitz 6f108f84d0 CPackComponent: Document the *_HIDDEN and *_DISABLED variables 2016-07-22 08:41:22 +02:00
Brad King 40d5375cf1 Merge branch 'nsis-protect-uninst-exec' into release 2016-07-21 10:08:33 -04:00
Justin Clift 11768733d3 NSIS: Quote uninstaller path when executing it in a shell
Protect our `$0` reference in the shell as `"$0"`.  Otherwise it works
with a space in the path only due to an insecure Windows feature.

Prior to this fix, any installer using the option added by commit
v2.8.9~234^2 (Added CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL,
2011-06-11) exposes a local privilege escalation vulnerability.

Reported-by: Amir Szekely <kichik@gmail.com>
Reported-by: Ug_0 Security
2016-07-21 10:05:46 -04:00
Eon Jeong ab8d5d0fdb FindBISON: Refactor public and inner macro routines 2016-07-18 09:06:36 -04:00
Eon Jeong c42e63a97e FindBISON: Add REPORT_FILE option to pass --report-file=FILE 2016-07-18 09:06:31 -04:00
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