From: J. L. M. <jl...@im...> - 2015-04-17 15:50:43
|
Hello! When configuring PLplot 5.11.0 from pkgsrc using my own pkgsrc plplot package definition on OS X Yosemite using CMake 3.0.2, I get the following error: === CMake Error at cmake/modules/pkg-config.cmake:202 (string): string sub-command REGEX, mode REPLACE needs at least 6 arguments total to command. Call Stack (most recent call first): cmake/modules/pkg-config.cmake:355 (pkg_config_link_flags) bindings/c++/CMakeLists.txt:83 (pkg_config_file) === I think the problem is that the ${link_flags} argument is not quoted, and if it's empty, then Cmake doesn't see it as an argument. If I quote it, then the configure succeeds. Below is a patch against the 5.11.0 release. Thank you! Lewis --- cmake/modules/pkg-config.cmake.orig 2015-04-12 10:08:04.000000000 +0000 +++ cmake/modules/pkg-config.cmake 2015-04-17 14:47:38.000000000 +0000 @@ -204,7 +204,7 @@ "/System/Library/Frameworks/([^ ]*)\\.framework" "-framework \\1" link_flags - ${link_flags} + "${link_flags}" ) #message("(frameworks) link_flags = ${link_flags}") endif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") |