[CMake] Segmentation fault

Ghyslain Leclerc ghleclerc at gmail.com
Wed Jul 8 10:58:06 EDT 2015


Hello,

I think I have found a “bug” in CMake and as suggested in the Mantis Bug Tracker, I am writing here on the list before actually filing the bug report in case it’s actually not a bug. I have also searched in the already filed bugs for a few minutes to see if it already exists and it does not seem to.

Here is the bug:

I have used the following call in my CMakeLists.txt:
set_property( TARGET cli PROPERTY LINK_LIBRARIES ${CUR_LINK_LIBS} )

When the CUR_LINK_LIBS variable is empty, CMake crashed with a segmentation fault. Naively, I would have expected a CMake error saying incorrect number of arguments or something like that, which CMake does all the time.

Maybe this is normal behaviour for set_property.

I am running CMake 3.2.3 compiled/installed via Macports on OSX 10.10.4 and Xcode 6.4.

Thanks,
Ghyslain





More information about the CMake mailing list