Commit Graph

6957 Commits

Author SHA1 Message Date
Brad King
d95e6dff3c Android: Add CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG variable
The NDK provides prebuilt toolchain files in directories named for the
host architecture.  The NDK build system calls this `HOST_TAG`.
Expose the value publicly for use by clients that need to pass it
to external tools.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-14 14:29:18 -05:00
Brad King
3d42a72bd5 Android: Always set CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION
When this variable is not set by the user or toolchain file, set it to
the default selected.  This will be useful for client code that needs to
pass the value to an external tool that needs to find the same toolchain
in the NDK.  Leave it empty for a standalone toolchain.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-14 14:29:14 -05:00
Brad King
4a4be0301b Merge topic 'swig_add_library'
a57e7630 Help: Add notes for topic 'swig_add_library'
013193d0 SwigTest: Update for swig_add_library and add lua example
ec1d585c UseSWIG: Do not set PREFIX property for SHARED and STATIC lua libraries
4c5b3c1c UseSWIG: Do not set NO_SONAME property for SHARED and STATIC libraries
d0a9d8bb UseSWIG: Add swig_add_library macro.
2016-11-14 09:44:17 -05:00
Brad King
a0b159685e Merge topic 'vs_targets_file_as_library'
883bd34a VS: Treat libraries ending in `.targets` as msbuild imports
2016-11-11 10:44:20 -05:00
Brad King
5733d3fbb9 Merge topic 'fuchsia-platform'
3cfad71c Add Fuchsia platform module
2016-11-11 10:44:17 -05:00
Brad King
8715157c73 Merge topic 'ExternalProject-GIT_CONFIG'
2be9d85a ExternalProject: Allow passing config flags to git clone
2016-11-11 10:44:10 -05:00
Brad King
68a9fc1bca Merge topic 'intel-compile-features'
5e428389 Features: Detect Intel C++14 mode more reliably
1f848031 Features: Suppress c_static_assert test coverage on Intel <= 15
2016-11-11 10:44:07 -05:00
Daniele E. Domenichelli
ec1d585c43 UseSWIG: Do not set PREFIX property for SHARED and STATIC lua libraries 2016-11-11 08:14:10 +01:00
Daniele E. Domenichelli
4c5b3c1cea UseSWIG: Do not set NO_SONAME property for SHARED and STATIC libraries 2016-11-11 08:14:10 +01:00
Daniele E. Domenichelli
d0a9d8bbe6 UseSWIG: Add swig_add_library macro.
swig_add_module does not allow to set the type for the library and
instead always create the library as MODULE.

This patch adds the new swig_add_library command with this signature:

  SWIG_ADD_LIBRARY(<name>
                   [TYPE <SHARED|MODULE|STATIC>]
                   LANGUAGE <language>
                   SOURCES <file>...
                   )

The swig_add_module is deprecated in favour of swig_add_library.

Closes: #16415
2016-11-11 08:13:47 +01:00
Brad King
5e42838961 Features: Detect Intel C++14 mode more reliably
The `__cplusplus` macro is not defined to the language level reliably.
When simulating MSVC it is always set to `1`.  When simulating GCC it is
set to the lower value of the current language level and the maximum
level supported by the simulated version of GCC (from observation).

For MSVC we already used a combination of `__INTEL_CXX11_MODE__` and
`__cpp_aggregate_nsdmi` to detect C++14 mode.  Extend this for general
use by removing the condition on `_MSC_VER`.
2016-11-10 15:37:05 -05:00
Brad King
be73273952 Features: Fix standards and features for Intel 15 on Windows
The Intel 15 compiler for Windows does not support the same set of
standards and features as the same version for other platforms.
2016-11-10 12:54:06 -05:00
Petr Hosek
3cfad71c77 Add Fuchsia platform module
Fuchsia is a new operating system. This module provides a minimal
setup needed to use Fuchsia toolchain.
2016-11-09 13:58:12 -08:00
Soji Yamakawa
883bd34a1f VS: Treat libraries ending in .targets as msbuild imports
Generate `<Import Project="..." .../>` to import the `.targets` files
into `.vcxproj` files.

Closes: #16340
2016-11-09 16:19:07 -05:00
Christian Fetzer
2be9d85af8 ExternalProject: Allow passing config flags to git clone
Add a `GIT_CONFIG` parameter that allows to specify `--config` flags
that are passed to the git clone command.  This can be used to specify
for example `core.autocrlf=true`.  The `--config` parameter is supported
since Git 1.7.7.
2016-11-09 15:54:13 -05:00
Brad King
e2565be52c Merge topic 'FindSDL_preventGrowingCacheVar'
f18b18b7 FindSDL: Prevent unbounded growth of SDL_LIBRARY_TEMP variable
2016-11-09 09:49:56 -05:00
Brad King
72190b923b Merge topic 'pkgconfig_imported_target'
61898de6 PkgConfig: Fix FindPkgConfig imported target feature
2016-11-09 09:49:53 -05:00
Craig Scott
f18b18b72b FindSDL: Prevent unbounded growth of SDL_LIBRARY_TEMP variable
Just modify the cache var property rather than using set() to hide it.
Otherwise the set() includes other values added to the temporary list.

