Commit Graph

7132 Commits

Author SHA1 Message Date
Gilles Khouzam
435cebaaa1 VS: Fix CSharp compiler identification for VS 2017
The CSharp compiler for VS 2017 has moved from `MSBuildTools` to
`RoslynTargets`.  Account for both locations giving priority to the
`MSBuildTools` location.
2017-01-31 09:00:20 -05:00
Brad King
0ea578b498 Merge topic 'GNUG_define'
24d73fa0 GNUC: also check __GNUG__ define when checking for g++
2017-01-27 09:04:56 -05:00
Brad King
90ee3bd3b0 Merge topic 'FindCUDA-select-flags-auto-msvc'
c1f3086d FindCUDA: Enable CUDA_SELECT_NVCC_ARCH_FLAGS Auto for MSVC
2017-01-26 10:40:44 -05:00
Brad King
4ab35eb661 Merge topic 'pkg-config-recheck'
796dea67 FindPkgConfig: Recheck pkg-config on parameter change.
2017-01-26 10:40:42 -05:00
Brad King
09cad30904 Merge topic 'FindGTK2_RunTwice'
4bc2c16b FindGTK2: Add unit test to check variables when run twice
9702b3ee FindGTK2: Fix GTK2_LIBRARIES and GTK2_TARGETS when called twice
2017-01-26 10:40:39 -05:00
Brad King
6ee9efa883 Merge topic 'FindLua-versioned-lib'
2759e225 FindLua: try to find library according to version from header
2017-01-26 10:40:36 -05:00
Rolf Eike Beer
24d73fa0eb GNUC: also check __GNUG__ define when checking for g++
At least the scratchbox compiler for the N900, which basically is a gcc 4.2,
sets only __GNUG__ in C++ mode, but not __GNUC__. It does indeed set
__GNUC_MINOR__ and __GNUC_PATCHLEVEL__. Extend the compiler detection code for
GNU compilers in C++ mode to look at __GNUG__ in case __GNUC__ is absent.
2017-01-25 21:53:40 +01:00
Bjoern Thiel
c1f3086de7 FindCUDA: Enable CUDA_SELECT_NVCC_ARCH_FLAGS Auto for MSVC
Fixes: #16525
2017-01-25 10:31:27 -05:00
Brad King
b4efd34d79 Merge topic 'intel-mpi-windows-fix'
e6eaf25c FindMPI: Strip quotes from include path and convert to CMake path format
39bf93c8 FindMPI: Add Intel MPI wrapper names on Windows
2017-01-25 08:41:26 -05:00
Brad King
c0ca687a1b Merge topic 'cpack-ifw-options'
e5089c56 CPackIFW: Add some options
2017-01-25 08:41:24 -05:00
Brad King
9006ec1d9b Merge topic 'cuda_linker_preference'
df3353d1 CUDA: set linker preference between C and C++
2017-01-25 08:41:15 -05:00
Daniele E. Domenichelli
9702b3eefd FindGTK2: Fix GTK2_LIBRARIES and GTK2_TARGETS when called twice
Closes: #16582
2017-01-25 10:20:30 +01:00
Matthew Hanna
796dea67a6 FindPkgConfig: Recheck pkg-config on parameter change.
Currently, once pkg_check_modules succeeds, it will never call
_pkg_check_modules_internal again.  That means that if the parameters
to pkg_check_modules are changed, cmake will be called to reconfigure,
but nothing will change.  This change is to store the full string of
arguments to pkg_check_modules and override the FOUND optimization so
that the arguments are reevaluated when modified.
2017-01-24 22:02:14 -05:00
Robert Maynard
df3353d1f9 CUDA: set linker preference between C and C++ 2017-01-24 15:43:43 -05:00
Brad King
2759e22575 FindLua: try to find library according to version from header
Patch-by: fft on gitlab.kitware.com
Issue: #15756
2017-01-24 15:21:33 -05:00
Brad King
c59d381065 Merge topic 'cpack-stgz-minimal-test'
624709c8 CPack/STGZ: minimalistic packages test
1c93eb68 CPack/STGZ prefer pax for extraction
2017-01-24 14:45:35 -05:00
Brad King
38bb96386c Merge topic 'android-include-api'
1ee0ffab Android: Pass sysroot include directory explicitly
1806e011 Android: Fix c++_{static,shared} support include directory order
2017-01-24 14:45:32 -05:00
Brad King
0e990a01f1 Merge topic 'qt4-lupdate-cmp0058'
1c2ac0b8 Qt4: Only change timestamp on generated .pro files if content changes
2017-01-24 14:45:19 -05:00
Konstantin Podsvirov
e5089c562c CPackIFW: Add some options
The cpack_ifw_configure_component_group command gained options:
- DEPENDS.

