The following issue has been SUBMITTED. 
====================================================================== 
http://cmake.org/Bug/view.php?id=13376 
====================================================================== 
Reported By:                Bruce Cartland
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   13376
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   low
Status:                     new
====================================================================== 
Date Submitted:             2012-07-04 22:59 EDT
Last Modified:              2012-07-04 22:59 EDT
====================================================================== 
Summary:                    For unset variables IF(${var}) and IF(NOT ${var})
both return FALSE which fails to work for predefined vars such as CYGWIN
Description: 
(I'm a noob so please excuse if this is already report, not formatted correctly,
or invalid :)

See steps to reproduce.


Steps to Reproduce: 
message(STATUS "CYGWIN = '${CYGWIN}'")
if(${CYGWIN})
        message(STATUS "CYGWIN set")
else()
        set(CYGWIN 0) #this "fixes" the problem and results in expected 
behaviour
        message(STATUS "CYGWIN not set")
endif()
if(NOT ${CYGWIN})
        message(STATUS "CYGWIN not set")
else()
        message(STATUS "CYGWIN set - or is it?")
endif()

Additional Information: 
The script in steps to reproduce results in the following output:

-- CYGWIN = ''
-- CYGWIN not set
-- CYGWIN set - or is it?

Seems to me that FALSE should be defined to include blank as well as NO, etc OR
variables such as CYGWIN should be set to 0 and not left blank.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-07-04 22:59 Bruce Cartland New Issue                                    
======================================================================

--

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

Reply via email to