[cmake-developers] Fwd: [CMake 0016022]: GenerateExportHeader DEFINE_NO_DEPRECATED define conflicts

Andreas Schuh andreas.schuh.84 at gmail.com
Thu Mar 17 07:23:29 EDT 2016


Hi,

regarding this issue report, I’ve just attached a patch <https://cmake.org/Bug/file_download.php?file_id=5646&type=bug> for the current HEAD of the master branch that fixes the issue. Please have a look and it would be great if somebody could apply it. It currently causes problems in particular for projects using VTK, which may need this patch to be applied as well, given that it ships its own copy of the GenerateExportHeader module.

Cheers,
Andreas

> Begin forwarded message:
> 
> From: Mantis Bug Tracker <mantis at public.kitware.com>
> Subject: [cmake-developers] [CMake 0016022]: GenerateExportHeader DEFINE_NO_DEPRECATED define conflicts
> Date: 16 March 2016 at 21:28:00 GMT
> To: cmake-developers at cmake.org
> 
> 
> The following issue has been SUBMITTED. 
> ====================================================================== 
> https://cmake.org/Bug/view.php?id=16022 
> ====================================================================== 
> Reported By:                Andreas Schuh
> Assigned To:                
> ====================================================================== 
> Project:                    CMake
> Issue ID:                   16022
> Category:                   Modules
> Reproducibility:            always
> Severity:                   minor
> Priority:                   normal
> Status:                     new
> ====================================================================== 
> Date Submitted:             2016-03-16 17:27 EDT
> Last Modified:              2016-03-16 17:28 EDT
> ====================================================================== 
> Summary:                    GenerateExportHeader DEFINE_NO_DEPRECATED define
> conflicts
> Description: 
> The header file generated by generate_export_header adds a
> 
>    #define DEFINE_NO_DEPRECATED 0|1
> 
> macro which is used to decide whether or not to define the respective macro with
> the desired library prefix and base name. But this macro has the same name for
> all libraries and is not undefined when it is no longer needed. In my project,
> this for example created a conflict with the VTK library which uses such
> generated header file which must of course be included in the public header
> files.
> 
> To solve this conflict, I am using now (temporarily) a custom
> exportheader.cmake.in template file by changing the
> _GENERATE_EXPORT_HEADER_MODULE_DIR path to a directory in my project after
> including the GenerateExportHeader module. Find the modified template file
> attached.
> 
> There is certainly a better fix for this bug.
> ====================================================================== 
> 
> Issue History 
> Date Modified    Username       Field                    Change               
> ====================================================================== 
> 2016-03-16 17:27 Andreas Schuh  New Issue                                    
> 2016-03-16 17:28 Andreas Schuh  File Added: exportheader.cmake.in               
> 
> ======================================================================
> 
> -- 
> 
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160317/af3d2ef6/attachment-0001.html>


More information about the cmake-developers mailing list