[cmake-developers] CMake string question
Rolf Eike Beer
eike at sf-mail.de
Fri Nov 9 09:12:52 EST 2018
Am 2018-11-09 14:55, schrieb Joachim Wuttke:
>>> if("${srcdir}" STREQUAL "${bindir}")
>>
>> if(srcdir STREQUAL bindir)
>
> looks more idiomatic, thank you Eike -
>
> But can we be sure that srcdir contains no blank?
> Or does STREQUAL work even for argument strings
> that contain blanks?
If you pass in only the variable names CMake will do the expansion only
internally, so this is save. It just works (tm).
Eike
--
More information about the cmake-developers
mailing list