MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0014737 | CMake | CMake | public | 2014-02-05 10:49 | 2016-06-10 14:31 |
Reporter | Alex Merry | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | GNU | OS | Linux | OS Version | |
Product Version | CMake-2-8 | ||||
Target Version | Fixed in Version | ||||
Summary | 0014737: if(ENV{FOO}) should work like if(FOO) but for env vars | ||||
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 | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | testenv.cmake (303) 2014-02-05 10:49 https://public.kitware.com/Bug/file/5062/testenv.cmake | ||||
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 | |||
2014-02-05 12:39 | Brad King | Note Added: 0035040 | |||
2014-02-05 12:41 | Brad King | Note Added: 0035041 | |||
2014-02-05 12:45 | Alex Merry | Note Added: 0035042 | |||
2014-02-06 07:29 | Alex Merry | Note Added: 0035043 | |||
2014-02-06 08:52 | Brad King | Note Added: 0035044 | |||
2014-02-06 08:52 | Brad King | Severity | minor => feature | ||
2014-02-06 08:52 | Brad King | Status | new => backlog | ||
2014-02-06 08:52 | Brad King | Summary | $ENV{FOO} always evaluates to FALSE => if(ENV{FOO}) should work like if(FOO) but for env vars | ||
2016-06-10 14:29 | Kitware Robot | Note Added: 0042477 | |||
2016-06-10 14:29 | Kitware Robot | Status | backlog => resolved | ||
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|