[CMake] CMAKE_MFC_FLAG not working in functions

Robert Dailey rcdailey at gmail.com
Thu Oct 20 18:40:16 EDT 2011


I found out where I was going wrong based on how you guys said it isn't used
by add_executable(). I was doing this before:


set( CMAKE_MFC_FLAG 2 PARENT_SCOPE )
add_executable( ${project_name} WIN32 ${source} )
set( CMAKE_MFC_FLAG 0 PARENT_SCOPE )

I did this so that if I create any projects AFTER this one (in the same
directory & CMakeLists.txt script) that DO NOT use MFC, I didn't want them
to be affected by the flag. I'd still like to do this but it's no big deal.
Removing the bottom 'set' fixed it.

---------
Robert Dailey


On Thu, Oct 20, 2011 at 4:44 PM, Robert Dailey <rcdailey at gmail.com> wrote:

> There isn't any way to do a trace from cmake gui is there?
>
> Maybe that's a separate feature request on its own :P
>
> I'll check out the trace and follow up with results.
>
> ---------
> Robert Dailey
>
>
>
> On Thu, Oct 20, 2011 at 4:16 PM, Bill Hoffman <bill.hoffman at kitware.com>wrote:
>
>> On 10/20/2011 5:11 PM, Robert Dailey wrote:
>>
>>> So I created a small project to attempt to reproduce this problem on a
>>> much smaller scale, but it functioned as designed in that case.
>>>
>>> It's only in my large, corporate project that this happens. Is there any
>>> way to dump a "scope stack" or call stack of some sort in CMake? That
>>> way I can see what the real parent scope is? Maybe it's not what I think
>>> it is.
>>>
>>>
>> You could try cmake --trace
>>
>> It might help.
>>
>> -Bill
>>
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/**
>> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ>
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111020/a1e71268/attachment-0001.htm>


More information about the CMake mailing list