Hi Oliver, Use the option PARENT_SCOPE when setting the variable.
HTH, Marcel Loose. On Mon, 2009-11-09 at 11:11 +0100, Olivier Pierard wrote: > Hi, > > I'm facing another rather simple problem. > > I try to modify a variable defined in the main CMakeLists.txt within > another one called by the add_subdirectory command. Modification is > well taken into account in the subfolder but once back in the main one, > variable is set back to its previous value. Is there a way to avoid > this behavior ? > > Thanks for your help, > > Olivier > _______________________________________________ > 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 _______________________________________________ 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