Hi Alan,

Thanks, I wasn't aware of the shift towards the use of FUNCTIONs.  Because of 
the developers I need to support, I've been mosting working with CMake 2.6.  I 
didn't realize that this was one of the things 2.8 brought to the table.

- Christian

> -----Original Message-----
> From: Alan W. Irwin [mailto:ir...@beluga.phys.uvic.ca] 
> Sent: Sunday, June 27, 2010 16:49
> To: Convey, Christian J CIV NUWC NWPT
> Cc: alokgo...@hotmail.com; cmake@cmake.org
> Subject: Re: [CMake] An observation about CTest
> 
> Your remarks focus on old-fashioned macros so it is possible 
> you are not aware of functions? As far as I know, most or all 
> macros can be replaced by functions which do have the nice 
> property of not polluting the global namespace.  So newly 
> developed build systems should use functions wherever 
> possible, and certainly for old CMake-based build systems I 
> am associated with I am trying to move to functions as time permits.
> 
> Here are some rough counts of functions and macros actually 
> contained in 2.8.x:
> 
> ir...@raven> grep -i function cmake-2.8/Modules/*.cmake |grep 
> -v '#' |wc -l
> 263
> ir...@raven> grep -i macro cmake-2.8/Modules/*.cmake |grep -v 
> '#' |wc -l
> 337
> 
> Those numbers should be divided by roughly a factor of two 
> (because of ENDFUNCTION and ENDMACRO) to get approximate 
> counts of functions and macros.
> 
> Clearly, the replacement of macros by functions is well on 
> its way for 2.8.x, but the process is still far from 
> completed.  Once it is complete, however, the global 
> namespace will be much less polluted.
> 
> Another namespace remark is that subdirectory variables do 
> not pollute the global namespace of their parent directories.
> 
> So the global namespace pollution issue is not as bad as you 
> have outlined and because of functions is steadily improving.
> 
> Alan

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
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://www.cmake.org/mailman/listinfo/cmake

Reply via email to