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

Reply via email to