[CMake] SET_TARGET_PROPERTIES seem not to work

ariasgore at gmx.de ariasgore at gmx.de
Fri Sep 4 05:53:15 EDT 2009


Hi,
current situation:
Main project includes two projects: project1 and project2.

Both of them has identical piece of code:

GET_TARGET_PROPERTY(CPF ${PROJECTNAME}  COMPILE_FLAGS)	
		IF(NOT CPF)
			SET(CPF "")
		ENDIF(NOT CPF)
		SET_TARGET_PROPERTIES(${PROJECTNAME} PROPERTIES COMPILE_FLAGS "${CPF} /Zc:wchar_t-")

I checked the PROJECTNAME and I checked COMPILE_FLAGS after setting them with 
GET_TARGET_PROPERTY(test_output ${PROJECTNAME}  COMPILE_FLAGS)	
Everything ok.
BUT in visual studio, where the situation applies in first project the coded worked on the summary command line I see the additional wchar_t- flag but not on the second project.
How can that happend. They are both called at the same time in the subprojects, which is after ADD_EXECUTABLE and TARGET_LINK_LIBRARIES.

Any help would be appreciated!

Thanks
Sam
-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser


More information about the CMake mailing list