toeb / cmakepp

An Enhancement Suite for the CMake Build System
Other
435 stars 37 forks source link

consistent return values #3

Closed toeb closed 10 years ago

toeb commented 10 years ago

the current method of returning values via set(... ... PARENT_SCOPE) is a bad idea. a single returnvalue should be used with a always same name and call scheme (through a global property)

the global property allows result to bubble up.

see. e.g. return_result() and result()

alternatively just set result field for the parent scope blindly at the end of each function (this is faster and cleaner but requires every function to perform a call a method to return )

when a returnvalue scheme is implemented all the macro calls can be eliminated (they cause alot of headache)

toeb commented 10 years ago

added return() in combination with ans() and __ans field