Since commit v3.1.0-rc1~564^2 (OS X: Use -iframework for system
framework directories, 2014-05-05) we test the version of Clang is smaller
that 3.1 to see if it supports -iframework.
Considering that "iframework" support has been added in clang@r142418
(Frontend: Support -iframework.) prior to clang 3.1, this made sense.
That said, considering that support for multiple -iframework parameters
has been added later in clang@r164607 (-iframework should allow separate
arguments. ) prior to clang 3.2, this commit updates the check to enable
framework support only if version is >= 3.2
We originally deprecated this module in commit v3.5.0-rc1~295^2
(CMakeForceCompiler: Deprecate this module and its macros, 2015-10-19).
Then a use case was found to still require the module so the deprecation
was reverted for CMake 3.5 by commit v3.5.0-rc3~4^2 (CMakeForceCompiler:
De-deprecate until more use cases have alternatives, 2016-02-17). Since
then `CMAKE_TRY_COMPILE_TARGET_TYPE` was introduced to provide an
alternative solution for that use case. Deprecate the module again.
Canonicalize the input paths so we treat them both consistently,
in particular when comparing them via string operations. This
is needed for calls like
fixup_bundle("${CMAKE_INSTALL_PREFIX}/../test" ...)
Suggested-by: Benjamin Ballet <bballet@ivsweb.com>
Teach the Ninja generator to add the `-current_version` and the
`-compatibility_version` flags based on the VERSION and SOVERSION target
properties just as the Makefile generators do.
Signed-off-by: Bruce Stephens <bruce.r.stephens@gmail.com>
Move this method from cmMakefileLibraryTargetGenerator so it can be
re-used for the Ninja generator too.
Signed-off-by: Bruce Stephens <bruce.r.stephens@gmail.com>
Calling `project()` or `enable_language()` from a toolchain file will
infinitely recurse since those commands load the toolchain file.
Diagnose and reject this case with an error message instead of crashing
when the stack eventually overflows.
Use recommended case for variable names. i.e. matching name of the
module as passed to `find_package`.
For backwards compatibility, the upper case versions of both input and
output variables are used and defined when appropriate. Skip this for
the _FOUND variable because FPHSA already does it. Skip this for the
_VERSION variable because that was recently added and never available
with the old name in a release of CMake.
Also detect the library version number. Provide results as variables
and as an imported target, LTTng::UST.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Since commit v3.4.2~2^2 (VS: Fix VS 2015 .vcxproj file value for
GenerateDebugInformation, 2016-01-08) we generate invalid project
files for the v110 and v120 toolsets. VS complains:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(639,9):
error MSB4030: "Debug" is an invalid value for the "GenerateDebugInformation" parameter of
the "Link" task. The "GenerateDebugInformation" parameter is of type "System.Boolean".
This reveals that our VS flag map selection should be based on the
toolset instead of the version of VS. However, that will be a
non-trivial change so for now fix this particular use case by
hard-coding a correction to the flag map.
Reported-by: Gregor Jasny <gjasny@googlemail.com>
Since https is almost ubiquitous nowadays we should support it by
default whenever possible. When building our own curl, we already
automatically enable SSL/TLS support on Windows and OS X by using the
OS-native APIs. On UNIX platforms we need to use OpenSSL but have not
done so by default before, leading to possible user confusion when https
transfers fail later. Fix this by searching for OpenSSL quietly and
enabling use of it automatically if it is found.
Do this only on Linux and FreeBSD for now because on other UNIX
platforms (e.g. AIX, HP-UX, SunOS) it seems too easy to find an
OpenSSL that is not compatible with the target compiler.