Commit Graph

5008 Commits

Author SHA1 Message Date
Rolf Eike Beer 2622bc3f65 Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
The matches have already been calculated and can simply be taken from
CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very
similar regular expressions.
2014-04-14 18:16:58 +02:00
Brad King 73721c7ce0 CMakeDetermineVSServicePack: Add deprecation diagnostic
Warn project developers at runtime that the module should not be used
anymore.  Issue the diagnostic only when the project requires a new
enough CMake to use the alternative.  Honor the
CMAKE_(ERROR|WARN)_DEPRECATED settings.
2014-04-14 09:31:54 -04:00
Melven Roehrig-Zoellner 856bfe238c FindMPI: Use compiler implicit link dirs for matching language (#14870)
Update the logic added by commit 2f9ad7c6 (Fix FindMPI for the intel
compiler on linux, 2012-03-20) to use the implicit link directories for
the current ${lang} instead of hard-coding C or CXX which may not be
enabled.  This is necessary for Fortran-only projects.
2014-04-11 09:59:48 -04:00
Brad King a6fee73dac Merge topic 'CMakeDetermineVSServicePack-vs-11-update-4'
f0de3f80 CMakeDetermineVSServicePack: Add VS 11 update 4
105658df CMakeDetermineVSServicePack: Match versions more robustly
101515b9 CMakeDetermineVSServicePack: Format documentation
2014-04-11 09:13:16 -04:00
Brad King 893843ce21 Merge topic 'Fortran-pgi-intel-arch'
eb8cb2c6 Fortran: Detect pointer size on Intel archs with PGI (#14870)
2014-04-11 09:13:14 -04:00
Brad King 61ac6d6401 Merge topic 'revert-Android-platform'
4b31f064 Revert "Modules: Add an Andriod platform file"
2014-04-11 09:13:10 -04:00
Brad King 76425a6219 Merge topic 'rc-windres-with-dot'
7147ed5c CMakeRCInformation: Recognize 'windres' tools with '.' in name (#14865)
db924e00 CMakeRCInformation: Do not mention 'Fortran' in documentation
2014-04-11 09:13:09 -04:00
Brad King 0c08da9912 Merge topic 'watcom-link-quoting'
cb9b1e13 Watcom: Use single quote for all file/path items in wlink command
2014-04-11 09:13:07 -04:00
Brad King 1c5871984a Merge branch 'rc-windres-with-dot' into release 2014-04-11 09:12:00 -04:00
Brad King 7147ed5ce4 CMakeRCInformation: Recognize 'windres' tools with '.' in name (#14865)
A 64-bit MinGW windres is named "i686-w64-mingw32.shared-windres".  The
get_filename_component NAME_WE mode may strip the ".shared-windres" part
and cause the result to no longer contain "windres".  Instead, match the
"windres" name in the full CMAKE_RC_COMPILER value first, and use the
get_filename_component code path only for other resource compilers.
2014-04-11 09:10:56 -04:00
Brad King db924e00b4 CMakeRCInformation: Do not mention 'Fortran' in documentation
This module is for the Windows Resource Compiler, not Fortran.
2014-04-11 09:10:56 -04:00
Brad King a2da465b75 Merge branch 'Fortran-pgi-intel-arch' into release 2014-04-10 12:58:45 -04:00
Brad King eb8cb2c6c2 Fortran: Detect pointer size on Intel archs with PGI (#14870)
The PGI compiler does not define __SIZEOF_POINTER__ so use the
__x86_64__ or __i386__ CPU macros to select a pointer size instead.
2014-04-10 12:57:02 -04:00
Brad King 4fd266904c Merge branch 'CMakeDetermineVSServicePack-vs-11-update-4' into release 2014-04-10 12:49:54 -04:00
Brad King f0de3f80bb CMakeDetermineVSServicePack: Add VS 11 update 4 2014-04-10 12:49:14 -04:00
Brad King 105658df02 CMakeDetermineVSServicePack: Match versions more robustly
Use the CMAKE_MATCH_* variables to simplify matching logic.  Match
either 3 or 4 version components.  Do not fail when there are only three
components available.
2014-04-10 12:49:14 -04:00
Brad King 101515b958 CMakeDetermineVSServicePack: Format documentation
Also state explicitly that the module is deprecated.
2014-04-10 12:49:14 -04:00
Stephen Kelly 4b31f0649c Revert "Modules: Add an Andriod platform file"
This reverts commit 77f06b145d.

It may be re-added in the future when the requirements for that
platform are better known and supported by CMake.
2014-04-10 17:34:41 +02:00
Brad King 2a326fa65f Merge topic 'ExternalProject_VCS-quiet'
2dad1c14 ExternalProject: Find VCS packages quietly
2014-04-10 09:53:07 -04:00
Jiri Malak cb9b1e13e4 Watcom: Use single quote for all file/path items in wlink command
Watcom Linker use single quote if necessary for quoting target name,
libraries names and libraries search path.  Object names were already
fixed.
2014-04-08 13:28:54 -04:00
Stephen Kelly 60c0d2dd81 Features: Add cxx_defaulted_move_initializers. 2014-04-08 11:05:58 +02:00
Stephen Kelly c4e672358c Features: Add cxx_long_long_type. 2014-04-08 11:05:58 +02:00
Stephen Kelly dcaafada0e Features: Add cxx_func_identifier. 2014-04-08 11:05:57 +02:00
Stephen Kelly 251a1f02a0 Features: Add cxx_local_type_template_args. 2014-04-08 11:05:57 +02:00
Stephen Kelly 53fe7773e6 Features: Add cxx_extended_friend_declarations. 2014-04-08 11:05:57 +02:00
Stephen Kelly 16603f7cdb Features: Add cxx_enum_forward_declarations. 2014-04-08 11:05:57 +02:00
Stephen Kelly adf22f611e Features: Add cxx_default_function_template_args. 2014-04-08 11:05:57 +02:00
Stephen Kelly 7b3e8a0534 Features: Add cxx_right_angle_brackets. 2014-04-08 11:05:57 +02:00
Stephen Kelly 9a49fd21be Features: Add cxx_decltype_incomplete_return_types. 2014-04-08 11:05:57 +02:00
Stephen Kelly 1889045ca6 Features: Add cxx_sizeof_member. 2014-04-08 11:05:57 +02:00
Stephen Kelly ab455ebafd Features: Add cxx_thread_local. 2014-04-08 11:05:57 +02:00
Stephen Kelly 300ce2481e Features: Add cxx_inline_namespaces. 2014-04-08 11:05:57 +02:00
Stephen Kelly f9d04a96b5 Features: Add cxx_variadic_macros. 2014-04-08 11:05:57 +02:00
Stephen Kelly 3d76656fb3 Features: Add cxx_uniform_initialization. 2014-04-08 11:05:56 +02:00
Stephen Kelly e74b216c90 Features: Add cxx_generalized_initializers. 2014-04-08 11:05:56 +02:00
Stephen Kelly ff80c3b420 Features: Add cxx_attributes. 2014-04-08 11:05:56 +02:00
Stephen Kelly 7605fee593 Features: Add cxx_alignof. 2014-04-08 11:05:56 +02:00
Stephen Kelly e7d6e1f44f Features: Add cxx_alignas.
cxx_alignof will be a separate feature known to CMake, because
both can be implemented with separate backward compatibility
versions.
2014-04-08 11:05:56 +02:00
Stephen Kelly 32c2acd65c Features: Add cxx_extern_templates. 2014-04-08 11:05:56 +02:00
Stephen Kelly 9064f78b0c Features: Add cxx_unrestricted_unions. 2014-04-08 11:05:56 +02:00
Stephen Kelly 3322b393a2 Features: Add cxx_unicode_literals. 2014-04-08 11:05:56 +02:00
Stephen Kelly 04c5b99f38 Features: Add cxx_user_literals. 2014-04-08 11:05:56 +02:00
Stephen Kelly e1e292cd06 Features: Add cxx_alias_templates. 2014-04-08 11:05:56 +02:00
Stephen Kelly 3300f78310 Features: Add cxx_rvalue_references. 2014-04-08 11:05:55 +02:00
Stephen Kelly b1c5bd5314 Features: Add cxx_reference_qualified_functions. 2014-04-08 11:05:55 +02:00
Stephen Kelly ea9c445f06 Features: Add cxx_raw_string_literals. 2014-04-08 11:05:55 +02:00
Stephen Kelly 735adf2c94 Features: Add cxx_range_for. 2014-04-08 11:05:55 +02:00
Stephen Kelly 0fa9bbf1fa Features: Add cxx_nullptr. 2014-04-08 11:05:55 +02:00
Stephen Kelly 8149fc909f Features: Add cxx_noexcept. 2014-04-08 11:05:55 +02:00
Stephen Kelly bd2a025eb0 Features: Add cxx_nonstatic_member_init. 2014-04-08 11:05:55 +02:00
Stephen Kelly 15cdf6f51d Features: Add cxx_lambdas. 2014-04-08 11:05:55 +02:00
Stephen Kelly a579a0aab4 Features: Add cxx_inheriting_constructors. 2014-04-08 11:05:55 +02:00
Stephen Kelly ebab2015f9 Features: Add cxx_explicit_conversions. 2014-04-08 11:05:55 +02:00
Stephen Kelly ac3a1b14c0 Features: Add cxx_deleted_functions. 2014-04-08 11:05:55 +02:00
Stephen Kelly 91f3699000 Features: Add cxx_defaulted_functions. 2014-04-08 11:05:54 +02:00
Stephen Kelly 7e748417bc Features: Add cxx_decltype. 2014-04-08 11:05:54 +02:00
Stephen Kelly 8d3467636c Features: Add cxx_strong_enums. 2014-04-08 11:05:54 +02:00
Stephen Kelly 0caf08e43e Features: Add cxx_auto_function. 2014-04-08 11:05:54 +02:00
Stephen Kelly 0685ac6edc Features: Add cxx_override. 2014-04-08 11:05:54 +02:00
Stephen Kelly 57ac6a905c Features: Add cxx_final. 2014-04-08 11:05:54 +02:00
Stephen Kelly 88542a6101 Features: Add cxx_static_assert. 2014-04-08 11:05:54 +02:00
Stephen Kelly 91289312fa Features: Add cxx_constexpr. 2014-04-08 11:05:54 +02:00
Stephen Kelly 10f33eee1d Features: Add cxx_variadic_templates.
Expect cxx_variadic_templates to implement N2555.

N2555 is essentially a bugfix and predates most compiler releases which
aimed to experimentally support variadic templates.
2014-04-08 11:05:54 +02:00
Stephen Kelly 750dfee29c Features: Add cxx_delegating_constructors. 2014-04-08 11:05:54 +02:00
Stephen Kelly f97bf4370c Features: Add cxx_auto_type.
Record the availability of this feature for GNU 4.8 on (UNIX AND
NOT APPLE) only.  In the future, availability can be recorded for
earlier GNU, for other platforms and for other compilers. Initially
the affected configurations are as restricted as possible to allow
for easy testing while extending the features vector in only one
dimension.

The error message when using the set_property API directly is not
very good, but follow up commits will provide origin debugging of
the property and a target_compile_features command which will
provide a configure-time backtrace when possible.
2014-04-07 18:11:18 +02:00
Stephen Kelly faeddf64f2 project: Add infrastructure for recording CXX compiler features
Add a feature test using the compiler macros and the preprocessor to
determine available features.

Add a CMAKE_CXX_COMPILE_FEATURES variable which contains all features
known to the loaded compiler, and a CMAKE_CXX_KNOWN_FEATURES variable
containing all features known to CMake.  Add language standard specific
variables for internal use to determine the standard-specific compile
flags to use.

This will be extended to other languages in the future.  Follow-up
commits will add features which will be recorded by the feature test.
2014-04-07 16:48:44 +02:00
Stephen Kelly 8238a6cd5d Add some COMPILE_OPTIONS for specifying C++ dialect.
These are compiler-specific, compiler version specific, extension specific
and standard version specific.
2014-04-07 16:48:44 +02:00
Stephen Kelly 59b5fdd37c Don't load Clang-CXX from AppleClang-CXX.
The Clang-CXX module is going to get version-specific checks, and
the version system for AppleClang is not the same as Clang.
2014-04-07 16:48:44 +02:00
Brad King 1dc59debcc Merge topic 'Qt4Macros-moc-performance'
7beba986 Qt4Macros: Make QT4_CREATE_MOC_COMMAND a function
2014-04-04 11:38:02 -04:00
Daniele E. Domenichelli 2dad1c143c ExternalProject: Find VCS packages quietly
This keeps the VCS packages out from FeatureSummary output, unless
the INCLUDE_QUIET_PACKAGES is used.
2014-04-04 13:27:50 +02:00
Robert Maynard 7beba98652 Qt4Macros: Make QT4_CREATE_MOC_COMMAND a function
QT4_CREATE_MOC_COMMAND is given a moc_flags argument that contains the
COMPILE_DEFINITIONS and a potentially large list of include directories.
Since it is a macro, the ${moc_flags} reference is replaced with this
content and sent through cmMakefile::ExpandVariablesInString (EVIS).
Since commit v3.0.0-rc1~138^2 (Qt4: Use generator expression in
COMPILE_DEFINITIONS, 2014-01-13) the COMPILE_DEFINITIONS value contains
a '$' so the EVIS fast-path is no longer used.  Instead the full
cmCommandArgumentParserHelper is now used on the large input, which is
very slow (since it was originally created for hand-written code).

Change QT4_CREATE_MOC_COMMAND to a function instead of a macro to avoid
passing large content through EVIS.  This makes it significantly faster.
2014-04-03 12:58:58 -04:00
Brad King 7d34041709 Merge topic 'watcom-platform-module-cleanup'
1e22b23c Watcom: Cleanup Windows-wcl386 configuration
2014-04-03 12:51:43 -04:00
Brad King 487f7a41ec Merge topic 'ExternalProject_exclude-from-all'
1ddcc582 ExternalProject: Add EXCLUDE_FROM_ALL option to ExternalProject_Add
0a1c0129 ExternalProject: Add EXCLUDE_FROM_MAIN option to ExternalProject_Add_Step
2014-04-03 12:51:37 -04:00
Brad King 7fcf0277c9 Merge topic 'FindGTest-TEST_P'
2e2939c3 FindGTest: Teach GTEST_ADD_TESTS about TEST_P
2014-04-03 12:51:35 -04:00
Jiri Malak 1e22b23c81 Watcom: Cleanup Windows-wcl386 configuration
* Remove Watcom linker caseexact options already defined in system
  definition.
* Use win_dll system for SHARED_LIBRARY and SHARED_MODULE.
* Use explicit target definition -bt=.. option for proper initialization
  of compiler Windows environment (predefined macros)
* Reorganize compiler options to global options and configuration
  specific options
* Use option to optimize out stack checking code for release version
2014-04-02 09:14:50 -04:00
Daniele E. Domenichelli 1ddcc582c1 ExternalProject: Add EXCLUDE_FROM_ALL option to ExternalProject_Add
When adding a new external project, the "all" target will depend on
this.
This option allows one to add an external project will not be executed
when the "all" target is executed.
The reason for this is that an external project could be useful, for
example, only for running tests, and therefore not necessary during
the build.
2014-04-01 18:17:31 +02:00
Daniele E. Domenichelli 0a1c012961 ExternalProject: Add EXCLUDE_FROM_MAIN option to ExternalProject_Add_Step
When adding a new step using ExternalProject_Add_Step, the main target
will depend on this step.
This option allows one to add a step that will not be executed when the
main target for the external project is executed.
2014-04-01 18:17:31 +02:00
Brad King ce9ffd6b23 Merge topic 'find_package-check-quiet'
83934757 Find*: Make find_package(.. QUIET) affect Check* modules.
4c0cc9ab Check*.cmake : Add CMAKE_REQUIRED_QUIET flag.
2014-04-01 11:06:12 -04:00
Brad King 8617de566f Merge topic 'hpux-processorcount'
c3e238dd ProcessorCount: use mpsched on HPUX if machinfo is not present
2014-04-01 11:06:11 -04:00
Brad King 05d3570cf5 Merge topic 'ExternalProject_GitUpdate'
f2128d4c ExternalProject: Improve handling of git remote branches
ff2451dc ExternalProject: Strip trailing space from git hash
2014-04-01 11:06:09 -04:00
Brad King 382c9ee859 Merge topic 'link-line-quoting'
423009c1 Makefile: Generate single-quoted object lists for Watcom
a863a8fe cmLocalUnixMakefileGenerator3: Re-organize ConvertToQuotedOutputPath
2014-04-01 11:06:08 -04:00
Brad King 09498984b1 Merge topic 'UseSWIG-NO_SONAME'
f26147b8 UseSWIG: Enable NO_SONAME on swig modules (#14815)
2014-04-01 11:06:06 -04:00
Daniele E. Domenichelli f2128d4c28 ExternalProject: Improve handling of git remote branches
ExternalProject handles git remote branches by commit hash. Due to
this, the git repository ends in detached states, and local commits
are discarded.

Use "git rebase" for remote branches instead of "git checkout".  If
there are uncommitted changes, use "git stash save/pop" to save changes
and restore them after the rebase.  If any of these operations fails,
try to restore the original status and exit with a fatal error, asking
the user to resolve the conflicts manually.

This also makes the behaviour of ExternalProject using git more similar
to the svn version, and probably more likely to what the user expects
by setting GIT_TAG to a branch.
2014-04-01 10:51:58 -04:00
Daniele E. Domenichelli ff2451dc24 ExternalProject: Strip trailing space from git hash 2014-04-01 10:51:53 -04:00
Julien Schueller f26147b871 UseSWIG: Enable NO_SONAME on swig modules (#14815)
Swig modules are plugins and do not need the SONAME field set.
2014-04-01 10:48:13 -04:00
Jack Morrison 2e2939c365 FindGTest: Teach GTEST_ADD_TESTS about TEST_P
Previously the GTEST_ADD_TESTS function would miss parameterized tests
because it only considered TEST and TEST_F.  Add TEST_P to the list of
considered tests and will run all instantiations of this parameterized
test together.

This is perhaps not as correct as searching for all instantiations of
this parameterized test and separating those into separate runs, but
this will at least run tests that were previously missing.

For reference: https://code.google.com/p/googletest/wiki/Documentation
2014-04-01 09:48:20 -04:00
Clinton Stimpson 83934757c9 Find*: Make find_package(.. QUIET) affect Check* modules.
Fixes issues #14812 and #14813 where find_package(OpenMP QUIET) and
find_package(Qt4 QUIET) would still print out messages when calling
check*() functions.

Also a partial fix for  #14445 where building CMake
(without cmake-gui) when Qt5 is installed and Qt4 is not installed
and warnings come out of FindQt4.cmake.
2014-03-29 20:22:54 -06:00
Clinton Stimpson 4c0cc9ab91 Check*.cmake : Add CMAKE_REQUIRED_QUIET flag.
Setting this flag can silence messages from the Check*.cmake modules.
This can be used by Find*.cmake modules when they are in silent mode.
2014-03-29 20:14:23 -06:00
Rolf Eike Beer c3e238dd53 ProcessorCount: use mpsched on HPUX if machinfo is not present
Co-Author: Gerhard Grimm <gerhard.grimm@detec.com>
2014-03-28 18:02:49 +01:00
Jiri Malak 423009c17f Makefile: Generate single-quoted object lists for Watcom
Drop the CMAKE_NO_QUOTED_OBJECTS internal variable from the Makefile
generators.  The underlying problem is with the Watcom linker, not with
WMake.  The Watcom linker wants object files to be single-quoted.  Add
<LINK-RULE>_USE_WATCOM_QUOTE platform information variables to tell the
generators to use Watcom-style single quotes for object files on link
lines.

On Windows, Watcom uses the GetCommandLine API to get the original
command-line string and do custom parsing that expects single quotes.
On POSIX systems, Watcom approximates the original command line by
joining all argv[] entries separated by a single space.  Therefore we
need to double-quote the single-quoted arguments so that the shell does
not consume them and they are available for the parser to see.
2014-03-27 13:45:29 -04:00
Brad King e8451d6426 Merge topic 'threads-cleanup'
693f8bf3 FindThreads: simplify checking for SunOS
858ce31f FindThreads: avoid useless checks if a thread library is already found
fdf7bd27 FindThreads: replace MATCHES with STREQUAL
2014-03-27 11:12:08 -04:00
Brad King 6ae3fbfeda Merge topic 'dev/find-boost-graph_parallel'
f284b003 FindBoost: Search next to MPI libs for graph_parallel (#14832)
2014-03-26 13:24:45 -04:00
Brad King 098a39f21c Merge topic 'simplify-empty-LDFLAGS'
1b18f442 Avoid trailing space in CMAKE_*_LINKER_FLAGS when LDFLAGS is empty
2014-03-26 13:24:42 -04:00
Brad King 2cb8417584 Merge topic 'FindPkgConfig-stop-on-missing'
63a4c0af FindPkgConfig: Stop processing when REQUIRED package not found (#14381)
2014-03-26 13:24:40 -04:00
Brad King 06c9f55449 Merge topic 'haiku-updates'
0cc42b87 Haiku: Fix compiler detection when using distcc
84603d80 Haiku: Enable CMake builtin ELF editor
2014-03-26 13:24:36 -04:00
Brad King ab07d383a9 Merge topic 'fix-Qt4-moc-commands-depends'
734df96f Qt4: Fix moc command dependencies for incremental build.
2014-03-26 13:24:34 -04:00
Brad King bcd4d0ced8 Merge topic 'UseJava-fix-resource-copy'
2abd8efe UseJava: Copy resource files before compiling the jar (#13360)
2014-03-26 13:24:31 -04:00
Brad King 046c1a1f65 Merge topic 'compile-m-as-c'
95cdf132 Treat .m files consistently as C across all generators
2014-03-26 13:24:28 -04:00
Brad King 74a45ce647 Merge topic 'UseSWIG-revert-bad-fix-0010080'
d9760647 Revert "UseSWIG: Name extra generated files after module name (#10080)"
2014-03-26 13:24:26 -04:00
Rolf Eike Beer 693f8bf34d FindThreads: simplify checking for SunOS 2014-03-25 23:49:54 +01:00