View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012128 | CMake | Modules | public | 2011-04-27 14:12 | 2011-11-11 10:45 | ||||
Reporter | Dat Chu | ||||||||
Assigned To | Philip Lowman | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | x86-64 | OS | Windows | OS Version | 7 | ||||
Product Version | CMake 2.8.4 | ||||||||
Target Version | CMake 2.8.5 | Fixed in Version | CMake 2.8.5 | ||||||
Summary | 0012128: FindProtobuf module behavior under Windows is annoying | ||||||||
Description | FindProtobuf module at the moment does not allow a Windows user to choose where he has downloaded and built the ProtocolBuffer library. It forces the user to choose by hand 4 variables: library, include, protoc library and protoc executable. If the user chooses a Release version of the built programs and libraries, then try to build his project in Debug mode, he will receive the error: _iterator_debug_level value '0' doesn't match value '2' The module currently, thus, does not support multi-type build on Windows | ||||||||
Steps To Reproduce | - Build ProtocolBuffer - Configure a project which uses ProtocolBuffer choosing the Release version - Build the project in Debug | ||||||||
Additional Information | Attached is the updated FindProtobuf.cmake which solves these issues. Under Windows, there is a new variable: PROTOBUF_SRC_ROOT_FOLDER which will be used to resolved the rest of the variables. The user only need to specify this variable in order to have ProtocolBuffer detected. Steps: - Download ProtocolBuffer - Build ProtocolBuffer with the supplied sln file - Configure project which uses ProtocolBuffer - Set PROTOBUF_SRC_ROOT_FOLDER to where one downloaded ProtocolBuffer | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | FindProtobuf.cmake [^] (5,946 bytes) 2011-04-27 14:12 FindProtobuf2.cmake [^] (6,409 bytes) 2011-05-03 00:09 | ||||||||
Relationships | |
Relationships |
Notes | |
(0026287) Brad King (manager) 2011-04-29 13:31 |
http://www.cmake.org/Wiki/CMake:Module_Maintainers [^] |
(0026295) Dat Chu (reporter) 2011-05-01 18:13 |
Contacting FindProtobuf.cmake volunteer maintainer. |
(0026418) Dat Chu (reporter) 2011-05-03 00:23 |
Great improvement in FindProtobuf2.cmake. Thank you Phillip. I added my name in the Copyright section. I guess we don't need that now. Could you please remove it in the final commit? |
(0026419) Philip Lowman (developer) 2011-05-03 00:23 |
Dat, Thanks for the patch. I've attached a modified version based on your work to this ticket (FindProtobuf2.cmake). Could you please test it? If you have any additional ideas for improving it please let me know. Your version worked fine, except that it breaks backwards compatibility if anyone defines PROTOBUF_LIBRARY as a cache variable. In CMake, local variables with the same name always override cached variables once they are set(). The solution is to make the normal variable 'PROTOBUF_LIBRARIES' include the debug libraries only if the user is using them. I also included protobuf-lite in case anyone needs to use that and encapsulated all of the find_library calls into a function. |
(0026420) Dat Chu (reporter) 2011-05-03 00:36 |
I have tested your FindProtobuf2.cmake. It works great. The addition support for Protobuf Lite is a good addition. Thank you very much. |
(0026427) Philip Lowman (developer) 2011-05-04 01:35 |
Dat, Thanks for testing. I will remove your name from the final commit and push it into git soon. |
(0026603) Philip Lowman (developer) 2011-05-25 22:09 |
Should be in the next RC for 2.8.5 (RC02) Merged topic '12128_FindProtobuf_module_behavior_under_Windows_is_annoying' into next ca000a0 FindProtobuf: Better MSVC support, Searching for protobuf lite |
(0027767) David Cole (manager) 2011-11-11 10:45 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-04-27 14:12 | Dat Chu | New Issue | |
2011-04-27 14:12 | Dat Chu | File Added: FindProtobuf.cmake | |
2011-04-29 13:31 | Brad King | Note Added: 0026287 | |
2011-04-29 13:31 | Brad King | Status | new => backlog |
2011-05-01 18:13 | Dat Chu | Note Added: 0026295 | |
2011-05-02 00:18 | Philip Lowman | Assigned To | => Philip Lowman |
2011-05-02 00:18 | Philip Lowman | Status | backlog => assigned |
2011-05-03 00:08 | Philip Lowman | Target Version | => CMake 2.8.5 |
2011-05-03 00:09 | Philip Lowman | File Added: FindProtobuf2.cmake | |
2011-05-03 00:23 | Dat Chu | Note Added: 0026418 | |
2011-05-03 00:23 | Philip Lowman | Note Added: 0026419 | |
2011-05-03 00:36 | Dat Chu | Note Added: 0026420 | |
2011-05-04 01:35 | Philip Lowman | Note Added: 0026427 | |
2011-05-25 22:09 | Philip Lowman | Note Added: 0026603 | |
2011-05-25 22:09 | Philip Lowman | Status | assigned => resolved |
2011-05-25 22:09 | Philip Lowman | Resolution | open => fixed |
2011-05-25 22:09 | Philip Lowman | Fixed in Version | => CMake 2.8.5 |
2011-11-11 10:45 | David Cole | Note Added: 0027767 | |
2011-11-11 10:45 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |