diff options
author | Adriaan de Groot <adridg@FreeBSD.org> | 2018-04-08 12:33:01 +0000 |
---|---|---|
committer | Adriaan de Groot <adridg@FreeBSD.org> | 2018-04-08 12:33:01 +0000 |
commit | 70cf3cded51569ca0e61b2c42dd983685b3c564a (patch) | |
tree | 6b68ebbbafca09aa4c5e70f52bb6fb445772bfa6 /databases/soci | |
parent | 37d4f2da9d360197db71a5f9d74f0450a640b02a (diff) | |
download | ports-70cf3cded51569ca0e61b2c42dd983685b3c564a.tar.gz ports-70cf3cded51569ca0e61b2c42dd983685b3c564a.zip |
Pre-emptively fix databases/soci for CMake 3.11.
With CMake 3.11, configure fails with this error:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
MYSQL_EMBEDDED_LIBRARIES
linked by target "cmTC_ec547" in directory /wrkdirs/usr/ports/databases/soci/work/soci-3.2.2/CMakeFiles/CMakeTmp
CMake Error at /usr/local/share/cmake/Modules/CheckIncludeFile.cmake:60 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
/usr/local/share/cmake/Modules/FindThreads.cmake:121 (CHECK_INCLUDE_FILE)
core/CMakeLists.txt:17 (include)
The underlying issue is that the test for MySQL embedded leaks the
library into CMAKE_REQUIRED_LIBRARIES, which are then picked up in
other feature tests. If the library wasn't found (which is normal,
it's not a dependency in the port) then those later tests fail.
CMake 3.11 is somehow stricter about this than CMake 3.10.
No PORTREVISION bump because it's a pre-emptive build fix and nothing
changes on the port.
Approved by: tcberner (mentor, implicit)
Notes
Notes:
svn path=/head/; revision=466798
Diffstat (limited to 'databases/soci')
-rw-r--r-- | databases/soci/files/patch-cmake_modules_FindMySQL.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/databases/soci/files/patch-cmake_modules_FindMySQL.cmake b/databases/soci/files/patch-cmake_modules_FindMySQL.cmake new file mode 100644 index 000000000000..ed538bdaf943 --- /dev/null +++ b/databases/soci/files/patch-cmake_modules_FindMySQL.cmake @@ -0,0 +1,14 @@ +Prevent CMAKE_REQUIRED_LIBRARIES from leaking out of this module. +If the embedded libs are not found, we don't want to have the +not-found libraries required by other modules. + +--- cmake/modules/FindMySQL.cmake.orig 2013-08-21 22:40:11 UTC ++++ cmake/modules/FindMySQL.cmake +@@ -119,6 +119,7 @@ endif(MYSQL_EMBEDDED_LIBRARIES) + set( CMAKE_REQUIRED_INCLUDES ${MYSQL_INCLUDE_DIR} ) + set( CMAKE_REQUIRED_LIBRARIES ${MYSQL_EMBEDDED_LIBRARIES} ) + check_cxx_source_compiles( "#include <mysql.h>\nint main() { int i = MYSQL_OPT_USE_EMBEDDED_CONNECTION; }" HAVE_MYSQL_OPT_EMBEDDED_CONNECTION ) ++unset( CMAKE_REQUIRED_LIBRARIES ) + + if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + set(MYSQL_FOUND TRUE) |