In commit v3.3.0-rc1~4^2 (FindPostgreSQL: Search some more common
packaging locations) the PostgreSQL_ADDITIONAL_SEARCH_PATHS variable was
removed. This was used e.g. by osm2pgsql to be able to build on CentOS
with recent PostgreSQL versions. At least add those locations from
yum.postgresql.org, which is a more or less official location.
Expose the binutils' machine name (typically used as a prefix on the
tool names) publicly. This is expected to match the `gcc -dumpmachine`
value.
Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
The NDK provides prebuilt toolchain files in directories named for the
host architecture. The NDK build system calls this `HOST_TAG`.
Expose the value publicly for use by clients that need to pass it
to external tools.
Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
When this variable is not set by the user or toolchain file, set it to
the default selected. This will be useful for client code that needs to
pass the value to an external tool that needs to find the same toolchain
in the NDK. Leave it empty for a standalone toolchain.
Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Since commit v3.7.0-rc1~348^2~3 (FindBISON: Change usage of [VERBOSE
<file>] to [VERBOSE [<file>]], 2016-07-16) we always list the VERBOSE
output file as an output of our custom command even if the option is not
used. This causes the rule to re-run every time (e.g. with Ninja).
Revert one hunk from that change (that looks incorrect) to fix it.
Closes: #16426
The options to the find_library call to create the imported target
used a literal string "HINTS /path NO_DEFAULT_PATH" instead of a
list of options. This resulted in never finding any library in my
testing.
Refactoring in commit v3.6.0-rc1~72^2 (HDF5: Rework component searching
to correctly find HL for all bindings, 2016-05-12) changed the default
behavior from finding only the C bindings to finding everything for the
enabled languages. Restore the original behavior for compatibility and
because many projects need only the C bindings.
Closes: #16397
`CPACK_RPM_COMPONENT_INSTALL` is the correct variable to set to enable
component packaging. `CPACK_RPM_PACKAGE_COMPONENT` is just set to a
component name when CPack calls corresponding installer.
`CPACK_DEB_COMPONENT_INSTALL` is the correct variable to set to enable
component packaging. `CPACK_DEB_PACKAGE_COMPONENT` is just set to a
component name when CPack calls corresponding installer.
Starting with Xcode 8 the SDK folder also contains an unversioned entry:
MacOSX.sdk
MacOSX10.12.sdk -> MacOSX.sdk
If this unversioned path is used CMake cannot detect the SDK version.
Furthermore, querying the SDK version via
xcodebuild -sdk <sysroot> -version Path
gives bogus results for the Command Line Tools installed into `/`.
The OS X deployment target version and SDK version are not as tied as
they once were, so this check is now more trouble than it is worth.
Simply remove it.
Closes: #16323
Revert commit v3.7.0-rc1~48^2 (Xcode: Convert maybe unversioned OSX
sysroot into versioned SDK path, 2016-09-25). The replacement of
`else()` with `if(CMAKE_OSX_SYSROOT)` defeats the prior handling of
`if("x${CMAKE_OSX_SYSROOT}" MATCHES "/")`. This causes the combination
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/
to not be honored and `-isysroot` to be emitted as a compiler flag
universally. We will need another solution to the problem the
now-reverted commit was meant to address.
Closes: #16394
Fix typo in variable used to communicate between matlab_add_unit_test
and its helper script MatlabTestsRedirect.cmake that was introduced in
commit v3.7.0-rc1~116^2 (FindMatlab: Extend matlab_add_unit_test to run
arbitrary test code, 2016-08-30).
The extension flags enabled by commit v3.6.0-rc1~120^2~1 (Features:
Record standard flags for Intel C/C++ on Windows, 2016-04-18) of the
form `-Qstd=gnu++11` are not supported by the Intel C/C++ Compiler for
Windows. Fall back to using the non-extension form of the flags.
Issue: #16384
Add `-fPIE -pie` to the default executable link flags when
`CMAKE_POSITION_INDEPENDENT_CODE` is enabled. This is required by
Android 16 and above for executables to run on the device.
Closes: #16382
If the toolchain file or cache does not set this, enable it
automatically based on the Android API version. Versions 16
and above expect position independent code.
Use the main `CMAKE_POSITION_INDEPENDENT_CODE` setting in favor of
hard-coding `-fpic` or `-fPIC` in the compiler flags for each ABI.
This allows CMake to use `-fpie` or `-fPIE` as needed when sources
are meant for executables, and `-fpic` or `-fPIC` for other sources.
See `${ndk}/build/core/default-build-commands.mk` for link flags the NDK
uses for executables. Add them to our default executable link flags.
Suppress `nocopyreloc` on `arm64-v8a` because it does not work with
some STL types.
Closes: #16380
Add missing "unwind" and "atomic" libraries needed for this combination.
See `${ndk}/sources/cxx-stl/llvm-libc++/libs/armeabi/libc++.a` for the
libraries the NDK uses.
Issue: #16380
The guard added by commit v3.7.0-rc1~229^2~17 (Android: Suppress new
functionality with Nsight Tegra in VS IDE builds, 2016-06-02) to
`Modules/Platform/Android-Determine.cmake` does not work in that
location because `CMAKE_VS_PLATFORM_NAME` is not set until after the
module is loaded. Change this particular guard to test for the Visual
Studio generator instead. If in the future we add support for using
Visual Studio for Android without Nsight Tegra then something more will
be needed, but this is good enough for now.
Closes: #16371
The change in commit v3.7.0-rc1~217^2 (FindwxWidgets: Add VS-versioned
library directory prefixes, 2016-08-24) works only for official
wxWidgets builds that add the VS-versioned directory prefixes. Local
wxWidgets builds still have an unversioned prefix. Search them.
Closes: #16366
The change in commit v3.4.0-rc2~6^2 (Xcode: Adjust deployment target SDK
version to host version, 2015-10-11) does not make sense when
cross-compiling. Make it conditional to fix this regression in some
cross-compiling cases.
Closes: #16355
Fix passing a list to the CMAKE_CACHE_ARGS and CMAKE_CACHE_DEFAULT_ARGS
options of ExternalProject_Add.
Following commit v3.7.0-rc1~273^2~1 (prefer list(APPEND) over
string(APPEND) where appropriate, 2016-08-08), the semicolon list
separator after the first list element was missing in the generated
cache.