Commit Graph

5642 Commits

Author SHA1 Message Date
Brad King ddca664a08 Merge branch 'xcode-ios-compiler-id' into release 2015-01-12 09:01:18 -05: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
Rolf Eike Beer cbaf0802a5 FindIce: Port to work with CMP0054 NEW behavior
Do not quote if() arguments meant to test variable definitions.
2015-01-08 14:13:48 -05:00
James Bigler b4e54f9b8c FindCUDA: Add relevant CMAKE_{C,CXX}_FLAGS for separable compilation
Previously only the CMAKE_{C,CXX}_FLAGS_<CONFIG> flags were inspected
for relevant flags when compiling the intermediate link file.  We need
to also consider the configuration agnostic flags, CMAKE_{C,CXX}_FLAGS
as well.
2015-01-06 16:28:05 -07:00
Ben Boeckel ab4d1d07e4 FindMPI: MSMPI changed the subdirectories it uses 2015-01-06 12:59:07 -05:00
Ben Boeckel 827243942c FindMPI: add more search paths for MSMPI
Also comment what the various search paths are for.
2015-01-06 12:58:07 -05:00
Stephen Kelly 998ed4ca0a Features: Record cxx_variable_templates for GNU 5.0. 2015-01-01 22:00:49 +01:00
Stephen Kelly 998e9c1094 WCDH: Add feature portability for thread_local.
AppleClang does not support the cxx_thread_local feature, even
though it is based on a Clang version which does support the
feature.

 http://stackoverflow.com/a/23850891/2428389

A possible reason for that is that thread_local might be used as
a variable in existing Apple SDK headers.

Extend the WriteCompilerDetectionHeader module to generate a define
for that feature with portability fallbacks.  For the avoidance of
making it easy to write code which looks correct but which has odd
runtime behavior, don't set the define symbol at all if no
equivalent keyword is known.
2015-01-01 18:20:10 +01:00
Brad King be1109d811 Oracle/Sun: Fix Fortran preprocessor rule generation
The SunPro Fortran compiler uses "-F" instead of "-E" to request
preprocessing.  The output does not go to stdout so use "-o" to
specify the output file.

