> Would > RAISE_SCOPE(var1 var2 ... varN) > be better ? > Why was the syntax changed from that to > RAISE_SCOPE(varname value) ? > (which was basically a set() and that's why converted to > set(... PARENT_SCOPE) )
The old syntax of raise scope often required that you first set the value of the variable locally then raise it. This was prone to cause variable collision. For example... function (foo var) set ("${var}" "wasabi"} raise_scope("${var}") endfunction(foo) foo(var) message ("var should be set to wasabi but is set to: ${var}") results in var being undefined when it should be set to wasabi. Using the new syntax... function (foo var) set ("${var}" "wasabi" PARENT_SCOPE} endfunction(foo) foo(var) message ("var should be set to wasabi but is set to: ${var}") produces the correct result. Ken _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake