The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=14737
======================================================================
Reported By: Alex Merry
Assigned To:
======================================================================
Project: CMake
Issue ID: 14737
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-02-05 10:49 EST
Last Modified: 2014-02-05 10:49 EST
======================================================================
Summary: $ENV{FOO} always evaluates to FALSE
Description:
A script like
if($ENV{FOO})
# do something
endif()
will never evaluate the statements in the if() branch, regardless of the value
of the environment variable FOO.
Steps to Reproduce:
Store the attached testenv.cmake somewhere, then run
FOO="" cmake -P testenv.cmake
As expected, the output is
-- $ENV{FOO} =
-- $ENV{FOO} evaluates to FALSE
-- ENV{FOO} evaluates to FALSE
Now try
FOO="bar" cmake -P testenv.cmake
The output is
-- $ENV{FOO} = bar
-- $ENV{FOO} evaluates to FALSE
-- ENV{FOO} evaluates to FALSE
when the expected output would be
-- $ENV{FOO} = bar
-- $ENV{FOO} evaluates to TRUE
-- ENV{FOO} evaluates to TRUE
Additional Information:
Tested with cmake 2.8.12 and cmake 2.8.12.20140204-g5414b
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-02-05 10:49 Alex Merry New Issue
2014-02-05 10:49 Alex Merry File Added: testenv.cmake
======================================================================
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers