[CMake] Macro Problem

Ryan Pavlik rpavlik at iastate.edu
Wed Jul 14 12:29:20 EDT 2010


By default, variables (such as CMAKE_C_FLAGS and CMAKE_CXX_FLAGS) open a new
nested scope with each subdirectory.  So, any changes you make in a
directory will only be seen in that directory and its children, not any
parent or sibling directories.

So, in short, you can just do what you were planning to do, it should work
fine.

Ryan

On Wed, Jul 14, 2010 at 9:37 AM, <Michael.Schmidt at l-3com.com> wrote:

> Hello,
>
> My project has third party source in a subdirectory.  The third party
> source has to be compiled without special options.  With autoconf, we
> had "CFLAGS =".  How would I do the same with cmake and restore CFLAGS
> to their original value in the parent directory?
>
> Thanks,
> Mike
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpavlik at iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100714/0f559458/attachment.htm>


More information about the CMake mailing list