Closes: #16406
2016-11-08 09:52:55 -05:00
Brad King
049b10e2f6 Merge topic 'cpack-rpm-omit-unsupported-tags'
b34c0457 Release text for omitting unsupported tags topic
cd042330 CPack/RPM test for Suggests tag
228280d8 CPack/RPM prevent special tags from being removed
d8e83ab9 CPack/RPM omit unsupported tags
2016-11-08 09:44:34 -05:00
Domen Vrankar
228280d833 CPack/RPM prevent special tags from being removed
Some tags are not listed by rpmbuild querytags
even though they are supported. Ignore those
tags during the removal of unsupported tags.
2016-11-05 11:44:32 +01:00
Alexander Adam
d8e83ab979 CPack/RPM omit unsupported tags
Omit tags that are not supported by provided rpmbuild
as some tags get added/removed in later versions of
the tool.

Closes: #13423
2016-11-05 11:42:08 +01:00
Florent Castelli
61898de641 PkgConfig: Fix FindPkgConfig imported target feature
The options to the find_library call to create the imported target
used a literal string "HINTS /path NO_DEFAULT_PATH" instead of a
list of options. This resulted in never finding any library in my
testing.
2016-11-04 23:35:27 +01:00
Brad King
80e477239d FortranCInterface: Make mangling detection robust to PIC Fortran
When using a Fortran compiler that produces PIC executables by default
with a C compiler that does not produce PIC by default then the mangling
detection executable fails to link.  Explicitly enable PIC for the C
compiler just in case the Fortran compiler needs it to link.

Issue: #16405
2016-11-04 09:54:12 -04:00
Brad King
28a9e71c52 Merge topic 'cpackifw-search-algorithm'
20cc76c9 CPackIFW: Update search to find QtIFW distributed with QtSDK
2016-11-04 08:26:05 -04:00
Brad King
8b75290f13 Merge branch 'cpackifw-search-algorithm' into release 2016-11-03 09:30:29 -04:00
Konstantin Podsvirov
20cc76c93a CPackIFW: Update search to find QtIFW distributed with QtSDK
Also avoid CMP0007 warnings.
2016-11-03 09:28:15 -04:00
Brad King
acc2e03d79 Merge topic 'FindHDF5-restore-default-C'
ff3ccc1f FindHDF5: Restore pre-3.6 behavior of finding only C by default
2016-11-03 08:54:43 -04:00
Brad King
e106a6eafb Merge topic 'compile-features-for-language-standards'
9a8d758c Help: Document language standard meta-features
df252db1 Features: Test cycle diagnostic with language standard meta-feature
6d5fb0e0 Features: Test feature propagation with language standard meta-feature
a34b98a8 WCDH: Ignore language standard meta-features
b0996a3f Features: Add meta-features requesting awareness of a particular standard
8b6cc251 Features: Centralize per-compiler recording macros
2d23f7b2 Features: Do not record features on MSVC < 2010
2016-11-03 08:54:33 -04:00
Brad King
90e09fb958 Merge topic 'intel-compile-features-windows'
b902f2a9 Features: Fix Intel cxx_attributes existence condition
2016-11-03 08:54:28 -04:00
Brad King
b902f2a98a Features: Fix Intel cxx_attributes existence condition
This condition needs to follow the same pattern added in note `[1]` by
commit a5a3642f (Features: Port Intel CXX features to test macros where
possible, 2016-10-26).  It was accidentally left out of that commit.
2016-11-03 08:38:23 -04:00
Brad King
a34b98a834 WCDH: Ignore language standard meta-features
The `{c,cxx}_std_*` features are meant for use with
`target_compile_features` but do not make sense for use with
WriteCompilerDetectionHeader.  Filter them out of any requested list.
2016-11-02 10:01:23 -04:00
Brad King
b0996a3fa2 Features: Add meta-features requesting awareness of a particular standard
A common use case of `target_compile_features` is simply to specify that
the compiler should be run in a mode that is aware of e.g. C++11.  Some
projects simply specify a particular C++11-only feature to request this.
Provide a first-class way to do this by naming features after the
corresponding language standard.  Record them as always available in the
corresponding standard level so that requesting them always ensures that
standard (or higher) is used.
2016-11-02 10:00:28 -04:00
Brad King
8b6cc2518a Features: Centralize per-compiler recording macros
Simplify and de-duplicate per-compiler feature recording macros and
convert to a centralized per-language macro.
2016-11-02 09:51:48 -04:00
Brad King
2d23f7b206 Features: Do not record features on MSVC < 2010
We have no feature tests for versions of VS older than 2010, so do
not even call `record_compiler_features` for such versions.  This
is consistent with other compilers where we call this macro only
for versions for which we have recorded features.
2016-11-02 09:42:18 -04:00
Brad King
5f7f0ab517 Merge branch 'FindHDF5-restore-default-C' into release 2016-11-02 09:07:53 -04:00
Brad King
ff3ccc1f23 FindHDF5: Restore pre-3.6 behavior of finding only C by default
Refactoring in commit v3.6.0-rc1~72^2 (HDF5: Rework component searching
to correctly find HL for all bindings, 2016-05-12) changed the default
behavior from finding only the C bindings to finding everything for the
enabled languages.  Restore the original behavior for compatibility and
because many projects need only the C bindings.

