<br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">ankit jain</b> <span dir="ltr"><<a href="mailto:ankitguddu@gmail.com">ankitguddu@gmail.com</a>></span><br>Date: 2009/5/14<br>
Subject: Settings different compile options for diff. files in same folder..<br>To: <a href="mailto:cmake@cmake.org">cmake@cmake.org</a><br><br><br>Hi all,<br><br>I have a folder in which there are 5 files<br>folder<br> a1.c<br>
a2.c<br> a3.c<br> a4.c<br> a5.c<br><br>Out of these from 4th and 5th iam making a library if iam working on windows else with the rest three iam building one library for the folder.<br>
Even on windows also iam making this library but making one more library for the files 4th and 5th.,.<br><br>Problem:::<br><br>Now the problem is that for the first three files i set certain macros and certain CXX compile flags.<br>
But for the 4th and 5th files i need not want these settings..<br>I want no macros and only two diff. compile flags /clr and /MD for compiling these files and certain things for linking like /STCAK:value /NOENTRY /NODEFUALTLIB:value<br>
<br>But when i am settings these using the set_source_files_properties the older properties also exists there. they are not removed..<br><br>I dont understand how to remove old one and set new settings for these files only,<br>
<br>Remember iam working on windows.(Visual studio .NET 2003)<br>when iam setting /clr /RTC will not be there but since it is set earlier it is not removed i dont know why...<br><br><br>What i need to do is this::(do not want previous settings of compiler flags and linkage)<br>
<br>
cl /clr /MD -I../include/ -m -c perfdata.C <br>
cl /clr /MD -I../include/ -m -c perfinit.C <br>
<br>
these are my 4th and 5th file as i mentioned..<br>
<br>
link /NOENTRY msvcrt.lib mscoree.lib kernel32.lib /DLL /STACK:0xC00000
/NODEFAULTLIB:nochkclr.obj /INCLUDE:__DllMainCRTStartup@12
/OUT:liborchperfdatant.dll perfdata.o perfinit.o<br><br><br>One more problem is there that is set the properties of files through the set_source_files_properties and suppose i want to set two flags while compiling like this:<br>
<br>set_source _files_properties(${source} PROPERTIES COMPILE_FLAGS /clr;/MD)<br><br>it does not taking it.. only one flag iam able to set not multiple flags..<br><br>One example if you give will give me great help..<br>
Can anybody let me know how to do all these...<br>
If any clarification required please let me know..<br><br>Regards-<br><font color="#888888">ankit jain<br>
</font></div><br>