[CMake] CMAKE_MFC_FLAG not working in functions

Robert Dailey rcdailey at gmail.com
Wed Oct 19 19:08:38 EDT 2011


I have a function defined very high up in the directory tree at the root
CMakeLists file. Several levels below it, I have another CMakeLists file
that I call that function from.

The function sets CMAKE_MFC_FLAG to 2. I notice that this flag gets ignored
when it is set inside of the function in question. If I set the flag outside
of the function, in the lowest level CMakeLists file, it works. This
property seems somehow tied to the directory itself, but I can't figure out
if this is a feature or a bug.

This behavior isn't very flexible as I'd like to make the details of
configuring an MFC compatible project transparent to the lower level
CMakeLists scripts. Hiding away the flag and how it needs to be set is a big
part of this, but I can't do it.

Anyone know how I can make this work?

---------
Robert Dailey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111019/e3e36207/attachment.htm>


More information about the CMake mailing list