[CMake] CMAKE_EXE_LINKER_FLAGS not a list?

Gregory Peele ARA/CFD gpeele at ara.com
Wed Jan 6 14:58:19 EST 2010


David,

Thanks for the info, I understand how that can happen sometimes.  Can this quirk be explicitly mentioned in the help documentation so that people like me aren't caught by surprise?  Actually I just noticed that CMAKE_SHARED_LINKER_FLAGS and CMAKE_MODULE_LINKER_FLAGS aren't in the official 2.8 help documentation at all.

Thanks,
Gregory Peele, Jr.
Applied Research Associates, Inc.

From: David Cole [mailto:david.cole at kitware.com]
Sent: Wednesday, January 06, 2010 2:30 PM
To: Gregory Peele ARA/CFD
Cc: cmake at cmake.org
Subject: Re: [CMake] CMAKE_EXE_LINKER_FLAGS not a list?

On Wed, Jan 6, 2010 at 2:18 PM, Gregory Peele ARA/CFD <gpeele at ara.com<mailto:gpeele at ara.com>> wrote:
Hey all,

When tracking down why some custom linker flags weren't working right, I realized that CMAKE_EXE_LINKER flags (and its cousins for shared libraries) are not semicolon delimited lists but rather treat the flags as a single space-delimited string.  I also saw the closed bug report at http://public.kitware.com/Bug/view.php?id=7476 related to this issue.

I have adjusted my CMakeLists to work correctly given this behavior, but I'm wondering why this is the case, as the variable is semantically a list of linker arguments and I would intuitively expect the LIST commands to work properly with it.  Is it because it eventually gets stored in a target property which does not support list values?

Thanks,
Gregory Peele, Jr.
Applied Research Associates, Inc.


No special reason behind this quirk of behavior. It's just historical remnants. Has to be kept the same for now for backwards compatibility.

If we were doing it over again, it would probably be a list.


HTH,
David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100106/1b03f448/attachment.htm>


More information about the CMake mailing list