MantisBT - CMake
View Issue Details
0015580CMakeCMakepublic2015-05-22 06:062016-06-10 14:31
J McG 
Kitware Robot 
normalminoralways
closedmoved 
GNU/LinuxCentOS7
CMake 2.8.12.1 
 
0015580: PROTOBUF_GENERATE_CPP does not add __attribute__(const|pure) to the suitable, generated, functions.
FindProtobuf.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.
1. 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})
Surely modifying the generator to add these attribute to the function generator should be pretty easy.
No tags attached.
Issue History
2015-05-22 06:06J McGNew Issue
2016-06-10 14:29Kitware RobotNote Added: 0042780
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042780)
Kitware Robot   
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.