The cpack_ifw_configure_component and
cpack_ifw_configure_component_group commands gained options:
- REQUIRES_ADMIN_RIGHTS;
- UPDATE_TEXT;
- SORTING_PRIORITY; # New name for PRIORITY
- DEPENDENCIES; # Alias for DEPENDS
- AUTO_DEPEND_ON;
- TRANSLATIONS.

For both commands PRIORITY option now is depreceted. Please
use SORTING_PRIORITY instead.
2017-01-24 17:03:37 +03:00
Christian Pfeiffer
e6eaf25c3a FindMPI: Strip quotes from include path and convert to CMake path format 2017-01-23 17:30:45 +01:00
Christian Pfeiffer
39bf93c897 FindMPI: Add Intel MPI wrapper names on Windows 2017-01-23 17:30:25 +01:00
Domen Vrankar
1c93eb683b CPack/STGZ prefer pax for extraction
pax is part of POSIX while tar requires
GNU extensions that are not part of some
UNIX distros
2017-01-22 22:06:59 +01:00
Brad King
1ee0ffab81 Android: Pass sysroot include directory explicitly
The NDK's `build/core/definitions.mk` file adds compiler flags:

    -isystem $$(call host-path,$$(SYSROOT_INC)/usr/include)

This passes the system include directory explicitly even though it is
implied by `--sysroot=`.  The explicit flag places the directory
earlier in the include path than the sysroot-default one would be.

Teach CMake to add this include directory at the end of the standard
include path for Android.  Otherwise the toolchain's `include-fixed/`
directory may replace system headers with "fixed" copies that are not
from the same API version.

Closes: #16536
2017-01-20 15:45:09 -05:00
Brad King
1806e011cb Android: Fix c++_{static,shared} support include directory order
The NDK's own build files:

    <ndk>/build/tools/build-cxx-stl.sh
    <ndk>/build/cmake/android.toolchain.cmake

for the `c++_static` and `c++_shared` build types add the
`<ndk>/sources/android/support/include` include directory
between the two `<ndk>/sources/cxx-stl/llvm-libc++*` directories.
Re-order our own include directory generation to match.

Issue: #16536
2017-01-20 15:39:27 -05:00
Clinton Stimpson
1c2ac0b8ba Qt4: Only change timestamp on generated .pro files if content changes
In qt4_create_translation() use file(GENERATE ...) instead of
file(WRITE ...).  This also removes a possible CMP0058 warning
because file(GENERATE) tells the Ninja generator about the files
it provides.

Fixes: #16518
2017-01-20 13:28:48 -05:00
Brad King
6b4b8e6a60 Merge topic 'add-dl-to-lua-static-linking'
adc04afe FindLua: Add dl library to Lua static library linking
2017-01-20 11:54:41 -05:00
Brad King
d9d41d332d Merge topic 'ExternalProject-restore-case-insensitive-hash'
0ed885f7 ExternalProject: Restore case-insensitive download hash check
2017-01-20 11:54:39 -05:00
Brad King
395f01ef72 Merge topic 'cpack-ifw-new-installer-options'
3fc4a2b7 QtIFW: Added new options to QtIFW cpack generator for modifying wizard style
2017-01-20 11:54:34 -05:00
Michael Krasnyk
adc04afe34 FindLua: Add dl library to Lua static library linking
If a Lua library is compiled from source as `liblua.a` its link
dependency on `dl` must be satisfied explicitly.
2017-01-20 11:49:51 -05:00
Brad King
0ed885f742 ExternalProject: Restore case-insensitive download hash check
Refactoring in commit v3.6.0-rc1~47^2 (ExternalProject: Re-implement
download logic as a dedicated script, 2016-05-19) accidentally made the
download hash check case-sensitive.  The hash comparison is done in hex
strings, so restore case-insensitive comparison since the case of the
hex digits does not matter.

