The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15380 
====================================================================== 
Reported By:                Alina
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15380
Category:                   CMake
Reproducibility:            sometimes
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-01-28 10:27 EST
Last Modified:              2015-01-28 10:27 EST
====================================================================== 
Summary:                    Optional arguments for macros are ignored by if()
Description: 
The issue was reproduced also on CMake 3.0.2 on OS X Yosemite.

Documentation points to the following :
"In the first case you can use if(${ARGV1}), in the second case, you can use
foreach(loop_var ${ARGN}) but this will skip empty arguments. If you need to
include them, you can use:"
http://www.cmake.org/cmake/help/v3.0/command/macro.html

But if on any ARGVXXX is always false.

An simple example is attached.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-01-28 10:27 Alina          New Issue                                    
2015-01-28 10:27 Alina          File Added: CMakeLists.txt                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to