[CDRIVER-1052] CMakeLists.txt build is incomplete and makes the driver unusable for the C++ driver Created: 14/Dec/15 Updated: 27/Jan/16 Resolved: 14/Jan/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.3.0 |
| Fix Version/s: | 1.3.1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Jean-Bernard Jansen | Assignee: | Hannes Magnusson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
All. |
||
| Backwards Compatibility: | Fully Compatible |
| Description |
|
The CMakeLists.txt is missing installation instructions for a header file and for pkg-config files. Therefore, a installation with the CMakeLists.txt makes pkg-config unable to detect the library. This affects for instance any build of the C++ driver. The missing header affects at least the build of the new C++ driver. |
| Comments |
| Comment by Githook User [ 27/Jan/16 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: Merge remote-tracking branch 'upstream/r1.3'
|
| Comment by Githook User [ 27/Jan/16 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: Merge remote-tracking branch 'upstream/r1.3'
|
| Comment by Githook User [ 27/Jan/16 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: |
| Comment by Githook User [ 27/Jan/16 ] |
|
Author: {u'name': u'Jean-Bernard Jansen', u'email': u'jeanbernard@jansen.fr'}Message: Fix
|
| Comment by Hannes Magnusson [ 14/Jan/16 ] |
|
Thanks for the patch! |
| Comment by Githook User [ 14/Jan/16 ] |
|
Author: {u'name': u'Jean-Bernard Jansen', u'email': u'jeanbernard@jansen.fr'}Message: Fix
|
| Comment by Hannes Magnusson [ 14/Jan/16 ] |
|
Sounds good to me. For the record though: Like I previously said, we do not actively run any tests using cmake with the exception of MSVC configuration generation. I fully agree that while its there, it should work of course |
| Comment by Andrew Morrow (Inactive) [ 13/Jan/16 ] |
|
Painful only in the sense of maintaining two parallel build systems. |
| Comment by Jean-Bernard Jansen [ 13/Jan/16 ] |
|
Autotools projects can still be used with ExternalProject_Add. It is not as smooth of course, but it can be done. Why painful ? There is no way a migration to CMake could hurt the project. I think the scope of this matter goes beyond the current issue. I am sure I am not the first one to suggest CMake as a replacement. |
| Comment by Andrew Morrow (Inactive) [ 13/Jan/16 ] |
|
It is painful, but I agree with duckie that if the C driver is going to offer a CMake build, it should be fully functional, and not only on Windows. Using ExternalProject_Add is very common in CMake projects, and being able to ExternalProject_Add the C driver would be very useful for systems that want to vendor it, rather than depend on the system version. |
| Comment by Jean-Bernard Jansen [ 13/Jan/16 ] |
|
Push request updated following Andrew changes. |
| Comment by Jean-Bernard Jansen [ 13/Jan/16 ] |
|
The reason I used CMake is quite straightforward : I saw a CMakeLists.txt file and assumed the migration from the autotools were ongoing. Since MSVC support seems a requirement, it does not seem sane to keep maintaining two separate build systems in I tried the autotools and saw that the libbson dependency was automatically dowloaded. This could be made with CMake too, but I found it comfortable to manage the dependencies myself. I build the driver with CMake from another project, and the CMake build does well with the "ExternalProject" command of said project. By the way, that is a small patch that does not hurt the current state. I'll just fix the "private header" matter since Andrew removed them. |
| Comment by Hannes Magnusson [ 12/Jan/16 ] |
|
I'm a bit curious why you decided to compile the c driver using cmake? The cmake approach isn't something we actively test or build ourself – in fact, the only reason it is here at all is so it can generate the MSVC configuration. |
| Comment by Jean-Bernard Jansen [ 14/Dec/15 ] |
|
Added a pull request with a fix https://github.com/mongodb/mongo-c-driver/pull/304. |