This fixes the guess originally made by commit b6b37e30 (Makefile: Add
assembly and preprocessed targets for Fortran, 2014-11-05).
2014-12-23 10:15:27 -05:00
Christoph Grüninger 07a3f9ad17 FindLATEX: Add components handling 2014-12-23 09:11:31 -05:00
Brad King 3b3da0d39e Merge topic 'CPackComponent-docs-fix'
64016393 Help: Small fixes in CPackComponent documentation
2014-12-23 08:53:54 -05:00
Brad King 396a008ff0 Merge topic 'AppleClang-5.1-features'
bb83cdaa Help: Add notes for topic 'AppleClang-5.1-features'
bd6b42c1 Features: Record for AppleClang 5.1
b341799e Tests: Fix RunCMake.CompileFeatures test NonValidTarget2 case
2014-12-23 08:53:52 -05:00
Daniele E. Domenichelli 6401639310 Help: Small fixes in CPackComponent documentation 2014-12-22 17:23:46 +01:00
Stephen Kelly bd6b42c186 Features: Record for AppleClang 5.1
Apple's Clang 5.1 already supports most of the C and C++ features CMake
enumerates.
2014-12-22 10:44:41 -05:00
Kelly Thompson 1b28e3b28b FindGSL: Add module to find the GNU Scientific Library 2014-12-17 10:59:48 -05:00
Brad King 1b3ab3318d Merge topic 'cmp0054-warnings-extproj'
a300d0ff ExternalProject: avoid CMP0054 warnings
2014-12-15 11:06:57 -05:00
Brad King b9e0babea9 Merge topic 'extproj-extra-newlines'
480e6029 ExternalProject: remove extra newlines from log messages
2014-12-15 11:06:54 -05:00
Brad King 4d2c629045 Merge topic 'FindMPI-parse-Xlinker-flags'
a0792c48 FindMPI: Extract -Xlinker options
2014-12-15 11:06:42 -05:00
Ben Boeckel 480e60298f ExternalProject: remove extra newlines from log messages
message() already adds a newline.
2014-12-12 18:42:33 -05:00
Ben Boeckel a300d0ff0f ExternalProject: avoid CMP0054 warnings
Found where ${command} is "make" which is a local variable.
2014-12-12 18:30:00 -05:00
Brad King 3cc84d18d4 Merge topic 'find-msmpi'
17a846ac FindMPI: search for msmpi's mpiexec as well
2014-12-12 11:16:06 -05:00
Brad King f6c8d3d82f Merge topic 'FindQt4-fix-major-version-mismatch'
009c1865 FindQt4: Fix handling of QT_VERSION_MAJOR mismatch
2014-12-12 11:16:02 -05:00
Alin Marin Elena a0792c4851 FindMPI: Extract -Xlinker options
Extend the regex that mathces -Wl, linker options to match -Xlinker too.
These are used by Intel MPI and perhaps others.
2014-12-12 09:53:43 -05:00
Ben Boeckel 17a846ac3e FindMPI: search for msmpi's mpiexec as well 2014-12-11 17:26:06 -05:00
Brad King 66f587e7dc Merge topic 'FindLATEX-use-FPHSA'
e0104063 FindLATEX: Use FPHSA to report status in standard way
2014-12-09 10:54:56 -05:00
Daniel Scharrer 009c1865dc FindQt4: Fix handling of QT_VERSION_MAJOR mismatch
Fix capitalization of Qt4_FOUND variable when setting it to false in
this case.  This caused find_package(Qt4) to appear successful when it
was not.  Note that the legacy QT4_FOUND variable is unconditionally
overwritten at the end of the file with the value of Qt4_FOUND.
2014-12-09 10:43:02 -05:00
Brad King 413ce02895 Merge topic 'ExternalProject_TEST_EXCLUDE_FROM_MAIN'
636f0c1d ExternalProject: Add TEST_EXCLUDE_FROM_MAIN option
2014-12-08 09:07:10 -05:00
Brad King c2b8874289 Merge topic 'FindMPI-Intel-5.0.1'
7626c8dc FindMPI: Workaround Intel MPI 5.0.1 exit code problem (#15182)
f5ede300 FindMPI: Factor out compiler wrapper execution into helper
2014-12-08 09:07:06 -05:00
Brad King 90070a65d2 Merge topic 'try_compile-link-flags'
88eb5824 try_compile: Pass linker flags into test project (#14066)
a4f9b6f0 CMakeDetermineCompilerABI: Use normal linker flags in ABI project
2014-12-08 09:07:04 -05:00
Christoph Grüninger e01040636d FindLATEX: Use FPHSA to report status in standard way
Otherwise LaTeX was marked as not found in the summary.
Also revise the documentation.
2014-12-05 23:42:48 +01:00
Brad King fad59f2dd1 Merge topic 'xerces-rename'
27141eed Modules: Rename FindXerces to FindXercesC
2014-12-05 14:02:11 -05:00
Brad King e2c431dc64 Merge branch 'xerces-rename' into release 2014-12-05 13:32:50 -05:00
Daniele E. Domenichelli 636f0c1d4f ExternalProject: Add TEST_EXCLUDE_FROM_MAIN option
If this option is enabled, the test step is created with the
EXCLUDE_FROM_MAIN option, and if TEST_BEFORE_INSTALL is enabled, the
install step does not depend on the test step.

This means that the test step is never executed, unless the test target
is explicitly created by calling ExternalProject_Add_StepTarget, or by
passing it with the STEP_TARGETS option, or with the EP_STEP_TARGETS
directory property.
2014-12-05 10:24:16 +01:00
Alin Marin Elena 7626c8dcf6 FindMPI: Workaround Intel MPI 5.0.1 exit code problem (#15182)
This MPI compiler may return zero even in some error cases.  Check the
output to catch such cases.

Suggested-by: Kelly Thompson <kgt@lanl.gov>
2014-12-04 14:15:46 -05:00
Alin Marin Elena f5ede30006 FindMPI: Factor out compiler wrapper execution into helper 2014-12-04 14:12:34 -05:00
Brad King 27141eede7 Modules: Rename FindXerces to FindXercesC
The FindXerces module was added in commit v3.1.0-rc1~155^2 (FindXerces:
New module to find Apache Xerces-C++, 2014-08-17).  However, there are
two implementations of Xerces, one in C++:

  http://xerces.apache.org/xerces-c/

and one in Java:

  http://xerces.apache.org/xerces-j/

Rename FindXerces to FindXercesC to clarify that it is about the C++
implementation.

While at it, add the missing CMake 3.1 release note about this module.

Suggested-by: Erik Sjölund <erik.sjolund@gmail.com>
2014-12-04 10:41:26 -05:00
Brad King a4f9b6f0ca CMakeDetermineCompilerABI: Use normal linker flags in ABI project
When compiling the ABI detection test project, do not override
CMAKE_EXE_LINKER_FLAGS completely.  The normally selected value of this
variable may influence how the link is done and may be needed to be
representative of how the calling project will be built.  Instead pass a
variable that try_compile will reference as additional flags.  Leave
this behavior of try_compile undocumented for now.
2014-12-03 14:53:14 -05:00
Christoph Grüninger ff50046b78 FindUnixCommand: Use FPHSA to report status in standard way
Otherwise the UnixCommands were marked as not found in the summary.
Also revise the documentation.
2014-12-03 10:04:59 -05:00
Brad King beb75b378f Merge topic 'FindPythonInterp-Fix-1.4'
4c8c3ba9 FindPythonInterp: fix version component variables for Python 1.4 (#15275)
2014-12-03 10:01:58 -05:00
Brad King eccc5e34cd Merge topic 'CPackIFW-doc-typos'
4c07a00f CPackIFW: Correction of the module documentation
2014-12-03 10:01:56 -05:00
Brad King cf63779f35 Merge topic 'FindOpenGL-revert-imported-targets'
02e34de2 FindOpenGL: Revert support for imported targets (#15267)
2014-12-03 10:01:42 -05:00
Brad King 6c8d573b28 Merge branch 'CPackIFW-doc-typos' into release 2014-12-03 09:32:27 -05:00
Konstantin Podsvirov 4c07a00f07 CPackIFW: Correction of the module documentation 2014-12-02 15:52:07 -05:00
Brad King f3ae286cc0 Merge branch 'FindOpenGL-revert-imported-targets' into release 2014-12-02 10:23:01 -05:00
Brad King 8c9ff4f1a6 Merge branch 'FindPythonInterp-Fix-1.4' into release 2014-12-02 10:22:50 -05:00
Brad King c3c251ce0a Merge topic 'FindOpenGL-no-X11'
d051cbda FindOpenGL: Drop explicit dependency on X11 (#15268)
2014-12-02 10:21:22 -05:00
Brad King 3e33feaae2 Merge topic 'fix-implicit-lib-logging'
20bf6971 CMakeParseImplicitLinkInfo: Fix implicit library logging
2014-12-02 10:21:19 -05:00
Rolf Eike Beer 4c8c3ba912 FindPythonInterp: fix version component variables for Python 1.4 (#15275)
This bug was introduced in "FindPythonInterp: rework the version detection"
7d6db93de9.
2014-12-02 15:36:59 +01:00
Brad King 02e34de2b6 FindOpenGL: Revert support for imported targets (#15267)
Revert the feature added by commit v3.1.0-rc1~420^2~2 (FindOpenGL:
Provide imported targets for GL and GLU, 2014-05-31).  Unfortunately it
does not work on Windows because the full path to each library file is
not actually known.  The IMPORTED_LOCATION of an imported target must be
a full path, but OPENGL_gl_LIBRARY is just 'opengl32' on Windows because
the actual library file is in some implicit link directory that we may
know know.

More infrastructure will be needed in CMake to allow a name-only
imported library.  Until that exists, we will not be able to provide
imported targets in FindOpenGL.
2014-12-01 16:01:09 -05:00
Brad King 9ea39ee04b Merge branch 'fix-implicit-lib-logging' into release 2014-12-01 13:59:36 -05:00
Brad King 20bf6971f5 CMakeParseImplicitLinkInfo: Fix implicit library logging
In commit v3.1.0-rc1~640^2~5 (Clean up usage of if(... MATCHES regex)
followed string(REGEX REPLACE regex), 2014-04-06) we accidentally broke
logging of the implicit library detection.  Restore use of the
intermediate 'lib' variable so that the log message is constructed
properly.

Reported-by: Bill Somerville <bill@classdesign.com>
2014-12-01 12:58:33 -05:00
Brad King d051cbda5d FindOpenGL: Drop explicit dependency on X11 (#15268)
In commit 079e8469ab (... OpenGL always needs X11 on Unix, 2002-09-05)
the FindOpenGL module was taught to search for X11 as a dependency of
the OpenGL library.  This was done without a detailed explanation, and
the dependency should not be explicitly needed because OpenGL headers
should not expose applications to X11 APIs directly.

Unfortunately the only way to know if anything legitimately depends on
this behavior (perhaps in static library cases) is to simply remove it
and wait for issues to be reported.  If so, then we can add some kind of
compatibility setting for this later.  Add a release note to draw
attention to this change.

Reported-by: Dainius "GreatEmerald" Masiliūnas <pastas4@gmail.com>
2014-12-01 11:05:29 -05:00
Hannes Mezger be9bec5df2 FindOpenSSL: Report crypto and ssl libraries separately
Some applications only need the OpenSSL crypto library and want to avoid
linking against the SSL library.  Set OPENSSL_CRYPTO_LIBRARY and
OPENSSL_SSL_LIBRARY in the code paths that do not need to find them
separately, and document them publicly.  This allows applications to be
more specific when linking against OpenSSL.
2014-12-01 09:41:46 -05:00
Brad King 75a9f2fb6b Merge topic 'FindwxWidgets-new-versions'
75dee2f2 FindwxWidgets: Add versions 3.0.1 and 3.0.2
2014-12-01 08:57:19 -05:00
Brad King 6b93953615 Merge topic 'WCDH-multi-file'
4cf5179c WCDH: Make it possible to generate multiple files.
2014-11-26 10:37:49 -05:00
Brad King 5a611495c2 Merge topic 'C-features-Wundef'
d0af0fae WCDH: Make the header -Wundef safe for the C language.
2014-11-26 10:37:46 -05:00
Brad King b3d9702cb8 Merge branch 'FindwxWidgets-new-versions' into release 2014-11-26 10:33:59 -05:00
Brad King d2f2a2e226 Merge branch 'C-features-Wundef' into release 2014-11-26 10:33:54 -05:00
Christopher Gittner 75dee2f2c2 FindwxWidgets: Add versions 3.0.1 and 3.0.2 2014-11-26 10:15:53 -05:00
Brad King e993c384d9 Merge topic 'GetPrerequisites-expansion'
d1903de8 GetPrerequisites: join if() clauses
c9e32b0b GetPrerequisites: remove needless variable dereferencing
2014-11-25 10:18:54 -05:00
Brad King 623a06a6f3 Merge topic 'fix-WCDH-docs'
0db3db41 WCDH: Don't imply that MSVC is supported by the module.
2014-11-25 10:18:47 -05:00
Brad King 47f1020b54 Merge topic 'fix-GNU-CXX-dialect-versions'
c03c184b Features: Record C++11 dialect switch only for GNU 4.7 and later.
2014-11-25 10:18:42 -05:00
Brad King cbec5c0445 Merge topic 'default-lang-dialect-for-master'
f327a9fd Merge branch 'default-lang-dialect' into step2
36bb100e Fix the test for running the CxxDialog unit test.
a3d0ae17 Features: Fix the default C dialect for Clang and GNU.
49e2b689 Features: Fix references to CXX compiler version in Clang-C.cmake.
7565ab2c Features: Test the CXX compiler only if it has features.
2014-11-25 10:18:37 -05:00
Brad King 0ff35425d7 Merge topic 'fix-openmp-fortran'
7d633ebf FindOpenMP: Use fixed form Fortran test program
2014-11-25 10:18:33 -05:00
Brad King 61a987c229 Merge topic 'CPackRPM-cleanup-component-vars'
51a60973 CPackRPM: Unset temporary component variables before re-use
2014-11-25 10:18:19 -05:00
Brad King 0f19208076 Merge topic 'custom-command-byproducts'
557aef0b ExternalProject: Add options to specify BYPRODUCTS (#14963)
e15a7075 Add an option for explicit BYPRODUCTS of custom commands (#14963)
2014-11-25 10:18:16 -05:00
Rolf Eike Beer d1903de8c5 GetPrerequisites: join if() clauses
These all test the same variable for different values, so only one of them can
ever be true. This also allows to completely remove one variable that only
flagged if one of the conditions matched.
2014-11-25 10:13:20 -05:00
Rolf Eike Beer c9e32b0b12 GetPrerequisites: remove needless variable dereferencing 2014-11-25 10:13:20 -05:00
Brad King e002f0605d Merge branch 'fix-WCDH-docs' into release 2014-11-25 10:10:50 -05:00
Brad King c66f697a8b Merge branch 'fix-GNU-CXX-dialect-versions' into release 2014-11-25 10:10:46 -05:00
Brad King f8099e1c37 Merge branch 'default-lang-dialect' into release 2014-11-25 10:07:34 -05:00
Stephen Kelly d0af0faefb WCDH: Make the header -Wundef safe for the C language.
The __STDC_VERSION__ macro may be defined or not depending on the
implementation dialect of C.  Test that it is defined before testing
its value.

The CXX tests do not need such a change because they define __cplusplus
in all dialects.
2014-11-25 14:44:21 +01:00
Stephen Kelly 4cf5179c77 WCDH: Make it possible to generate multiple files.
Extend the write_compiler_detection_header interface to allow
specifying a location for supplementary files, and getting the
list of resulting files as a variable.
2014-11-24 21:54:41 +01:00
Stephen Kelly 0db3db41d4 WCDH: Don't imply that MSVC is supported by the module.
Remove the mention of it from the docs.
2014-11-23 10:12:49 +01:00
Stephen Kelly f327a9fd26 Merge branch 'default-lang-dialect' into step2
Conflicts:
	Modules/Compiler/Clang-C.cmake
2014-11-20 22:11:56 +01:00
Stephen Kelly a3d0ae1758 Features: Fix the default C dialect for Clang and GNU.
Clang 3.4 uses C99 by default, and Clang 3.6 uses C11 by default:

 http://thread.gmane.org/gmane.comp.compilers.clang.devel/39379

GNU 4.9 uses C90 by default, and GNU 5.0 uses C11 by default:

 https://gcc.gnu.org/gcc-5/changes.html

Test that the default compiler settings result in the expected dialect
macros being defined for both C and CXX.  Remove the unused main.c
file from the CompileFeatures unit test.
2014-11-20 18:24:59 +01:00
Brad King 64678cbc0a Merge branch 'fix-openmp-fortran' into release 2014-11-20 09:00:33 -05:00
Brad King 3a20cef3d7 Merge topic 'fix-CMP0054-MSVC'
fa1a066a Merge branch 'backport-fix-CMP0054-MSVC' into fix-CMP0054-MSVC
4d52cd36 Avoid if() quoted auto-dereference when checking for "MSVC"
543c4304 Avoid if() quoted auto-dereference when checking for "MSVC"
2014-11-20 08:57:17 -05:00
Brad King 3749ad49e3 Merge topic 'FindJava-no-osx-stub'
dd378258 FindJava: Do not accept OS X stub 'java' as Java
2014-11-20 08:57:07 -05:00
Nils Gladitz 7d633ebfa0 FindOpenMP: Use fixed form Fortran test program
This prevents the test program from failing when build as Fortran 77.

Suggested-by: Alin Marin Elena <alinm.elena@gmail.com>
2014-11-20 14:54:11 +01:00
Brad King b1e7fe9e8d Merge branch 'backport-fix-CMP0054-MSVC' into release 2014-11-20 08:53:47 -05:00
Fraser Hutchison 4d52cd36ad Avoid if() quoted auto-dereference when checking for "MSVC"
When testing CMAKE_<LANG>_COMPILER_ID values against "MSVC", do not
allow the definition of the "MSVC" variable to be expanded.
2014-11-19 16:24:54 -05:00
Fraser Hutchison 543c4304bb Avoid if() quoted auto-dereference when checking for "MSVC"
When testing CMAKE_<LANG>_COMPILER_ID values against "MSVC", do not
allow the definition of the "MSVC" variable to be expanded.
2014-11-19 16:22:56 -05:00
Brad King 5ee198d76e Merge branch 'FindJava-no-osx-stub' into release 2014-11-19 16:15:43 -05:00
Brad King dd378258f1 FindJava: Do not accept OS X stub 'java' as Java
OS X provides a stub 'java' to inform callers that Java is not present.
When checking the 'java -version' output, look for such a message and if
found pretend 'java' was not found.

Suggested-by: Sean McBride <sean@rogue-research.com>
2014-11-19 16:14:56 -05:00
Stephen Kelly c03c184be0 Features: Record C++11 dialect switch only for GNU 4.7 and later.
Previous versions of GNU are not currently supported by this
CMake feature.
2014-11-19 09:39:44 +01:00
Stephen Kelly 49e2b689a8 Features: Fix references to CXX compiler version in Clang-C.cmake. 2014-11-19 00:42:51 +01:00
Gauthier Lamaison 51a60973eb CPackRPM: Unset temporary component variables before re-use
Improve the fix from commit v2.8.9~136^2 (CPackRPM: avoid leakage of RPM
directive from one component to another, 2012-06-05) to clean up more
temporary variables.

Reviewed-by: Domen Vrankar <domen.vrankar@gmail.com>
2014-11-18 09:25:10 -05:00
Brad King ecdea34fcc Merge topic 'FindCurses-no-cur_colr'
d931ba60 FindCurses: Drop search for deprecated HP-UX cur_colr library
2014-11-18 09:12:28 -05:00
Ådne Hovda d931ba6021 FindCurses: Drop search for deprecated HP-UX cur_colr library
Since commit b22e2de8 (HPUX support, 2001-11-05) the FindCurses
module searches for a 'cur_colr' library, but that is not needed
anymore.  AFAICT, the cur_colr package was introduced in HP-UX 10.00 and
marked as deprecated in 10.30 by X/OPEN curses (which replaced the even
older HP curses in 10.10).

In order to use cur_colr after 10.10 you should use the
/usr/include/curses_colr when compiling.  Since FindCurses doesn't even
search that path the headers cannot possibly match out of the box.  If
users want cur_colr they can set the cache entries by hand.

There is no 64-bit version of cur_colr in 11.11PA and it will be gone
completely in 11.31PA:

  http://h21007.www2.hp.com/portal/download/files/unprot/STK/HPUX_STK/impacts/i964.html

It is simplest to drop cur_colr support from FindCurses since it was
only partially implemented anyway.
2014-11-17 10:32:52 -05:00
Brad King 557aef0b94 ExternalProject: Add options to specify BYPRODUCTS (#14963)
The external project's build process may generate byproducts on which
other rules in the driving project's build later depend.  Provide a way
for the driving project to specify what byproducts it expects to be made
available by the custom commands that drive the external project.
2014-11-17 09:36:42 -05:00
Rolf Eike Beer 5cc8169bf9 CPackRPM: remove unneeded string length calculation
This wants just the rest of the string, which can be achieved by passing -1 as
remainder length.
2014-11-14 18:01:10 +01:00
Brad King a9a040e169 Merge topic 'no-AppleClang-C-features'
ded30405 Features: Don't record for AppleClang
2014-11-13 10:08:37 -05:00
Brad King 307570aee1 Merge topic 'add-FindIntl'
c5e797db FindIntl: New module to find Gettext libintl
2014-11-13 10:08:34 -05:00
Brad King f4e652b563 Merge topic 'compile-features-refactor'
32b91b9e Features: Run GNU feature tests with std=c++14 when available.
82c283f9 Features: Use the correct dialect flag when recording features.
b18155b7 Features: Reorder the GNU C dialect feature tests
e68d5c60 Features: Split the Clang testable features to a separate file.
2014-11-13 10:08:29 -05:00
Brad King 2c71fe6d62 Merge topic 'ExternalProject_UPDATE_DISCONNECTED'
3c497f11 Help: Add notes for topic 'ExternalProject_UPDATE_DISCONNECTED'
aba5cec6 ExternalProject: Add unit tests for UPDATE_DISCONNECTED
3f606fa7 ExternalProject: Add UPDATE_DISCONNECTED option
c0b749cf ExternalProject: Always add a command to a step
2014-11-13 10:08:22 -05:00
Stephen Kelly ded30405b2 Features: Don't record for AppleClang
Features are currently recorded accidentally for all versions of
AppleClang > 3.4 (I have no idea how that relates to upstream
Clang). Presumably that version has the features which are
accidentally recorded, but in the future features will be
recorded initially for only AppleClang >= 5.1, which would
appear as a feature regression.

Commit v3.1.0-rc1~635^2~11 (Don't load Clang-CXX from
AppleClang-CXX., 2013-11-11) ajusted the logic for the CXX
language.  Make a similar change for the C language.
2014-11-12 23:20:36 +01:00
Stephen Kelly 32b91b9e01 Features: Run GNU feature tests with std=c++14 when available. 2014-11-12 22:59:17 +01:00
Stephen Kelly 82c283f914 Features: Use the correct dialect flag when recording features.
Avoid using -std=c++1y for compilers which support -std=c++14, for
example.
2014-11-12 22:59:17 +01:00
Stephen Kelly b18155b788 Features: Reorder the GNU C dialect feature tests
This doesn't make a difference, but the consistency with other files
is easier to reason about.
2014-11-12 22:59:14 +01:00
Stephen Kelly e68d5c6000 Features: Split the Clang testable features to a separate file.
These tests can be shared with the AppleClang compile feature tests.
2014-11-11 23:01:07 +01:00
Roger Leigh c5e797dbb8 FindIntl: New module to find Gettext libintl
Add support for Sun/Uniforum/GNU gettext libintl.  This belongs in CMake
rather than upstream because:

* There are multiple upstreams (Sun, GNU).

* It may or may not be in the glibc C library depending
  upon the platform and build options used.

Although we already have a FindGettext module, that is for the tools.
This module is for the library, and is independent because it's
perfectly OK to use libintl without the gettext tools (and vice versa),
and they might not all be found.  Add cross references between the two
modules in notes to make the relationship clearer.
2014-11-11 13:02:16 -05:00
Brad King 8049114bac Merge topic 'ExternalProject-check-hash-before-download'
ee7405a6 ExternalProject: Restore logic to not download already-existing file
2014-11-11 12:45:57 -05:00
Brad King 41b4fb997b Merge branch 'ExternalProject-check-hash-before-download' into release 2014-11-10 11:29:21 -05:00
Brad King ee7405a6db ExternalProject: Restore logic to not download already-existing file
The change in commit v3.1.0-rc1~85^2 (ExternalProject: Fix download
retry logic, 2014-09-13) dropped the file(DOWNLOAD) EXPECTED_HASH
argument.  This prevents file(DOWNLOAD) from skipping the download if
the output file already exists with the proper hash.  Restore this check
with explicit code in the download script.

Reported-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2014-11-10 11:26:52 -05:00
Brad King a1f964ef68 Merge topic 'make-fortran-preprocessor-assembly-targets'
b6b37e30 Makefile: Add assembly and preprocessed targets for Fortran
0842b084 Makefile: Refactor checks for lang-specific targets and export compile cmds
2014-11-10 10:43:08 -05:00
Brad King f62e476990 Merge topic 'xcode-ios-compiler-id'
7f89552a Xcode: Fix compiler path detection for iOS tools on Xcode <= 5.0 (#15237)
2014-11-10 10:42:57 -05:00
Tim Gallagher b6b37e3037 Makefile: Add assembly and preprocessed targets for Fortran
Extend the FortranOnly test to cover "make <src>.i" targets.
2014-11-10 10:24:53 -05:00
Brad King a970f7d478 Merge branch 'xcode-ios-compiler-id' into release 2014-11-07 16:48:38 -05:00
Brad King 7f89552a8f Xcode: Fix compiler path detection for iOS tools on Xcode <= 5.0 (#15237)
Since commit v3.1.0-rc1~1^2~1 (Xcode: Fix compiler id detection for iOS
tools, 2014-10-22) our compiler id detection project sets the product
type to 'com.apple.product-type.bundle.unit-test'.  This causes the Ld
command line on which we match the path to the compiler to have a
'CompilerIdC.xctest/' component.  The commit updated our regex to match
this, but placed it before the extra './' component that Xcode 5.0 and
below produce.  Xcode <= 5.0 prints '/./CompilerIdC.xctest/', so switch
the order of the two components in the regex to match it.
2014-11-07 16:29:51 -05:00
Brad King 0f836cb0ef Merge topic 'doc-cleanup-xrefs'
4c8c442d Help: Fix broken cross-references reported by 'nitpicky' option
2014-11-07 11:54:54 -05:00
Brad King 06c3b7a822 Merge branch 'doc-cleanup-xrefs' into release 2014-11-07 11:45:27 -05:00
Brad King 4c8c442d7c Help: Fix broken cross-references reported by 'nitpicky' option
Enable the Sphinx 'nitpicky' option and fix the resulting warnings about
dangling references.
2014-11-07 11:41:21 -05:00
Brad King 70105facd6 Merge topic 'doc-formatting'
f0ca3ef0 Help: Wrap long lines in pre-formatted documentation blocks
2014-11-07 11:08:59 -05:00
Brad King 3dfc856b79 Merge branch 'doc-formatting' into release 2014-11-07 11:02:45 -05:00
Brad King f0ca3ef0a3 Help: Wrap long lines in pre-formatted documentation blocks
Help format the blocks better for display without a wide screen.
2014-11-07 10:59:09 -05:00
Brad King b71399a189 Merge branch 'release-doc-formatting' into release 2014-11-07 10:20:58 -05:00
Brad King 67c4be51a3 Merge branch 'release-doc-formatting' into doc-formatting
Resolve conflict in Modules/ExternalProject.cmake by keeping our side,
which is more completely revised.
2014-11-06 14:52:49 -05:00
Brad King 20c5f4fbd9 Modules: Wrap long lines in pre-formatted documentation blocks
Help format the blocks better for display without a wide screen.
2014-11-06 14:52:26 -05:00
Brad King 6c4aa388a5 FindProtobuf: Cleanup reStructuredText documentation formatting
Fix the markup to make the documentation format properly.
2014-11-06 14:52:24 -05:00