Hi, I am completely baffled by following results to get string values from a function, please enlighten me what was wrong in following simplified function?
function(GetParameterDebug oa ob oc od) set(a "sa") set(b "sb") set(c "sc") set(d "sd") set(${oa} ${a} PARENT_SCOPE) set(${ob} ${b} PARENT_SCOPE) set(${oc} ${c} PARENT_SCOPE) set(${od} ${d} PARENT_SCOPE) message("## 1: a = .${a}. b = .${b}. c=.${c}. d=.${d}.") message("## 2: oa = .${oa}. ob = .${ob}. oc = .${oc}. od = .${od}.") endfunction(GetParameterDebug) GetParameterDebug(string_a, string_b, string_c, string_d) message("## debug string_a = .${string_a}., string_b = .${string_b}., string_c = .${string_c}., string_d = .${string_d}.") The result: ## 1: a = .sa. b = .sb. c=.sc. d=.sd. ## 2: oa = .string_a,. ob = .string_b,. oc = .string_c,. od = .string_d. ## debug string_a = .., string_b = .., string_c = .., string_d = .sd. The about print out ##1 was good, the ##2 and ## debug were completely wrong. Thank you and appreciate explanation. -- View this message in context: http://cmake.3232098.n2.nabble.com/baffled-by-function-string-value-set-up-tp7580942.html Sent from the CMake mailing list archive at Nabble.com. -- 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