[CMake] set_target_properties called twice

Eric Clark eclark at ara.com
Tue Oct 16 16:19:59 EDT 2012


Frank,

Thank you for such a quick reply. However, this is not working either. It is correctly adding the value to my list for that property, but now it is using it as the whole value in Visual Studio. Here is what I have now for the first call:

set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/ENTRY:\"mainCRTStartup\"")

And, now for the second call, I have this:

set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY LINK_FLAGS "/INCREMENTAL:NO")

But, when I open Visual Studio, instead of setting them both, it now has "mainCRTStartup;/INCREMENTAL:NO" as the property value. Is there something I am doing wrong here? By the way, I tried both APPEND and APPEND_STRING, the only difference is the semi-colon goes away with APPEND_STRING.

Thanks,
Eric

From: Miller, Frank [mailto:FMiller at sjm.com]
Sent: Tuesday, October 16, 2012 2:58 PM
To: Eric Clark; CMake Mailing List (cmake at cmake.org)
Subject: RE: set_target_properties called twice

I think this is intended. The semantics are the same as the set function. You can use set_property with the APPEND or APPEND_STRING option to do what you want.

Frank

From: cmake-bounces at cmake.org<mailto:cmake-bounces at cmake.org> [mailto:cmake-bounces at cmake.org] On Behalf Of Eric Clark
Sent: Tuesday, October 16, 2012 2:53 PM
To: CMake Mailing List (cmake at cmake.org<mailto:cmake at cmake.org>)
Subject: [CMake] set_target_properties called twice

Hello,

I am currently having trouble with set_target_properties(...). I am trying to call it twice to set two different values for the same property. The first call I make looks like this:

set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/ENTRY:mainCRTStartup")

Then, I call it again with the following signature:

set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/INCREMENTAL:NO")

When I do this, the second call seems to override the previous call. Can anyone tell me if this is intended or a bug? And, if so, does anyone know of a work-around for this?

Thank You,
Eric

To be fond of something is better than merely to know it, and to find joy in it is better than merely to be fond of it. -- The Analects, Confucius


This communication, including any attachments, may contain information that is proprietary, privileged, confidential or legally exempt from disclosure. If you are not a named addressee, you are hereby notified that you are not authorized to read, print, retain a copy of or disseminate any portion of this communication without the consent of the sender and that doing so may be unlawful. If you have received this communication in error, please immediately notify the sender via return e-mail and delete it from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121016/1614e09d/attachment.htm>


More information about the CMake mailing list