Hi ,<br>Just as said, How can I change CFLAGS in configure in cmake?<br>for example in autotool:<br>//remove debug option<br>./configure --prefix=/opt&nbsp; CFLAGS=-O2<br><br>How to do it in cmake ?<br><br>regards<br><br><br><b><i>Eric Noulard &lt;eric.noulard@gmail.com&gt;</i></b> Ð´µÀ£º<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> 2007/5/15, Clark J. Wang <dearvoid@gmail.com>:<br>&gt; I have a C source file `foo.c' and I want to produce 2 executables like<br>&gt; this:<br>&gt;<br>&gt; $ gcc -DFLAG_1 -o foo_1 foo.c<br>&gt; $ gcc -DFLAG_2 -o foo_2 foo.c<br>&gt;<br>&gt; How should I write the CMake rules?<br><br>RTFM :))<br><br>May be you can try<br>ADD_EXECUTABLE(foo_1 foo.c)<br>SET_TARGET_PROPERTIES(foo_1<br>                               PROPERTIES COMPILE_FLAGS "-DFLAG_1")<br><br>ADD_EXECUTABLE(foo_2 foo.c)<br>SET_TARGET_PROPERTIES(foo_2<br>                               PROPERTIES COMPILE_FLAGS
 "-DFLAG_2")<br><br><br>-- <br>Erk<br>_______________________________________________<br>CMake mailing list<br>CMake@cmake.org<br>http://www.cmake.org/mailman/listinfo/cmake<br></dearvoid@gmail.com></blockquote><br><p>&#32;
                <hr size=1><a href="http://cn.mail.yahoo.com" target=blank>ÇÀ×¢ÑÅ»¢Ãâ·ÑÓÊÏä-3.5GÈÝÁ¿£¬20M¸½¼þ£¡</a>