[cmake-developers] [CMake 0011793]: namespace support

Mantis Bug Tracker mantis at public.kitware.com
Thu Feb 3 11:10:18 EST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=11793 
====================================================================== 
Reported By:                Peter Kuemmel
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11793
Category:                   CMake
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-02-03 11:10 EST
Last Modified:              2011-02-03 11:10 EST
====================================================================== 
Summary:                    namespace support
Description: 
Several commands have the directory as scope,
for instance add_definitions:

add_definitions(-DX)
add_library(X x.cpp)
add_library(antiX antiX.cpp)

When antiX.cpp doesn't compile with the definition X set 
then it is not possible to write such a cmake file.

Support of namespace could fix this:

namespace(x)
  add_definitions(-DX)
  add_library(X x.cpp)
endnamespace()
add_library/antiX antiX.cpp)


Attached a patch which adds this feature.

The only critical part is the usage of the new 
member variables current*, otherwise not using
namespace() is 100% backward compatible when no
variable with that name is used.




====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-02-03 11:10 Peter Kuemmel  New Issue                                    
2011-02-03 11:10 Peter Kuemmel  File Added: namespace.patch                    
======================================================================




More information about the cmake-developers mailing list