View Issue Details [ Jump to Notes ] | [ Print ] |
ID | Project | Category | View Status | Date Submitted | Last Update |
0015580 | CMake | CMake | public | 2015-05-22 06:06 | 2016-06-10 14:31 |
|
Reporter | J McG | |
Assigned To | Kitware Robot | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | |
Platform | GNU/Linux | OS | CentOS | OS Version | 7 |
Product Version | CMake 2.8.12.1 | |
Target Version | | Fixed in Version | | |
|
Summary | 0015580: 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. |
Tags | No tags attached. |
|
Attached Files | |
|