Closes: #16397
2016-11-02 09:06:56 -04:00
Brad King
b5ad094e3b Merge topic 'cpack-doc-typos'
4ab3b0c4 CPackRPM: Fix incorrect variable name in documentation
e6460e7d CPackDeb: Fix incorrect variable name in documentation
2016-11-02 08:54:23 -04:00
Brad King
2857ca89a2 Merge branch 'cpack-doc-typos' into release 2016-11-02 08:44:22 -04:00
Brad King
503766fa0e Merge branch 'fix-macos-sysroot' into release 2016-11-02 08:44:16 -04:00
Alex Turbov
4ab3b0c462 CPackRPM: Fix incorrect variable name in documentation
`CPACK_RPM_COMPONENT_INSTALL` is the correct variable to set to enable
component packaging.  `CPACK_RPM_PACKAGE_COMPONENT` is just set to a
component name when CPack calls corresponding installer.
2016-11-02 08:42:56 -04:00
Alex Turbov
e6460e7d40 CPackDeb: Fix incorrect variable name in documentation
`CPACK_DEB_COMPONENT_INSTALL` is the correct variable to set to enable
component packaging.  `CPACK_DEB_PACKAGE_COMPONENT` is just set to a
component name when CPack calls corresponding installer.
2016-11-02 08:42:44 -04:00
Brad King
6a65f0534b Merge topic 'fix-macos-sysroot'
93504190 Darwin: Remove deployment target version check
542d52f9 Revert "Xcode: Convert maybe unversioned OSX sysroot into versioned SDK path"
2016-11-02 08:35:26 -04:00
Brad King
93f025118d Merge topic 'UseSWIG-SWIG_OUTFILE_DIR'
8444b984 UseSWIG: Add option to specify swig output file directory
2016-11-02 08:35:23 -04:00
Brad King
2fb83cc871 Merge topic 'CPackDeb-doc-typos'
c75b8910 CPackDeb: fix copy-n-paste typos in documentation
2016-11-01 10:58:37 -04:00
Alex Turbov
c75b8910a4 CPackDeb: fix copy-n-paste typos in documentation 2016-11-01 10:13:20 -04:00
Cong Zhang
8444b984a2 UseSWIG: Add option to specify swig output file directory
`swig` has two output-related options:

* `-o <outfile>`: Set name of C/C++ output file to <outfile>
* `-outdir <dir>`: Set language-specific files output directory to <dir>

We already have `CMAKE_SWIG_OUTDIR` for the latter.  Add a new
`SWIG_OUTFILE_DIR` option for the former.
2016-11-01 10:10:08 -04:00
Gregor Jasny
935041908d Darwin: Remove deployment target version check
Starting with Xcode 8 the SDK folder also contains an unversioned entry:

    MacOSX.sdk
    MacOSX10.12.sdk -> MacOSX.sdk

If this unversioned path is used CMake cannot detect the SDK version.

Furthermore, querying the SDK version via

    xcodebuild -sdk <sysroot> -version Path

gives bogus results for the Command Line Tools installed into `/`.

The OS X deployment target version and SDK version are not as tied as
they once were, so this check is now more trouble than it is worth.
Simply remove it.

Closes: #16323
2016-11-01 09:37:49 -04:00
Gregor Jasny
542d52f95e Revert "Xcode: Convert maybe unversioned OSX sysroot into versioned SDK path"
Revert commit v3.7.0-rc1~48^2 (Xcode: Convert maybe unversioned OSX
sysroot into versioned SDK path, 2016-09-25).  The replacement of
`else()` with `if(CMAKE_OSX_SYSROOT)` defeats the prior handling of
`if("x${CMAKE_OSX_SYSROOT}" MATCHES "/")`. This causes the combination

    -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/

to not be honored and `-isysroot` to be emitted as a compiler flag
universally.  We will need another solution to the problem the
now-reverted commit was meant to address.

Closes: #16394
2016-11-01 09:31:08 -04:00
Brad King
3573059536 Merge topic 'FindSDL-sound-fix'
f2ff9495 FindSDL_sound: Fix SDL_SOUND_LIBRARIES result value
2016-11-01 09:14:34 -04:00
Brad King
b8c5258b00 Merge topic 'FindMatlab-fix-typo'
f2de7079 FindMatlab: Fix typo in matlab_add_unit_test implementation
2016-11-01 09:14:31 -04:00