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.)
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.
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.
Initializer lists are only properly supported in 2015 and above.
Previous Visual Studio releases said they supported initializer lists
but silently produced bad code.
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>
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.
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.
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).
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
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.
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.
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>
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.
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.
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>
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>
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.
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.
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.
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.
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.
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.
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"
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>
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>
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.
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.
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.
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
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.
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.
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>
b6b37e30 Makefile: Add assembly and preprocessed targets for Fortran
0842b084 Makefile: Refactor checks for lang-specific targets and export compile cmds
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.
If UPDATE_DISCONNECTED is set, the update step is not executed
automatically when building the main target. The update step can still
be added as a step target and called manually. This is useful if you
want to allow to build the project when you are disconnected from the
network (you might still need the network for the download step).
This is disabled by default.
The directory property EP_UPDATE_DISCONNECTED can be used to change
the default value for all the external projects in the current
directory and its subdirectories.
Some generators (i.e. Xcode) will not generate a file level target if
no command is set, and therefore the dependencies on this target will
be broken.
This patch sets an empty echo command that does nothing to avoid this
issue.
The ExternalProject_Add_StepDependencies function add some dependencies
for some external project step.
The syntax is:
ExternalProject_Add_Step_Dependencies(<name> <step> [target1 [target2 [...]]])
This function takes care to set both target and file level dependencies,
and will ensure that parallel builds will not break.
It should be used instead of add_dependencies() when adding a dependency
for some of the step targets generated by ExternalProject. See also:
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/8680/focus=8926
When adding step targets using ExternalProject_Add_StepTargets, the
STEP_TARGETS argument or the EP_STEP_TARGETS property, ExternalProject
sets all the dependencies for the main project to that target. Due to
this, the update target cannot be used without downloading and building
all the dependencies.
In order to be able to add step targets that do not depend on other
external projects, this patch adds:
* An optional "NO_DEPENDS" argument to the
ExternalProject_Add_StepTargets function. If this argument is set,
then no dependencies are set for the target (file dependencies will
still be set).
* A new argument INDEPENDENT_STEP_TARGETS to the ExternalProject_Add
function and a new directory property EP_INDEPENDENT_STEP_TARGETS that
behave like STEP_TARGETS and EP_STEP_TARGETS, but cause the
ExternalProject_Add_StepTargets to be called with the NO_DEPENDS
argument.
1531df2b configure_file: Warn about unknown arguments
4abbb140 Qt4: Fix configure_file call to use COPYONLY, not COPY_ONLY
bd7ba8e2 KWSys: Fix configure_file call to use COPYONLY, not COPY_ONLY
e9282782 Help: Fix configure_file call to use COPYONLY, not COPY_ONLY
Cleanup of Windows-wcl386.cmake in commit v3.1.0-rc1~693^2 (Watcom:
Cleanup Windows-wcl386 configuration, 2014-04-01) also introduced use of
the 'symfile' link option but did not mention it in the commit message.
There is no way to set the symbol file name of a target, so it is better
to revert that change. It is easy to run 'wstrip *' if the symbols need
to be stripped, but it is very difficult to get the right names for the
.sym files to install with debug/rel_with_deb_info configurations.
609037f4 ExternalProject: Add unit tests for CMAKE_CACHE_DEFAULT_ARGS
98cdb658 ExternalProject: Add CMAKE_CACHE_DEFAULT_ARGS arguments
36cf8a1e Tests/Tutorial: Fix when USE_MYMATH is OFF
This argument allows to set default arguments that are written in the
initial cache file, but that are not forced, and therefore allows the
user to change these values later (CMAKE_ARGS and CMAKE_CACHE_ARGS
always overwrite the values).
Also add some documentation to explain the differences between these 3
arguments.
Extend ExternalProjectLocal test to cover CMAKE_CACHE_DEFAULT_ARGS.
With CMAKE_C_COMPILER=clang and CMAKE_C_FLAGS='-Wall -Werror', this test
breaks with -Werror,-Wuninitialized. Fix this by getting rid of the
temporary variable.
Convert ExternalProject module documentation to use explicit markup
blocks for each command. Enumerate command options with definition
lists instead of a literal block. This will allow more detail to be
added later. Also fix the logic that parses options out of the
documentation to be aware of the new layout.
Use a bracket comment to hold the documentation instead of a block of
line comments. This will make further updates easier. Also fix the
logic that parses options out of the documentation to be aware of the
new layout.
6e1c359f QtAutogen: Regenerate qrc files if their input changes (#15074)
a2995318 QtAutogen: Expand rccfiles into a vector early in the autogen process.
506151af QtAutogen: Extract a GetRccExecutable method.
When using CMAKE_FIND_ROOT_PATH, FindBoost is able to find the first
component and cache the full path of the directory in Boost_LIBRARY_DIR
so that all components are looked for in same directory. The issue was
that, when looking for the other components, Boost_LIBRARY_DIR was
re-rooted against CMAKE_FIND_ROOT_PATH even though it was already a path
on the host. This change fixes this by disabling the re-rooting in the
find_library call when using Boost_LIBRARY_DIR as a hint.
See http://www.cmake.org/pipermail/cmake-developers/2014-October/011670.html
These variables can be dereferenced by if() alone so do not do it here, avoiding
the risk of their content being treated as a variable name and dereferenced
again.
Get dependencies from the output of ``rcc --list`` if using
Qt 5. Otherwise process the file in the same way as the
qt4_add_resources macro.
This does not work for RCC files which are generated.
The cmake_autogen build step is implemented as a PRE_BUILD step
of the target currently if possible, rather than a standalone
custom target. This is to keep the number of (synthesized)
custom targets that appear in the UI low, but in some cases
it is necessary to fall back to a full custom target.
Fall back to a full custom target for the VS builds if autorcc
is used.
80b19a71 Help/manual: Avoid long lines in code blocks
4fdacedc Help: Clarify formatting of CPACK_WIX_ACL documentation
35ca4863 Help: Wrap long ctest_submit signature line
58b2d760 Modules: Format documentation to avoid over-long preformatted lines
Convert several preformatted code block literals that enumerate lists of
options or variables to use reST definition lists instead. Manually
wrap other long lines in code blocks.
The iOS product type 'com.apple.package-type.bundle.unit-test' requires
code signing on Xcode 6. Other iOS target types do too. Until CMake
learns to add the CODE_SIGN_IDENTITY build attribute itself, toolchain
files can set CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY to tell the Xcode
generator to add the attribute. Teach CMakeDetermineCompilerId to
recognize this variable and add the CODE_SIGN_IDENTITY build attribute
to the compiler id project.
Since commit 0cce556b (Xcode: Use sysroot and deployment target to
identify compiler, 2014-04-29) our compiler id detection project uses
the target platform SDK in case Xcode selects a different compiler based
on it. Now the compiler id project actually compiles with the target
compiler and SDK when cross-compiling.
The iOS tools do not support the 'com.apple.product-type.tool' product
type we use in our compiler id detection project. When targeting
iPhone, use product type 'com.apple.product-type.bundle.unit-test'
instead.
This restores Qt SDK 4.8 and OS X >= 10.6.5 codesign compatibility
improving embedding frameworks using correct bundle layout described at:
https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html
1. If Versions/VERSION/Resources/Info.plist is missing, well known
incorrect locations are checked for Info.plist and Info.plist is
copied from there, otherwise codesign will fail.
2. Root framework symlinks to binary and Resources are restored to
point inside Versions/Current, otherwise Qt 4.8 looking for
Resources/ in framework root will fail.
Enable per-component description and summary setting through
CPACK_RPM_<component>_PACKAGE_DESCRIPTION,
CPACK_COMPONENT_<compName>_DESCRIPTION and
CPACK_RPM_<component>_PACKAGE_SUMMARY variables.
Extend the CPackComponentsForAll test to cover these.
When testing CMAKE_<LANG>_COMPILER_ID values, do not explicitly
dereference or quote the variable. We want if() to auto-dereference the
variable and not its value. Also replace MATCHES with STREQUAL where
equivalent.
The condition to use ";" as classpath separator includes a check for the
switch "WIN32" which is a target switch. When cross-compiling for a
non-windows target, this switch is not present and the separator
defaults to ":". It should check for "CMAKE_HOST_WIN32" instead.
631fadea Help: Add notes for topic 'fix-OSX-bundle-rpaths-and-Qt5'
50e261dd OSX: Warn when attempting to change runtime paths on OS X 10.5
9b98fd52 cmake-gui: Make sure we bundle Qt5 Cocoa platform plugin
83a06bb4 BundleUtilities: Framework codesign Resources/Info.plist & Current
f7df82ac BundleUtilities: Resolve & replace @rpath placeholders
14bc686f GetPrerequisites: Make sure dyld placeholders are prefixes
6c313797 BundleUtilities: Use find on UNIX for fast executable lookup
This is done by gathering LC_RPATH commands for main bundle executable and
using it for @rpath lookup in dependent frameworks.
All functions that need to carry rpaths to now take optional <rpaths> argument.
This enabled apps using @rpath to be bundled correctly, which will be necessary
for upcoming Qt 5.4 that will use @rpath for all frameworks.
Check that install_name_tool has -delete_rpath before using it.
Otherwise it will fail with Xcode 3.x on 10.5 which has no -delete_rpath
option for install_name_tool command, that was first introduced in 10.6
SDK, even that 10.5 supports LC_RPATH and @rpath.
It makes whole executable process quicker on UNIX, especially for large bundles
containing many files, since using find narrows results to only files having
executable flags then all further tests follow.
Since find ... -perm +0111 is not clearly POSIX compliant and some Linux
versions refuse it, it is better to use longer but portable:
find ... -perm \( -perm -0100 -o -perm -0010 -o -perm -0001 \)
b7e5c5a2 FindThreads: introduce THREADS_PREFER_PTHREAD_FLAG (#14767)
bcb0e387 FindThreads: introduce an imported target to link to
46368edd FindThreads: move checking of the -pthread compiler flag into a macro
This not only holds the library, but can also hold compiler flags needed, e.g.
the -pthread flag preferred by gcc on some platforms. There was no clean way
to get that compiler flag from the module until now.
ba907f7d FPHSA: fix when requested or found version is exactly 0
4f9bf446 FPHSA: when EXACT version match is requested only compare the components given
Given that you have a foobar that identifies itself as 1.2.3 from now on a
find_package(foobar 1.2 EXACT)
will succeed, as 1.2.3 will now be considered as being 1.2. Until now this was
only the case for version 1.2.0.
f25e431d tests: set sanitizer options properly
f0661bf3 tests: fix copy/paste from tsan -> asan comments
ca9cc25c ctest: add support for additional sanitizer options
0b9ffffc ctest: update documentation for CTEST_MEMORYCHECK_TYPE
This allows a following commit to introduce a switch to prefer that check over
searching for the explicit library names without breaking backward
compatibility.
When testing CMAKE_CXX_COMPILER[_ID] values with if(MATCHES) or
if(STREQUAL), do not explicitly dereference or quote the variable.
We want if() to auto-dereference the variable and not its value.
The FindVTK module only existed to help find_package(VTK) calls work in
old projects written to use "USE_VTK_FILE" instead of "VTK_USE_FILE".
Drop it to allow find_package(VTK) calls to search for VTKConfig.cmake
directly.
The FindITK module only existed to help find_package(ITK) calls work in
old projects written to use "USE_ITK_FILE" instead of "ITK_USE_FILE".
Drop it to allow find_package(ITK) calls to search for ITKConfig.cmake
directly.
df84281d Help: Add notes for topic 'vs-nsight-tegra-generator'
69e198dc VS: Generate Nsight Tegra project revision number
5365c9ac VS: Map Nsight Tegra file types in .vcxproj files
178f56a5 VS: Fix Tegra-Android platform linking of libraries by name
7115702f Tests: Add test for VS Nsight Tegra generator support
a6289499 VS: Generate ANDROID_GUI executables as app packages
c12e4699 Add 'ANDROID_API' target property to set Android Target API
9a4df52a Add 'ANDROID_GUI' target property to mark Android applications
16569abf cmTarget: Track internally whether platform is Android
ef0fd4f0 VS: Teach vcxproj generation about the Tegra-Android platform
d09b60f5 VS: Detect compiler id of Nsight Tegra-Android toolchains
2f071466 VS: Teach VS >= 10 to recognize CMAKE_SYSTEM_NAME 'Android'
Nsight Tegra Visual Studio Edition handles prefixing of library names
with '-l' automatically, so teach the generator not to do so.
Reported-by: Mourad Boufarguine <mourad@boufarguine.name>
Teach CMakeDetermineCompilerId to recognize the Tegra-Android platform
and generate a test project for Nsight Tegra tools. Locate the full
path to CMAKE_<LANG>_COMPILER by computing it within the test project
build environment.
Also teach CMakeFindBinUtils that this variant of the Visual Studio
generator uses UNIX-like instead of MS-like archiving and linking tools.
When testing CMAKE_CXX_COMPILER_ID values with if(MATCHES),
do not explicitly dereference or quote CMAKE_CXX_COMPILER_ID.
We want if() to auto-dereference the variable and not its value.
After updating from Protocol Buffers 2.5.0 to 2.6.0 compilation of the
generated source failed: "This file was generated by an older version of
protoc which is incompatible with your Protocol Buffer headers. Please
regenerate this file with a newer version of protoc.".
Turns out the source and headers generated by way of
FindProtobuf.cmake:PROTOBUF_GENERATE_CPP aren't updated. Adding a
dependency on the compiler executable fixes this issue.
Fix the CMP0054 warning:
CMake Warning (dev) at .../Modules/ExternalProject.cmake:242 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted keywords like "COMMAND" will no longer be interpreted as keywords
when the policy is set to NEW. Since the policy is not set the OLD
behavior will be used.
Call Stack (most recent call first):
.../Modules/ExternalProject.cmake:1938 (_ep_parse_arguments)
CMakeLists.txt:5 (ExternalProject_Add)
by avoiding a reference to "${key}" or "COMMAND" in quotes.
be6a555d Tests: Test setting a generator platform in a toolchain file
d506fee8 Tests: Use -A option to pass generator platform selection
11c9ddd6 ExternalProject: Use -A option to pass generator platform
29bd843e CTest: Use -A option to pass generator platform selection
eb7d8156 cmake: Add -A option to specify a generator platform
858d5a0b Fix if() checks of CMAKE_SYSTEM_NAME on Cygwin
e177e7af FPHSA: Avoid if() dereferencing of quoted variable
425acc52 cmcurl: Use if(DEFINED) to simplify conditions
cede5cbd libarchive: Avoid depending on if() to dereference a quoted variable
2d97178b FindGTK2: Avoid depending on if() to dereference a quoted variable
0b12815d Modules/Test*.cmake: Use if(DEFINED) to simplify conditions
188a1f23 If: Introduce policy CMP0054 - don't dereference quoted variables in if()
b900c1cc If: Extract cmConditionEvaluator from if() implementation
Do not check file's hash in download script. If hash will not match
command ``file(DOWNLOAD ...)`` will fail with FATAL_ERROR, ``cmake -P``
will exit with unsuccessful code, and the build will stop. Leave hash
checking to the existing implementation in the verify step.
Legacy invocations may pass a variable name where "DEFAULT_MSG" belongs.
When comparing FPHSA_FAIL_MESSAGE to "DEFAULT_MSG", use a leading "x" on
both sides to avoid mistaking the value of the message for a variable
name.
When the loop was added by commit v3.0.0-rc1~103^2~3 (ExternalProject:
Reattempt download when verification fails, 2015-01-15), we forgot to
actually increment the loop counter. Add the increment line.
When the CMAKE_GENERATOR option is given to ExternalProject_Add, look
also for option CMAKE_GENERATOR_PLATFORM to pass on to cmake as a cache
definition. When no CMAKE_GENERATOR option is given explicitly then use
the current project's CMAKE_GENERATOR_PLATFORM (since we already use its
CMAKE_GENERATOR).
Since commit v3.0.0-rc1~342^2~2 (Add compiler target compile options,
2013-05-19) we use CMAKE_<LANG>_COMPILER_TARGET as the binutils prefix
when cross-compiling with Clang. Fix the implementation to use the
compiler target as the prefix only when it is set. Otherwise toolchain
files not using CMAKE_<LANG>_COMPILER_TARGET cause the logic to use
a prefix of just "-" and of course cannot find "-ar" or "-ld".
FindGTK2 was adding optional include directories to the
interface include dirs regardless of whether or not they
existed. This ensures that the directories only get added
if they are actually found. This is particularly a problem
on Solaris where the gtk2 libs and headers might exist but
the FreeType2 headers might not.
A few different regular expressions were being used in various
places to extract info strings from binaries. This uses a
consistent regex amongst all of them now. This also fixes the
broken ABI detection for Cray compilers.
Some platforms, Fedora 20 and RHEL 7 in particular, will have multiple
pg_config_${arch}.h files all included by the top level pg_config.h.
This checks all of the available pg_config*.h headers for version
information.
39fefde2 VS: Add test case for Windows Phone and Windows Store
89da8465 MSVC: Define 'WIN32' for Windows Store and Windows Phone
ed7f085f Help: Add notes for topic 'vs-windows-apps'
dd11ae8f VS: Do not compile C sources as WinRT (#15100)
b8e40538 VS: Mark Windows Phone and Store targets as App Containers
0432f062 VS: Always ignore ole32 on Windows Phone 8.0
e6ff2f8b VS: Generate Windows Metadata for WinRT components
ee48f4c7 VS: Generate Windows Phone and Windows Store projects as Unicode
cb1aceed VS: Add VS_WINRT_COMPONENT property to enable CompileAsWinRT
401269e4 VS: Handle .pfx files explicitly in generator
23782171 VS: Handle AppxManifest sources explicitly in generator
bc373c6d VS: Set Window Phone/Store app type in CMake-generated targets
d89b2889 VS: Mark CMake-generated targets as Utility in .vcxproj files
03ad8f28 CMakeDetermineCompilerABI: Link with standard libraries on MSVC
cbd1d42b Help: Add notes for topic 'vs-masm'
0f8522a6 VS: Add MASM support to VS 8 and 9 (#8170, #14984)
a43f4400 VS: Move internal MasmEnabled member up to VS 7 generator
df3b007d VS: Add test for MASM support
e8727449 VS: Populate MASM tool build settings in .vcxproj files
0271a5f9 VS: Manually fix MASM flag table entries
1d662e48 VS: Generate MASM flag tables from MSBuild tool files
4f6940df VS: Fix ASM_MASM support in VS >= 10
d7866c52 ASM_MASM: Fix selection of ml64
0374abdb ASM_MASM: Add preprocessor definitions to compile lines
5b0a46e1 ASM_MASM: Do not require compiler to be a full path
802dbe52 cmLocalVisualStudio7Generator: Rename local 'lang' var
In commit v2.8.0~395 (Implicit link info for C, CXX, and Fortran,
2009-07-23) we added a '-DCMAKE_${lang}_STANDARD_LIBRARIES=' flag to the
try_compile used to build the ABI detection project. It is needed when
detecting the implicit libraries added by the GNU compiler on Windows
(MinGW tools) to avoid contaminating the list with standard Windows
libraries. However, with MSVC we do not detect such implicit link
libraries anyway, and for some target platforms (e.g. Windows Phone) we
may need the standard libraries to link the ABI detection executable.
Drop the flag when detecting the ABI using MSVC.
- autodetects Ice on all major platforms
- allows building with all supported Visual Studio versions on Windows
- autodetects the slice path on most platforms
- separately detects the Ice programs, headers, slice files and
libraries so that any Ice configuration or installation errors can
be accurately reported, making diagnosis of Ice problems simpler
653529ce CTest: Allow / to be in the build name, and be consistent with the build name
39b5df2f ctest_update: Add CTEST_UPDATE_VERSION_ONLY option to only note the version
This allows ctest_update to get the current version without actually
changing the repository. This is useful when using Jenkins or an
external project to update the source to a specific version, but you
still want the current version to show up in CDash.
Copy the CheckCSourceCompiles module and port it to Fortran.
Extend the FortranOnly test to try using the new module.
Suggested-by: Nicolas Bock <nicolasbock@gmail.com>
The cleanup in commit 4f2fcce4 (Check*: Allow result variables to
contain regex special characters, 2014-07-31) broke old VXL code that
abuses the old "if(MATCHES)" implementation by using
SET( ${VARIABLE} ${VARIABLE} )
to reset a check result variable. Add a compatibility hack to the
CheckFunctionExists, CheckIncludeFileCXX, and CheckSymbolExists modules
to re-run their checks when the result variable is set to its own name.
Use STREQUAL instead of MATCHES so that special characters still work.
CPack IFW generator updates:
- Group now can have script;
- Root package (for monolithic or one package installers) can be
configured from group.
CMake updates:
- Native installation (no Unspecified component).
2b20110f MSVC: Select default standard libraries for ARM platform
2dfcf0ed VS: Fix generation of desktop applications for ARM
dbb5a7ee CMakeDetermineCompilerId: Fix detection for VS ARM platform
Add WindowsSDKDesktopARMSupport to the compiler id .vcxproj to
avoid 'error MSB8022: Compiling Desktop applications for the ARM
platform is not supported.' from VS.
Inspired-by: Minmin Gong <minmin.gong@gmail.com>
Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
5d3d9a22 Help: Add notes for topic 'vs-windows-phone-and-store'
401a00d9 VS: Set WindowsPhone and WindowsStore min VS version required
709cebde VS: Generate WindowsPhone and WindowsStore application types
72395ab2 VS: Add .sln "Deploy" mark for WindowsPhone and WindowsStore binaries
2074f581 MSVC: Add system libs for WindowsPhone and WindowsStore
c72f0887 MSVC: Add default WindowsPhone and WindowsStore compile flags
1c94558a MSVC: Disable incremental linking for WindowsPhone and WindowsStore
592098e2 Define 'WINDOWS_PHONE' and 'WINDOWS_STORE' variables
aa42a78f Add WindowsPhone and WindowsStore platform information modules
b94ddf6c CMakeDetermineCompilerId: Recognize WindowsPhone and WindowsStore
d7938bff VS: Select WindowsPhone and WindowsStore default toolsets
3abd150c VS: Save WindowsPhone and WindowsStore system internally
We already use MPI_HOME and ENV{MPI_HOME} as hints for the location
of the MPI compilers. Do the same for mpiexec, and then use the
location of mpiexec as a hint to find the compilers.
The Fujitsu C/C++ compilers are the default ones for K computer.
Detect both native and cross compilers by looking for the __FUJITSU
preprocessor definition.
Split the monolithic cmCPackIFWGenerator source into three parts:
cmCPackIFWGenerator, cmCPackIFWInstaller, and cmCPackIFWPackage
to isolate the implementations somewhat.
Add a COMMON option to the cpack_ifw_configure_component command to make
the data component common to its parent group.
Change the default packaging method to ONE_PACKAGE_PER_COMPONENT.
This is not incompatible because the CPack IFW generator has not
yet been in a release.
This option instructs configure_package_config_file to consider paths
that are not absolute as relative to the INSTALL_PREFIX directory
instead of relative to the CMAKE_INSTALL_PREFIX directory.
If this argument is not passed, the default behaviour is to use
the CMAKE_INSTALL_PREFIX variable.
The new signature is therefore:
configure_package_config_file(<input> <output> INSTALL_DESTINATION <path>
[PATH_VARS <var1> <var2> ... <varN>]
[NO_SET_AND_CHECK_MACRO]
[NO_CHECK_REQUIRED_COMPONENTS_MACRO]
[INSTALL_PREFIX <path>])
Let clients do their own research on the current strength of each
hash algorithm to choose what is best for their needs.
Suggested-by: Nico Schlömer <nico.schloemer@gmail.com>
Simply include the "Windows" platform equivalents. This will allow
-DCMAKE_SYSTEM_NAME=WindowsPhone or -DCMAKE_SYSTEM_NAME=WindowsStore to
select variants of the Windows platform while re-using most of the
platform information from "Windows".
When CMAKE_SYSTEM_NAME is set to target one of these, add
ApplicationType and ApplicationTypeRevision elements to the .vcxproj
file used to identify the compiler so that the WindowsPhone or
WindowsStore toolchains can work.
Co-Author: Brad King <brad.king@kitware.com>
Prior to the existence of the if(DEFINED) condition, many of our Check
modules implemented the condition with a hack that takes advantage of
the auto-dereference behavior of the if() command to detect if a
variable is defined. The hack has the form:
if("${VAR} MATCHES "^${VAR}$")
where "${VAR}" is a macro argument reference. However, this does not
work when the variable named in the macro argument contains characters
that have special meaning in regular expressions, such as '+'. Run the
command
git grep -E 'if\("\$\{.*\}" MATCHES "\^\$\{.*\}\$"\)' -- Modules/Check*
to identify lines with this problem. Use if(NOT DEFINED) instead.
In commit v3.0.0-rc1~551^2~1 (Check*CompilerFlag: make C and CXX modules
share most error patterns, 2013-08-08) a pattern containing a ';' was
moved out of a ""-quoted argument and into a variable. CMake flattens
the containing list and breaks the pattern. Use a '.' to match ';'.
Also fix .bz2 extension to be .tar.bz2 since we only support compressed
tarballs and not plain compressed files.
Suggested-by: Nils Gladitz <nilsgladitz@gmail.com>
Suggested-by: Rolf Eike Beer <eike@sf-mail.de>
7079f33d WindowsCE: Drop unused Platform/WindowsCE-MSVC module
05373f7e WindowsCE: Refactor setting of "WINCE"
1acde6b0 MSVC: Use STREQUAL to check for WindowsCE
This module was created to mirror Platform/Windows-MSVC.cmake, but this
is not necessary because nothing includes "Platform/<os>-<id>.cmake"
directly. The Platform/Windows-MSVC module is only a helper for the
Platform/Windows-MSVC-<lang> modules.
Move it to the Platform/Windows module since it is independent of the
compiler used. While at it, remove redundant "WIN32" setting from
Platform/Windows-MSVC since Plaform/Windows already sets its.
b9be4d21 Help: Add notes for topic 'cpack-ifw-generator'
73b336c9 CPackIFW: Replace use of strftime with cmTimestamp
44850a26 CPack: Add an "IFW" generator for Qt Framework Installer
Allow the combination
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.8" -DCMAKE_OSX_SYSROOT="/"
to work. Treat the "/" sysroot as targeting the current OS X version.
If find_program does not find CMAKE_<LANG>_COMPILER, use set_property()
to force the value to be that of CMAKE_<LANG>_COMPILER_INIT instead of
set(). This allows us to set the value without re-specifying the type
and documentation, thus preserving what find_program set.
Commit v3.0.0-rc1~111^2 (QNX: Introduce QCC compiler id for that
QNX platform compiler., 2014-01-20) split handling of the QNX QCC
compiler into a separate compiler-id. That refactoring results in
the QCC compiler not using the CMake-compiler-id "GNU", which means
that the __compiler_gnu macro is no longer executed for it.
Add Compiler/QCC*.cmake modules to define and call the __compiler_qcc
macro and teach it to call __compiler_gnu internally. Remove the
corresponding pieces from the Platform/QNX*.cmake modules.
It is also necessary to change the language conditional to dereference
the lang macro parameter, which is another bug introduced by the
same commit. The extra -lang-c++ flag is only necessary when the CXX
compiler is specified as 'qcc' instead of 'QCC' in the toolchain file,
which is why this bug was not noticed before. The flag is also necessary
in that case when linking in order to find the appropriate standard
libraries. The flag was not previously added when linking executables,
so linking failed even with CMake 2.8.12 with the lower-case compiler-id.
Co-Author: Brad King <brad.king@kitware.com>
Before this commit, you would have to run ctest -S mode to get
MemoryCheckType to work. This is because CMAKE_COMMAND was not set.
The fix is to use cmSystemTools::GetCMakeCommand instead.
Produce a more consistent result by finding only a single include
directory and reporting which headers may be included from it. The
previous search for each header separately might find pieces from
separate and incompatible packages.
While at it, provide the CURSES_INCLUDE_DIRS result variable to be
consistent with other modules.
On WinCE we must link both shared libraries and executables with the
/subsystem:windowsce flag. Teach Platform/Windows-MSVC to pass it
to the linker in both cases.
Suggested-by: Gunnar Roth <gunnar.roth@gmx.de>
When cross compiling, toolchains won't have install_name_tool,
which is provided by Xcode and command line tools on OS X.
This is a Mach-O specific utility and not required on all platforms.
IcedTea 2.5 have changed libarch for ppc64le to ppc64. Adjust FindJNI
to look for both for backward compatibility.
Signed-off-by: Dinar Valeev <dvaleev@suse.com>
f0e298ad Help: Add notes for topic 'vs14-generator'
5c105140 Tests: Simplify LoadCommand tests
b1cbd577 FindBoost: Add -vc140 mangling for VS 14
bdc7d9c8 VS14: Fix Cl and Link flag tables as previous versions
d96b3f68 VS14: Generate flag tables from MSBuild v140 tool files
65624c39 VS14: Add Visual Studio 14 generator (#14982)
8635ac23 Tests/Preprocess: Remove unnecessary VS version tests
When setting default CUDA_HOST_COMPILER we must dereference CMAKE_C_COMPILER,
i.e. /usr/bin/clang should be used instead /usr/bin/cc which is symlink.
Otherwise CUDA thinks it is GCC and issues -dumpspecs which is unknown option
to Clang.
Also in case neither CMAKE_C_COMPILER is defined (project does not use C
language) nor CUDA_HOST_COMPILER is specified manually we should skip -ccbin
and let nvcc use its own default C compiler.
If the only qmake that can be found belongs to Qt5 the find module
would otherwise still further interrogate it and issue diagnostics
which are specific to Qt4.
Intel Composer XE 2015 Beta 2 deprecates all options starting with -o
for sake of compatibility with other compilers expecting anything goes
after -o... is output file name.
Call the generator "Visual Studio 14" without any year because this
version of VS does not provide a year in the product name.
Copy cmGlobalVisualStudio12Generator to cmGlobalVisualStudio14Generator
and update version numbers accordingly. Add the VS14 enumeration value.
Teach the platform module Windows-MSVC to set MSVC14 and document the
variable. Teach module InstallRequiredSystemLibraries to look for the VS
14 runtime libraries.
Teach tests CheckCompilerRelatedVariables, VSExternalInclude, and
RunCMake.GeneratorToolset to treat VS 14 as they do VS 10, 11, and 12.
Co-Author: Pawel Stopinski <diokhan@go2.pl>
The check for this flag added by commit v3.0.0-rc1~284^2 (UseSWIG: Name
python module according to swig flags, 2013-11-26) can get false
positives on flags like "-noproxydel". Improve the check to match only
"-noproxy".
Suggested-by: Garth Wells <gnw20@cam.ac.uk>
To be able to include InstallRequiredSystemLibraries more than once
(e.g. to get the Debug and Release libraries separately), clear the
internal library list for non-matching configuration.
The DECL part is redundant, and the language part is not needed. The
source language and context already determines the language, so there
is no need to repeat it in the define name.
ddec418a Features: Add compiler version support to WriteCompilerDetectionHeader.
b7029576 Project: Add configurable name for version computation macros.
78acaafe Project: Separate simulated compiler id from version detection.
567af1a5 WCDH: Issue a better message for version compatibility.
Create a Platform/Android module that includes Platform/Linux since
Android is based on Linux. Provide only the minimal settings needed to
get builds with Android NDK toolchains to work.
Disable use of RPATH since the Android loader ignores it and we cannot
predict the install destination anyway.
Android supports soname but shared library names must end in ".so" and
we cannot represent the versioned names with associated symlinks on all
host operating systems anyway. However, we do want the SONAME of
library files to be set so that linking to them by path to the library
file produces NEEDED entries with the soname and not the path. Add a
new CMAKE_PLATFORM_NO_VERSIONED_SONAME setting to tell the
cmTarget::GetLibraryNames method that not to use the VERSION or
SOVERSION target properties in the soname.
We already match lowercase 'rc'. Add 'RC' too. The latter is listed in
other CMake<LANG>Compiler modules as ignored for their languages already.
Signed-off-by: Tim Blechmann <tim@klingt.org>
The FindQt4 module is a CMake Domain object of type "module".
Our convention for domain object document titles is "------"
and domain object document sections is "^^^^^^". Switch to
these within the FindQt4 documentation.
58f7baab FindFreetype: Indent with 2 spaces instead of 4
444f8801 FindFreetype: Use lower-case name in call to FPHSA
836a28d5 FindFreetype: Move PATH_SUFFIXES argument for more consistency
4ad6dace FindFreetype: Add newlines to reduce code width
While at it, do not cache the value since it should always be
computed directly from DOXYGEN_DOT_EXECUTABLE.
Inspired-by: Lars Bilke <larsbilke83@googlemail.com>
As of Graphviz 2.31, their installer provides no PATH or registry
modifications. Glob possible install paths instead.
Inspired-by: Lars Bilke <larsbilke83@googlemail.com>
Link to it from the documentation of related properties, variables
and commands.
Extend the cmake-developer(7) documentation with notes on
extending feature support for compilers.
Add to the Platform/Windows-GNU module list of VS registry entries those
for VS 2013. Also add the name "vcvars64.bat" used by VS 10 and above
for 64-bit tools.
After finding qmake we search in QT_BINARY_DIR for the other Qt tools.
Try all versioned executable names before trying the plain executable name.
This makes it much more likely that if 2 different major versions are installed
in the same prefix CMake will be able to detect a proper set of tools.
Update cmake_minimum_required calls in CMakeLists.txt in Modules and in
CMakeLists.txt generated by other modules, so that they are always in
sync with current CMake version.
Some modules change CMake minimum required version when they are
included. For example:
cmake_minimum_required(VERSION 2.8.12)
message("${CMAKE_MINIMUM_REQUIRED_VERSION}")
include(CheckTypeSize)
message("${CMAKE_MINIMUM_REQUIRED_VERSION}")
will produce the following output:
2.8.12
2.6
This patch ensures that when you include a CMake module the minimum
required version and the policies set are left unchanged.
Fixes Issue #14864
Previously when linking the intermediate link file for separable compilation
the CUDA_NVCC_FLAGS* were not used. This caused tremendous confusion when
using this feature, and I consider it to be a bug. This change should fix
this.
Clang discards the entire string if it is not used, removing
the ability to read the features from the compiled binary. That
is prevented by using the symbol.
GNU with -O3 also discards the string, so use the string in a
way which is determined by a runtime value (argc) to prevent
it being discarded.
Add properties and variables corresponding to CXX equivalents.
Add features for c_function_prototypes (C90), c_restrict (C99),
c_variadic_macros (C99) and c_static_assert (C11). This feature
set can be extended later.
Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader
to conditionally represent the c_restrict feature.
Provide a function to write a portable header to detect compiler
features. Generate a preprocessor #error for unknown compilers
and compiler versions whose features are not yet recorded. This
error condition might be relaxed in the future, but for now it
is useful for verification of expectations.
Remove the use of check_cxx_source_compiles which is now just getting in
the way.
Blacklist the cxx_alignof feature in the test with GNU 4.7. The test
file compiles, but it is documented as available first in GNU 4.8.
205215fb cmTarget: Add CXX_STANDARD_REQUIRED to control decay.
1df2116b Features: Decay language flag if requested is not available.
c4f4dac2 Project: Fix exit-on-error with compile feature tests.
5bb7ce72 Project: Use nullary form of main for compile feature tests.
64254e7a Project: Remove extern from static string in feature tests.
0d9c99bf Help: Fix order of help entries.
dc7639bd Tests: Fix name of cache variable.
3b59f8b7 Project: Refactor C compiler determination into multiple files.
8896501b CompilerId: Allow specifying a prefix for preprocessor defines.
23f451bb CompilerId: Guard the platform-default compiler code with a parameter.
30a99f5c CompilerId: Add option to generate compiler-id-specific defines.
36ed5894 CompilerId: Allow specifying the compiler-specific components to generate.
9a083bce Project: Split the compiler id detection into a separate function.
9d285600 Project: Generate the CXX compiler Id test from multiple files.
Just like -I flag has its -isystem counterpart which marks an include
directory as a system directory and prevents unwanted warnings, on Apple
systems there is -iframework -- a system directory replacement for -F.
Use this flag to implement include_directories(SYSTEM) for frameworks.
This will allow sharing of the logic of the order to test compilers in
and the preprocessor macros used to do that and to determine the
version components.
Use the highest standard compile flags available if requested language
version is too new.
This supports use-cases like
set(CMAKE_CXX_STANDARD 14)
# Compiled with -std=c++11 with GNU 4.7, which has no -std=c++14
# or equivalent flag
add_executable(main main.cpp)
This can be used in combination with preprocessor defines which
communicate the availability of certain language features for
optional use.
When ncurses is built with USE=tinfo we need to find "tinfo" as a
dependency of the main library. Otherwise 'cbreak' is missing:
ld: ...: undefined reference to symbol 'cbreak'
ld: note: 'cbreak' is defined in DSO /lib/libtinfo.so.5 so try adding
it to the linker command line
See https://bugs.gentoo.org/show_bug.cgi?id=468622 for more information.
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
Take our CURSES_USE_NCURSES code path when CURSES_NEED_NCURSES is
enabled even if CURSES_CURSES_LIBRARY also happens to be found.
Applied-by: Rolf Eike Beer <eike@sf-mail.de>
For example if one installs Xcode 4.6 on OS X 10.9, it doesn't contain
a 10.9 SDK, so fallback to the next newest version which, in this case,
happens to be a 10.8 SDK.
This fixes bug #14572.
The MBCS (Multi-Byte Character Set) has been deprecated with VS 2013,
and MSVC no longer ships with an MBCS-version of MFC by default.
However, it can be downloaded as an add-on.
Teach InstallRequiredSystemLibraries to install the MBCS MFC only
for VS < 12 or if it happens to exist on the system.
In commit v3.0.0-rc1~103^2~3 (ExternalProject: Reattempt download when
verification fails, 2014-01-15) a reference to ${CMAKE_COMMAND} was
added to generate a reference to the CMake command in a cmake script.
Escape the '$' so that the literal variable reference appears in the
script instead of writing the path to the current cmake. This is
necessary when the path to CMake contains spaces or other characters
special to CMake syntax.
bbc358c3 Merge branch 'master' into osx-init-early
0cce556b Xcode: Use sysroot and deployment target to identify compiler
0200d0a9 OS X: Factor a Darwin-Initialize module out of Platform/Darwin
416761e3 Add platform-specific initialization step when enabling languages
Use CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET to set the Xcode
SDKROOT and MACOSX_DEPLOYMENT_TARGET build settings. This is necessary
because some versions of Xcode select a different compiler based on
these settings. We need to make sure the compiler identified during
language initialization matches what will be used for the actual build.
Initialize variables CMAKE_OSX_SYSROOT, CMAKE_OSX_DEPLOYMENT_TARGET, and
CMAKE_OSX_ARCHITECTURES prior to enabling any languages. This will
allow compiler identification to consider these values.
Create a Modules/CMakeSystemSpecificInitialize.cmake module loaded after
CMakeSystem.cmake but before per-language initialization. Use it to
load an optional Platform/<os>-Initialize.cmake module. This will be
useful to do per-platform initialization that does not depend on the
language and use the results when enabling specific languages.
Old versions of aCC need a special compiler flag to get full C++98 template
support as e.g. CMake itself or the Complex and ComplexOneConfig tests need.
The same versions need a special flag to get a proper C++ library, too.
When the primary source tree path named by a DATA{} reference does not
exist, produce an AUTHOR_WARNING instead of a FATAL_ERROR. This is
useful when writing a new DATA{} reference to a test reference output
that has not been created yet. This way the developer can run the test,
manually verify the output, and then copy it into place to provide the
reference and eliminate the warning.
If the named source tree path is expected to be a file but exists as a
directory, we still need to produce a FATAL_ERROR.
Generalize the change from commit 39d0ade0 (Windows-GNU: Support
duplicate object names in large archives, 2014-04-14) to the default
archive rules. These rules have used an incremental append approach
since commit v2.8.0~1856 (Build large archives incrementally,
2008-08-04). Switch from "ar r" to "ar q" to be sure we always append
objects instead of replacing them.
Extend CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES with these paths. We
already have the equivalents under /usr. Systems that have these
directories have their dynamic loaders configured already. Do not allow
them to appear in the RPATH explicitly.
f21ac16e Replace MATCHES test on numbers with EQUAL test
7eacbaed Replace MATCHES ".+" tests with NOT STREQUAL ""
3a71d34c Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient
b0b4b460 Remove .* expressions from beginning and end of MATCHES regexs
5bd48ac5 Replace string(REGEX REPLACE) with string(REPLACE) where possible
2622bc3f Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
97f2b7f5 Ninja: set correct LANGUAGE_COMPILE_FLAGS when linking
49fcffc6 Ninja: cmake formatting, make code more readable
b735c8cb MinGW: link like on Unix and use compile flags when linking
Since commit v2.6.0~388 (Added build rule variables
CMAKE_<LANG>_ARCHIVE_..., 2008-01-29) we use separate "ar cr ..." and
"ar r ..." steps to incrementally add a large list of object files to an
archive. Since the "r" command replaces existing objects of the same
name in an archive, if multiple objects have the same file name and
appear in separate append steps then one overwrites the other. Instead,
use "ar cq ..." and "ar q ..." to always append to the archive.
We already remove the archive before creating it so this will not cause
objects to be appended to existing archives on incremental rebuilds.
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.
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.
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.
f0de3f80 CMakeDetermineVSServicePack: Add VS 11 update 4
105658df CMakeDetermineVSServicePack: Match versions more robustly
101515b9 CMakeDetermineVSServicePack: Format documentation
7147ed5c CMakeRCInformation: Recognize 'windres' tools with '.' in name (#14865)
db924e00 CMakeRCInformation: Do not mention 'Fortran' in documentation
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.
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.