View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015580CMakeCMakepublic2015-05-22 06:062016-06-10 14:31
ReporterJ McG 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformGNU/LinuxOSCentOSOS Version7
Product VersionCMake 2.8.12.1 
Target VersionFixed in Version 
Summary0015580: PROTOBUF_GENERATE_CPP does not add __attribute__(const|pure) to the suitable, generated, functions.
DescriptionFindProtobuf.cmake makes the PROTOBUF_GENERATE_CPP macro available. If I attempt to add_compile_options(-Wall -Wsuggest-attribute=pure -Wsuggest-attribute=const) I note that the generated code has not had these optimisation options applied.
Steps To Reproduce1. find_package(ProtoBuf)
2. add_compile_options(-Wall -Wsuggest-attribute=pure -Wsuggest-attribute=const)
3. PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${PROTOCOLS})
4. add_library(${PROJECT_NAME} OBJECT ${PROTO_SRCS} ${PROTO_HDRS})
Additional InformationSurely modifying the generator to add these attribute to the function generator should be pretty easy.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042780)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2015-05-22 06:06 J McG New Issue
2016-06-10 14:29 Kitware Robot Note Added: 0042780
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team