View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000992CMakepublic2004-07-19 14:042004-07-19 16:56
ReporterHarold Vanderpool 
Assigned ToBill Hoffman 
PrioritylowSeveritymajorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000992: SET_TARGET_PROPERTIES works for nmake but not for Visual Studio
DescriptionThe command
SET_TARGET_PROPERTIES(foo PROPERTIES LINK_FLAGS "lflag"

works correctly when generating nmake files. However no entry is made in foo.dsp when generating Visual Studio 6 files. In this case foo is an executable.

An additional line of
# ADD LINK32 lflag
would be the expected behavior in the .dsp.

The test code is:
ADD_EXECUTABLE(foo WIN32 ${FOO_HDRS} ${FOO_SRCS})
TARGET_LINK_LIBRARIES(foo lib1 lib2 lib3)
SET_TARGET_PROPERTIES(foo PROPERTIES LINK_FLAGS " /nodefaultlib:\"nafxcw.lib\" /nodefaultlib:\"nafxcwd.lib\" ")
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0001280)
Bill Hoffman (manager)
2004-07-19 16:56

The following worked with cmake 1.8.3 and 2.0.2:

ADD_EXECUTABLE(foo WIN32 foo.cxx)
SET_TARGET_PROPERTIES(foo PROPERTIES LINK_FLAGS "crazy flags")

In this example:
SET_TARGET_PROPERTIES(foo PROPERTIES LINK_FLAGS " /nodefaultlib:"nafxcw.lib" /nodefaultlib:"nafxcwd.lib" ")
The quotes are mismatched. CMake does not support nested quotes so if do this, it works:

SET_TARGET_PROPERTIES(foo PROPERTIES LINK_FLAGS " /nodefaultlib:nafxcw.lib /nodefaultlib:nafxcwd.lib ")

 




 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team