View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000541CMakeModulespublic2004-01-26 08:382007-08-30 10:56
ReporterOndrej Svetlik 
Assigned ToBill Hoffman 
PriorityhighSeverityfeatureReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000541: Variable variable works wrong in macros
DescriptionVariable variable in macros works only with macro parameters, why? I set a "local" variable and it doesn't work.

Try this:
CMakeLists.txt:
MACRO(SHOW_BUG name)
                                                                                        MESSAGE(${${name}_DIR})
                                                                                        SET(SOMETHING ${name})
                                                                                        MESSAGE(${${SOMETHING}_DIR})
                                                                                        ENDMACRO(SHOW_BUG)
                                                                                        
SET(test_DIR "./")
SHOW_BUG(test)

# cmake .
-- Check for working C compiler: gcc -- works
-- Check for working CXX compiler: c++ -- works
./
_DIR}
-- Configuring done
-- Generating done
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0000857)
Bill Hoffman (manager)
2004-04-10 08:22

"Variable Variables" only work for the arguments of a macro, and do not work in general or with other variables.

 Issue History
Date Modified Username Field Change
2007-08-03 18:11 Berk Geveci Note Deleted: 0008281
2007-08-03 18:13 Berk Geveci Assigned To Utkarsh Ayachit =>
2007-08-03 18:13 Berk Geveci Status new => closed
2007-08-03 18:13 Berk Geveci Resolution won't fix => no change required
2007-08-03 18:13 Berk Geveci Summary Goodsite => Variable variable works wrong in macros
2007-08-03 18:13 Berk Geveci Project ParaQ-Administrative => CMake
2007-08-03 18:14 Berk Geveci Status closed => assigned
2007-08-03 18:14 Berk Geveci Assigned To => Bill Hoffman
2007-08-30 10:56 Alex Neundorf Status assigned => closed


Copyright © 2000 - 2018 MantisBT Team