This keeps coming up and there probably have been many discussions on how this might be "fixed" as well.

I am wondering if we could provide an alias for the "if" command (e.g. "safe_if") that would inherit cmIfCommand but would reimplement GetVariableOrString() without the variable lookup.

This would leave if() behavior intact for compatibility but would provide an alternative with less surprising semantics.

I would keep else() elseif() endif() without additional aliases and leave the behavior to the initial if variant.

Nils
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to