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.
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>