[CMake] Weird STREQUAL result
Dirk Thomas
dthomas at osrfoundation.org
Sat Aug 30 14:21:32 EDT 2014
I guess I asked the question without searching enough before.
It indeed seems to be "indented behavior".
Answering my own question with the following link:
http://stackoverflow.com/questions/19982340/cmake-compare-to-empty-string-with-strequal-failed
Sorry for the noise.
- Dirk
On Sat, Aug 30, 2014 at 11:13 AM, Dirk Thomas <dthomas at osrfoundation.org> wrote:
> I ran into weird behavior with STREQUAL and boiled it down to the
> following simple example:
>
> cmake_minimum_required(VERSION 2.8)
> if("f" STREQUAL "")
> # happens with CMake version 2.8.12.2
> message(FATAL_ERROR "This should not be TRUE: 'f' STREQUAL '' ")
> endif()
>
> I would expect that the condition evaluates to FALSE since the two
> strings are obviously not equal.
> But in my case (using CMake 2.8.12.2 on Ubuntu 14.04) the condition
> evaluates to TRUE.
>
> Is this a known bug, should I fill a ticket for it or is that
> "expected" behavior?
> If it is the latter could someone please describe why that is the case?
>
> Thank you,
> - Dirk
More information about the CMake
mailing list