[cmake-developers] [CMake 0011410]: Result of IF(<LIST>) is inconsistent
Mantis Bug Tracker
mantis at public.kitware.com
Fri Nov 5 12:38:28 EDT 2010
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=11410
======================================================================
Reported By: Marcel Loose
Assigned To:
======================================================================
Project: CMake
Issue ID: 11410
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2010-11-05 12:38 EDT
Last Modified: 2010-11-05 12:38 EDT
======================================================================
Summary: Result of IF(<LIST>) is inconsistent
Description:
This is a spin-off of issue http://public.kitware.com/Bug/view.php?id=9043 (see
towards the bottom of the
comments).
IF(<LIST>) produces inconsistent results. See the output of CMake when run
on the following CMakeLists.txt file:
$ cat ../CMakeLists.txt
cmake_minimum_required(VERSION 2.6)
project(List NONE)
set(a "NOTFOUND")
set(b "blub-NOTFOUND")
set(c "bar;blub-NOTFOUND")
set(d "blub-NOTFOUND;bar")
foreach(x a b c d)
if("${x}")
set(val TRUE)
else()
set(val FALSE)
endif()
message(STATUS "${x} -> ${val}")
endforeach()
$ cmake ..
-- a -> FALSE
-- b -> FALSE
-- c -> FALSE
-- d -> TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/loose/cmake/list/build
IMO d should also evaluate to FALSE.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-11-05 12:38 Marcel Loose New Issue
======================================================================
More information about the cmake-developers
mailing list