Set CMAKE_C_STANDARD and CMAKE_CXX_STANDARD only if they are not
already defined. This will allow users to add the settings with
different values to their local cache (e.g. on the command line).
In commit v3.1.0-rc1~484^2 (Help: Format and revise file() command
documentation, 2014-05-23) the signature of file(GENERATE) was
accidentally simplified too much and dropped specification of the
required argument ordering. Restore the signature to make the order
clear.
Convert the StringToInt helper into a StringToLong helper with a 'long'
result type. This will make the helper more useful to other callers
that want to use strtol.
While at it, also check errno after calling strtol in case the
conversion fails with a range error.
Because ctest reads in binary but writes in text mode, Windows' newline
transformation can be applied multiple times causing '\n' in the source
application to be written out as '\r\r\n' instead.
67cb50ab Help: Document that IMPORTED targets in Find modules may be UNKNOWN.
e18e21ae Help: Document IMPORTED_CONFIGURATIONS target property for Find modules.
f0d0d761 Help: Remove recommendation about checking minimum CMake version.
31452416 Help: Add useful links to IMPORTED targets and usage requirements.
b96b025b Help: Remove disadvantage creating IMPORTED targets in Find modules.
169f1166 Help: Link to cmake-packages(7) from the Module creation documentation.
Extend the BuildDepends test with a case covering multiple custom
command outputs with the second one consumed by another rule. With the
old "multiple output pair" infrastructure used in the Makefile and Xcode
generators this did not work. Now that it is fixed, test the case
explicitly.
Fix the generated makefiles for custom commands with multiple outputs to
list all the outputs on the left hand side of the build rule. This is
much simpler and more reliable than the old multiple-output-pair
infrastructure.
The Xcode generator uses Makefiles under a run-script build-phase to
drive custom commands. Fix the generated makefiles for custom commands
with multiple outputs to list all the outputs on the left hand side of
the build rule. This is much simpler and more reliable than the old
multiple-output-pair infrastructure.
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.
An IMPORTED target in either type of package can equally depend on
an IMPORTED target in a Find module, which must be found as a
dependency, which is presumably the problem being implied. This is
not a distinction of creating an IMPORTED target in a Find module.
If a source file COMPILE_FLAGS option adds "-wd", the .vcxproj file
will have a DisableSpecificWarnings setting for the source file.
Add to the setting a reference to %(DisableSpecificWarnings) to
inherit any such flags set for the whole target.
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 a CMake domain 'command' object is defined by CMakeTransform or the
'cmake:command' directive, generate the link target with a lower-case
name even if the command name is not all lower-case. This is needed to
make cross-references to the command definition work since the
'cmake:command' role is marked with the 'lowercase' property.
Copy CMAKE_EXE_LINKER_FLAGS into the test project generated by
try_compile, just like we already copy CMAKE_<LANG>_FLAGS.
Add CMake Policy CMP0056 to activate this behavior in a compatible way,
but do not warn by default when the policy is not set since it will
affect all try_compile calls.
Extend the RunCMake.try_compile test with a case covering this behavior
for each policy setting.
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.
With PushScope and PopScope, keeping track of another bit of data for
each scope isn't easy. Instead, store it as another CMake variable so it
gets implicitly tracked along with everything else.
This works in a revert of commit
7d674b5f0b.