MantisBT - CMake
View Issue Details
0012959CMakeModulespublic2012-02-13 05:412013-11-04 09:33
David Demelier 
Stephen Kelly 
normalminoralways
closedfixed 
UnixFreeBSD9.0
CMake 2.8.7 
CMake 2.8.12CMake 2.8.12 
0012959: GenerateExportHeaders does not work for C
The module GenerateExportHeader creates some defines that may works for C too, but actually the module is only intented for C++.

All attributes may be used for C too, that means you can't use project(name C).
This example will not works:

project(mylib C)
include(GenerateExportHeader)

add_compiler_export_flags()
add_library(mylib mylib.c)
generate_export_header(mylib)
No tags attached.
Issue History
2012-02-13 05:41David DemelierNew Issue
2012-02-13 09:35Brad KingAssigned To => Stephen Kelly
2012-02-13 09:35Brad KingStatusnew => assigned
2012-07-16 07:39Stephen KellyNote Added: 0030049
2012-08-13 09:34Stephen KellyTarget Version => CMake 2.8.10
2012-10-01 14:19Stephen KellyTarget VersionCMake 2.8.10 => CMake 2.8.11
2013-05-17 09:33Robert MaynardTarget VersionCMake 2.8.11 => CMake 2.8.12
2013-06-05 10:22Stephen KellyNote Added: 0033245
2013-06-05 10:22Stephen KellyStatusassigned => resolved
2013-06-05 10:22Stephen KellyFixed in Version => CMake 2.8.12
2013-06-05 10:22Stephen KellyResolutionopen => fixed
2013-11-04 09:33Robert MaynardNote Added: 0034365
2013-11-04 09:33Robert MaynardStatusresolved => closed

Notes
(0030049)
Stephen Kelly   
2012-07-16 07:39   
I've worked on the fix for this:

https://gitorious.org/~steveire/cmake/steveires-cmake/commits/generate_export_header-fixes [^]

I'll finish it when development on CMake 2.8.10 opens.
(0033245)
Stephen Kelly   
2013-06-05 10:22   
This is now possible by replacing the use of

 add_compiler_export_flags()

with

 set(CMAKE_C_VISIBILITY_PRESET hidden)

and

 set(CMAKE_CXX_VISIBILITY_PRESET hidden)

as appropriate, or by setting the ${lang}_VISIBILITY_PRESET property to hidden on individual targets.
(0034365)
Robert Maynard   
2013-11-04 09:33   
Closing resolved issues that have not been updated in more than 4 months.