Fixes: #16568
2017-01-17 11:45:18 -05:00
Brad King
524c564318 Merge topic 'FindICU-include-dirs'
cdf7e5d8 FindICU: Add 'include' to the path suffixes
2017-01-17 09:05:02 -05:00
Alexander Voitenko
3fc4a2b71a QtIFW: Added new options to QtIFW cpack generator for modifying wizard style 2017-01-17 14:12:02 +03:00
Florent Castelli
cdf7e5d866 FindICU: Add 'include' to the path suffixes
Without this FindICU doesn't recognise the installation within homebrew.
2017-01-16 11:27:02 -05:00
Ben Boeckel
5201a3065b FindHDF5: use the target rather than the path
On Windows, the `LOCATION` property gets the path to the `.dll` rather
than the `.lib` which is unsuitable for linking.
2017-01-16 11:13:48 -05:00
Brad King
47d391d71d Merge topic 'csharp_simple'
397b8546 VS: added documentation for C# support
a7dd8e66 VS: added support for C# (for Visual Studio 2010, 2012, 2013, 2015)
6fda6005 VS: renamed target property VS_USER_PROPS_CXX to VS_USER_PROPS
2017-01-16 11:01:29 -05:00
Brad King
743085a579 Merge topic 'cuda_propagate_flags_when_dlink_on_executables'
8d1f9e5b CUDA: Now pass correct FLAGS when device link cuda executables.
dc5051f1 CUDA: Test that CUDA flags are used when device linking executables.
2017-01-16 11:01:17 -05:00
Brad King
034e1723db Merge topic 'clang-3.1-3.3-cpp11'
9fe399e3 Features: activate C++11 support for Clang 3.1+
2017-01-16 11:01:05 -05:00
Michael Stürmer
a7dd8e6692 VS: added support for C# (for Visual Studio 2010, 2012, 2013, 2015) 2017-01-13 09:28:13 +01:00
Stephen Sorley
4ae2dcb1b9 CheckFunctionExists: Document suggestion to use CheckSymbolExists instead.
CheckFunctionExists has some severe limitations that are overcome by
CheckSymbolExists.  Document them and suggest the alternative.
2017-01-12 15:52:53 -05:00
Robert Maynard
8d1f9e5b85 CUDA: Now pass correct FLAGS when device link cuda executables.
Previously we had a two issues when building cuda executables
that required separable compilation. The first was that we didn't
propagate FLAGS causing any -arch / -gencode flags to be dropped, and
secondly generators such as ninja would use the CXX language flags
instead of CUDA when the executable was mixed language.
2017-01-12 15:13:36 -05:00
Giel van Schijndel
9fe399e389 Features: activate C++11 support for Clang 3.1+ 2017-01-12 17:16:34 +01:00
Brad King
728820f3ea Merge topic 'cuda-windows'
f9a810f7 CUDA: Enable CudaOnly.SeparateCompilation test runtime calls
5599d858 CUDA: Port test cases to Windows with MSVC host compiler
11551702 CUDA: Populate NVIDIA compiler information on Windows
5365421e CUDA: Detect implicit link information on Windows
522b913f CUDA: Find MSVC binutils on Windows
02582b91 CUDA: Populate compiler PDB placeholder during device linking
d470cb70 CUDA: Use `.obj` object file extension on Windows
a2e80cb0 CUDA: Detect MSVC architecture id
65c1e012 CUDA: Detect use of MSVC host compiler
945dd207 CUDA: Allow platform files to set device linking rules
95420cea CMakeParseImplicitLinkInfo: Add support for MSVC invoked by CUDA nvcc
2017-01-12 10:41:57 -05:00
Brad King
1155170230 CUDA: Populate NVIDIA compiler information on Windows
Port Windows-specific compilation and linking rules over from the
`Platform/Windows-MSVC` module and adapt it for NVIDIA CUDA.  On Windows
nvcc and its host compiler (MSVC) do not understand or use options like
`-fPIC` or `-std=`, so condition those out.
2017-01-12 10:39:04 -05:00
Brad King
5365421e84 CUDA: Detect implicit link information on Windows
The `nvcc -v` output on Windows uses response files, so load the one we
need to extract the full link line.
2017-01-12 10:39:03 -05:00
Brad King
522b913f43 CUDA: Find MSVC binutils on Windows
On Windows the host link launcher is just `link.exe`.  Find and use that
instead of trying to extract the launcher from the `nvcc -v` output.
2017-01-12 10:39:03 -05:00
Brad King
d470cb7007 CUDA: Use .obj object file extension on Windows 2017-01-12 10:39:02 -05:00
Brad King
a2e80cb085 CUDA: Detect MSVC architecture id 2017-01-12 10:39:02 -05:00
Brad King
65c1e012ff CUDA: Detect use of MSVC host compiler
Report it in `CMAKE_CUDA_SIMULATE_{ID,VERSION}`.
2017-01-12 10:39:02 -05:00
Brad King
945dd207b6 CUDA: Allow platform files to set device linking rules
Condition the default settings on the rule variables not already being
set.
2017-01-12 10:39:02 -05:00
Brad King
95420cea5e CMakeParseImplicitLinkInfo: Add support for MSVC invoked by CUDA nvcc 2017-01-12 10:39:01 -05:00