[cmake-developers] [CMake 0015580]: PROTOBUF_GENERATE_CPP does not add __attribute__(const|pure) to the suitable, generated, functions.
Mantis Bug Tracker
mantis at public.kitware.com
Fri May 22 06:06:18 EDT 2015
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15580
======================================================================
Reported By: J McG
Assigned To:
======================================================================
Project: CMake
Issue ID: 15580
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-05-22 06:06 EDT
Last Modified: 2015-05-22 06:06 EDT
======================================================================
Summary: PROTOBUF_GENERATE_CPP does not add
__attribute__(const|pure) to the suitable, generated, functions.
Description:
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.
Steps to Reproduce:
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})
Additional Information:
Surely modifying the generator to add these attribute to the function generator
should be pretty easy.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-05-22 06:06 J McG New Issue
======================================================================
More information about the cmake-developers
mailing list