On 03/03/2015 01:33 PM, Роман Донченко wrote:
> Since it's currently a macro, then due to macro processing rules, special
> characters inside the value are interpreted by the parser, which can
> result in syntax errors or a mismatch between the given default and the
> value the variable is actually set to.
> 
> Remove existing local workarounds for this issue, which are no longer
> required.

Thanks.  As nice as it would be to do that, the reason it has not been
done is that this API is exposed publicly.  Any existing calls within
other projects would also have such workarounds and they would be broken
by this change.

Instead one could introduce a new API function for this, e.g.

 cpack_maybe_set(...)

Existing calls to cpack_set_if_not_set within CMake itself can be
ported in an immediately following patch.  The macro can be documented
as deprecated with a suggestion to use the function instead.

If you work on that, please include tests (perhaps in the form of a
new Tests/RunCMake/CPack directory), documentation updates, and a
release note in a file such as 'Help/release/dev/cpack-maybe-set.rst'.

Thanks,
-Brad

-- 

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