MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0011701 | CMake | Documentation | public | 2011-01-14 14:51 | 2011-01-31 16:01 | |||||
Reporter | Markus Elfring | |||||||||
Assigned To | Brad King | |||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||
Status | closed | Resolution | fixed | |||||||
Platform | OS | OS Version | ||||||||
Product Version | CMake 2.8.3 | |||||||||
Target Version | CMake 2.8.4 | Fixed in Version | CMake 2.8.4 | |||||||
Summary | 0011701: Check condition evaluation for a passed variable | |||||||||
Description | The current documentation contains the following description. "... The convenience feature that sometimes throws new authors is how CMake handles values that do not match the true or false list. Those values are treated as variables and are dereferenced even though they do not have the required ${} syntax. This means that if you write if (boobah) CMake will treat it as if you wrote if (${boobah}) ..." I have written a small script to test the corresponding expectations. cmake_minimum_required(VERSION 2.6) project(my_condition_test1) set(MY_TEXT "condition-test1.cxx") if(MY_TEXT) message(STATUS "Good day.") else() message(FATAL_ERROR "Bad day!") endif() if(${MY_TEXT}) message(STATUS "This result was expected.") else() message(FATAL_ERROR "Which result should be expected here?") endif() I get the following log for my configuration try. "... Good day. CMake Error at CMakeLists.txt:12 (message): Which result should be expected here? Configuring incomplete, errors occurred!" I have got the impression that the mentioned "convenience feature" includes the (undocumented?) condition application "if(DEFINED variable)" so far. Which behaviour is correct in the demonstrated situation? Are you going to update any information sources for this issue? | |||||||||
Steps To Reproduce | ||||||||||
Additional Information | ||||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | ||||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2011-01-14 14:51 | Markus Elfring | New Issue | ||||||||
2011-01-14 15:08 | Markus Elfring | Note Added: 0024694 | ||||||||
2011-01-14 17:20 | Brad King | Relationship added | duplicate of 0010773 | |||||||
2011-01-14 17:21 | Brad King | Note Added: 0024696 | ||||||||
2011-01-14 17:21 | Brad King | Status | new => closed | |||||||
2011-01-14 17:21 | Brad King | Assigned To | => Brad King | |||||||
2011-01-14 17:21 | Brad King | Resolution | open => duplicate | |||||||
2011-01-15 02:30 | Markus Elfring | Note Added: 0024704 | ||||||||
2011-01-15 02:30 | Markus Elfring | Status | closed => feedback | |||||||
2011-01-15 02:30 | Markus Elfring | Resolution | duplicate => reopened | |||||||
2011-01-15 08:07 | Brad King | Note Added: 0024709 | ||||||||
2011-01-15 09:49 | Markus Elfring | Note Added: 0024712 | ||||||||
2011-01-15 09:49 | Markus Elfring | Status | feedback => assigned | |||||||
2011-01-15 10:26 | Brad King | Note Added: 0024715 | ||||||||
2011-01-15 13:00 | Markus Elfring | Note Added: 0024719 | ||||||||
2011-01-17 09:28 | Brad King | Note Added: 0024746 | ||||||||
2011-01-17 09:47 | Brad King | Note Added: 0024747 | ||||||||
2011-01-18 07:26 | Brad King | Note Added: 0024848 | ||||||||
2011-01-18 07:26 | Brad King | Status | assigned => closed | |||||||
2011-01-18 07:26 | Brad King | Resolution | reopened => fixed | |||||||
2011-01-18 07:31 | Markus Elfring | Note Added: 0024850 | ||||||||
2011-01-18 07:31 | Markus Elfring | Status | closed => feedback | |||||||
2011-01-18 07:31 | Markus Elfring | Resolution | fixed => reopened | |||||||
2011-01-18 07:54 | Brad King | Note Added: 0024851 | ||||||||
2011-01-18 07:54 | Brad King | Status | feedback => closed | |||||||
2011-01-18 07:54 | Brad King | Resolution | reopened => fixed | |||||||
2011-01-31 16:01 | David Cole | Fixed in Version | => CMake 2.8.4 | |||||||
2011-01-31 16:01 | David Cole | Target Version | => CMake 2.8.4 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|