Am Sonntag, 13. April 2014, 07:05:27 schrieb Jiri Malak: > Hi, > > I enclosed patch for removing placeholder "x" from STREQUAL operands. > It does comparision transparent.
I very much would like to see that, but there is a problem: CMake may
interpret the operands of STREQUAL both as text and as variable name.
So this does what you expect for the moment:
if (${CMAKE_SYSTEM_NAME} STREQUAL Linux) ...
But now you will get into trouble:
set(Linux Windows)
Sadly the expression is even expanded when it is quoted as long as it is a
valid variable name. So what you could do is: replace the "x" by a simple
space and then quote the match string, because " Linux" is no valid variable
name. And the test for STREQUAL "x" can indeed be changed to STREQUAL "".
Eike
signature.asc
Description: This is a digitally signed message part.
-- 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/cgi-bin/mailman/listinfo/cmake-developers
