Commit Graph

5560 Commits

Author SHA1 Message Date
Stephen Kelly 6e909035af Features: Record C/CXX dialect flags for GNU 4.6.
This release was prior to standardization of C11/CXX11.
2015-01-15 22:13:22 +01:00
Stephen Kelly bfc995cc3b Features: Remove wrong content from else() condition.
As this is not elseif(), the content has no effect.

Rather than changing it to an elseif(), remove the conditional content.
All versions of GNU prior to 5.0 default to C90/89.

Clang-C.cmake has a similar code block which correctly uses
elseif() for setting the default C dialect to C99.  That may have
been updated from a C90 default at some point, so leave the
version condition there in place for now.
2015-01-15 22:13:22 +01:00
Stephen Kelly 1532b9214f Features: Make cxx_noexcept available from GNU 4.6.
As listed in the reference document.
2015-01-15 22:13:22 +01:00
Stephen Kelly a60027a642 Features: Ensure appropriate return value from feature test macros.
GNU-CXX already has complex logic and sets the _result to 0 before
tests which may set it to something else.

Change the other modules to be consistent with that.
2015-01-15 22:13:21 +01:00
Brad King 80a6c38d98 Merge topic 'FindGit-local-Github'
ff880ece Help: Add notes for topic 'FindGit-local-Github'
54690624 FindGit: Search in 'GitHub for Windows' user directory
2015-01-15 09:54:14 -05:00
Brad King e7c1836e04 Merge topic 'Apple-compiler-selection'
da928d30 Help: Add notes for topic 'Apple-compiler-selection'
1f085e11 OS X: Resolve compiler in /usr/bin to that reported by Xcode xcrun
85d31735 CMakeDetermineCompiler: Factor out xcrun invocation into a macro
2015-01-15 09:54:12 -05:00
Brad King ff1727af77 Merge topic 'safer-msmpi-checks'
68857ccd FindMPI: handle trailing slash from $MSMPI_BIN
2015-01-15 09:54:10 -05:00
Brad King b4263abdea Merge topic 'Xcode-clang-compile-features'
dcd72a74 Help: Add notes for topic 'Xcode-clang-compile-features'
3ad893b5 Features: Record for historical Xcode clang versions.
98965fb1 Features: Record dialect flags for AppleClang 4.0+.
2015-01-15 09:54:08 -05:00
Brad King 526a80b32a Merge topic 'FindBoost-update-versions'
4048f7cd FindBoost: Add latest Boost version 1.57.0 and next milestone 1.58.0
2015-01-15 09:53:54 -05:00
Brad King 1720869a7e Merge topic 'FindRuby-fix-version'
802d0aa0 FindRuby: Fix output check in _RUBY_CONFIG_VAR
2015-01-15 09:53:52 -05:00
Brad King 49bfaf2bda Merge topic 'FindRuby-zero-version'
dd5d2eb1 FindRuby: fix selection of version x.0 (#15345)
2015-01-15 09:53:49 -05:00
Brad King 101a62aacb Merge topic 'revert-feature_record_msvc'
4ce110bb Tests: Revert workaround for COMPILE_FEATURES genex bug
0b7e7e27 Revert topic 'feature_record_msvc'
2015-01-15 09:53:47 -05:00
Stephen Kelly 1f085e11e4 OS X: Resolve compiler in /usr/bin to that reported by Xcode xcrun
The compiler in the PATH on mac is a stub for a different delegate
depending on the environment.  Rather than requiring xcode-select to
change the used Xcode globally, users should be able to choose the
compiler per-session.  That is possible with the DEVELOPER_DIR
environment variable.

However, the environment can change between running CMake and invoking
the build.  In such cases, CMake prefers to record the relevant paths
from the environment and use them when invoking the build.  That is not
currently done for the compilers on APPLE, so the compiler used is not
the one reported when running cmake:

 $ DEVELOPER_DIR=/Applications/Xcode2.app/Contents/Developer/ cc --version
 Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
 Target: x86_64-apple-darwin13.4.0
 Thread model: posix

 $ DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/ cc --version
 Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
 Target: x86_64-apple-darwin13.4.0
 Thread model: posix

Update that now by querying Xcode for the correct compiler path if
the compiler located by ordinary means is located in /usr/bin.
2015-01-14 15:26:53 -05:00
Stephen Kelly 85d3173590 CMakeDetermineCompiler: Factor out xcrun invocation into a macro
This will allow it to be re-used in multiple code paths later.
2015-01-14 15:26:26 -05:00
Brad King 0b7e7e277c Revert topic 'feature_record_msvc'
Revert commits:

 2d738ce3 Help: Add notes for topic 'feature_record_msvc'
 f73718c9 Features: Enable writing of MSVC compiler feature header.
 64c30bdc Features: Record for MSVC C++ 2015 and MSVC C 2010-2015.
 225c0ef8 Features: Record for MSVC 2010-2013.

This topic was merged to master prematurely, so remove it.
2015-01-14 13:35:58 -05:00
Ben Boeckel 68857ccd82 FindMPI: handle trailing slash from $MSMPI_BIN
When installing, MSMPI puts a trailing backslash in the MSMPI_BIN
environment variable. This causes trouble when concatenating in CMake
since the list separator is now escaped and no longer a list separator
due to the trailing backslash. Instead, use file(TO_CMAKE_PATH) to make
the path CMake-friendly.
2015-01-14 10:19:06 -05:00
Sergey Nikulov 4048f7cde0 FindBoost: Add latest Boost version 1.57.0 and next milestone 1.58.0 2015-01-13 08:59:13 -05:00
Frank Park 546906243d FindGit: Search in 'GitHub for Windows' user directory 2015-01-13 08:54:31 -05:00
David Coppa dd5d2eb156 FindRuby: fix selection of version x.0 (#15345)
When "Ruby_FIND_VERSION_MINOR" is 0, the "if(Ruby_FIND_VERSION_MAJOR AND
Ruby_FIND_VERSION_MINOR)" check evaluated to false.
2015-01-12 19:28:02 +01:00
Brad King c59cf4f96c Merge topic 'Apple-GNU-compiler-features'
00f66a04 Record compile features for GNU on Apple.
2015-01-12 08:57:54 -05:00
Brad King af0ee41955 Merge topic 'xcode-ios-compiler-id'
7b7209f6 Xcode: Do not require code signing for compiler id (#15214)
2015-01-12 08:57:50 -05:00
Brad King 7f5b4940e1 Merge topic 'FindLATEX-components'
89e08de8 FindLATEX: Add components for XeLaTeX and LuaLaTeX
c32f6919 FindLATEX: Add components Biber and xindy
222ee2c0 FindLATEX: Add components PDFtoPS and HTLATEX
07a3f9ad FindLATEX: Add components handling
2015-01-12 08:57:47 -05:00
Brad King 63412a85e0 Merge topic 'FindOpenSSL-use-header-version'
99b13820 FindOpenSSL: Always extract version from detected header (#15075)
2015-01-12 08:57:42 -05:00
Brad King 7b7209f635 Xcode: Do not require code signing for compiler id (#15214)
The approach in commit v3.1.0-rc1~1^2 (Xcode: Fix compiler id detection
when code signing is required, 2014-10-22) still requires a code signing
key when targeting a real device.  Instead set CODE_SIGNING_REQUIRED to
"NO" to tell Xcode not to sign at all.  Drop the corresponding setting
of the code signing identity.
2015-01-11 16:50:39 -05:00
Christoph Grüninger 89e08de8c2 FindLATEX: Add components for XeLaTeX and LuaLaTeX 2015-01-11 15:42:12 -05:00
Christoph Grüninger c32f691944 FindLATEX: Add components Biber and xindy 2015-01-11 15:41:37 -05:00
Christoph Grüninger 222ee2c059 FindLATEX: Add components PDFtoPS and HTLATEX 2015-01-11 15:41:06 -05:00
Aku Kotkavuo 99b1382071 FindOpenSSL: Always extract version from detected header (#15075)
Do not use the _OPENSSL_VERSION computed by pkg-config because
the user may change OPENSSL_INCLUDE_DIR.
2015-01-11 15:32:55 -05:00
Brad King 16d68daccb Merge topic 'linux-XL-fortran'
4729547a XL: Fix link flags for executables on Linux with XL compilers
2015-01-11 14:58:34 -05:00
Evangelos Foutras 802d0aa0b0 FindRuby: Fix output check in _RUBY_CONFIG_VAR
Since commit v2.8.8~173^2 (FindRuby: clean up querying variables from
Ruby, 2012-02-17) we query RbConfig::CONFIG first and, if the command
fails or its output equates to a false constant, then fall back to
querying Config::CONFIG.

Due to the above, an error condition exists with Ruby 2.2.0; when
querying RbConfig::CONFIG['TEENY'], the output of '0' will be discarded
since it matches the false constant '0'.

In previous versions this wasn't a problem, but Ruby 2.2 has completely
removed Config::CONFIG. This causes RUBY_VERSION_PATCH to be set to an
empty string and the Ruby version to be detected as '2.2.' (instead of
'2.2.0').

Fix the output check to explicitly look for an empty string before using
the fallback query method. (Someone more familiar with Ruby might be
able to deem the fallback as unnecessary and fully remove it.)
2015-01-11 14:49:51 -05:00
Stephen Kelly 00f66a0451 Record compile features for GNU on Apple.
Tested with GNU 4.8 binary (bottle) from homebrew, and assumed to work
with the others.
2015-01-11 18:34:25 +01:00
Brad King 56324568cf Merge topic 'FindCUDA.cmake/UseCMAKE_CXX_FLAGS_separableCompilation'
b4e54f9b FindCUDA: Add relevant CMAKE_{C,CXX}_FLAGS for separable compilation
2015-01-11 12:00:28 -05:00
Brad King 775fb2e0b0 Merge topic 'feature_record_msvc'
2d738ce3 Help: Add notes for topic 'feature_record_msvc'
f73718c9 Features: Enable writing of MSVC compiler feature header.
64c30bdc Features: Record for MSVC C++ 2015 and MSVC C 2010-2015.
225c0ef8 Features: Record for MSVC 2010-2013.
2015-01-11 12:00:24 -05:00
Robert Maynard f73718c9b8 Features: Enable writing of MSVC compiler feature header.
Notes:
VS2015 and above are the only MSVC versions to support cxx_final, so remove
usages from the tests, and instead only test for cxx_override.

VS2012 and above to conform to cxx_decltype_incomplete_return_types
proposal, but without support for auto return types the dcl.type.simple
example in the proposal doesn't compile.

VS2013 and above to conform to the updated cxx_contextual_conversions proposal,
but VS2010 and above pass the test.

Compilers such as MSVC have no explicit flags to enable C++11 mode,
it just is always on. So only run the link tests with compilers that require
a flag to specify the language version.
2015-01-11 11:32:36 -05:00
Stephen Kelly 3ad893b5c2 Features: Record for historical Xcode clang versions. 2015-01-11 16:52:27 +01:00
Stephen Kelly 98965fb12d Features: Record dialect flags for AppleClang 4.0+. 2015-01-11 16:52:05 +01:00
Robert Maynard 64c30bdc48 Features: Record for MSVC C++ 2015 and MSVC C 2010-2015.
Initializer lists are only properly supported in 2015 and above.
Previous Visual Studio releases said they supported initializer lists
but silently produced bad code.
2015-01-11 16:47:58 +01:00
Stephen Kelly 225c0ef88b Features: Record for MSVC 2010-2013. 2015-01-11 16:47:58 +01:00
Brad King 4729547a5b XL: Fix link flags for executables on Linux with XL compilers
Use "-Wl,-export-dynamic" with XL to match the "-rdynamic" flag used
with GNU-like compilers.
2015-01-10 12:03:19 -05:00
Brad King 7ecbade887 Merge topic 'WCDH-thread_local-portability'
998e9c10 WCDH: Add feature portability for thread_local.
2015-01-08 15:04:25 -05:00
Brad King 44b2dcb2e0 Merge topic 'record-GNU-5-features'
998ed4ca Features: Record cxx_variable_templates for GNU 5.0.
2015-01-08 14:58:03 -05:00
Brad King f1b0340d6c Merge topic 'FindSDL-quoting'
67516fb5 FindSDL: Allow if() to dereference SDL_INCLUDE_DIR for matching
2015-01-08 14:57:57 -05:00
Brad King 038caf38b2 Merge topic 'find-msmpi'
ab4d1d07 FindMPI: MSMPI changed the subdirectories it uses
82724394 FindMPI: add more search paths for MSMPI
2015-01-08 14:57:55 -05:00
Brad King 35ea14050e Merge topic 'FindIce-CMP0054'
cbaf0802 FindIce: Port to work with CMP0054 NEW behavior
2015-01-08 14:57:53 -05:00
Brad King 04e880fd33 Merge topic 'FindCUDA-cross'
d5846eb1 FindCUDA: Do not assume CMAKE_SYSTEM_PROCESSOR is set
2015-01-08 14:57:47 -05:00
Brad King ac16b88e50 Merge branch 'FindSDL-quoting' into release 2015-01-08 14:48:33 -05:00
Rolf Eike Beer 67516fb57e FindSDL: Allow if() to dereference SDL_INCLUDE_DIR for matching
Otherwise the syntax is incorrect when the variable is empty.
2015-01-08 14:47:39 -05:00
Brad King f00e44a9f7 Merge branch 'FindCUDA-cross' into release 2015-01-08 14:43:53 -05:00
Brad King 13a2154c38 Merge branch 'FindIce-CMP0054' into release 2015-01-08 14:43:42 -05:00
Mark Abraham d5846eb153 FindCUDA: Do not assume CMAKE_SYSTEM_PROCESSOR is set
CMAKE_SYSTEM_PROCESSOR is not guaranteed to be defined (per
http://www.cmake.org/Wiki/CMake_Cross_Compiling), and when cross
compiling where it happens to be undefined, this module was broken.

Reviewed-by: Rolf Eike Beer <eike@sf-mail.de>
2015-01-08 14:39:16 -05:00