<div class="gmail_quote">On Mon, Apr 20, 2009 at 4:28 AM, Denis Scherbakov <span dir="ltr"><<a href="mailto:denis_scherbakov@yahoo.com">denis_scherbakov@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Elizabeta,<br>
<br>
In your code snippet everything is ok. CMAKE_MFC_FLAG is 2 after it is set. No sooner no later. If you give complete example, which does not work, then you'll get an answer.<br>
<br>
Did you mean the following?<br>
<br>
ADD_SUBDIRECTORY(ProjectA) # MFC_VAR not defined<br>
SET (MFC_VAR 2)<br>
ADD_SUBDIRECTORY(ProjectB) # MFC_VAR == 2<br>
<br>
I would advise against declaring variables with CMAKE_ prefix, since they can interfece with internal CMake variables.</blockquote><div><br>Actually, CMAKE_MFC_FLAG is a special variable:<br><br><a href="http://www.vtk.org/Wiki/CMake_FAQ#How_to_use_MFC_with_CMake">http://www.vtk.org/Wiki/CMake_FAQ#How_to_use_MFC_with_CMake</a><br>
<br></div></div>-- <br>Philip Lowman<br>