[CDRIVER-2396] CMake build error when configuring project with ENABLE_SRV=OFF Created: 21/Nov/17  Updated: 28/Oct/23  Resolved: 21/Nov/17

Status: Closed
Project: C Driver
Component/s: Build, cmake
Affects Version/s: 1.8.2
Fix Version/s: 1.9.0

Type: Bug Priority: Critical - P2
Reporter: iulian Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: build, cmake
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSX 10.3
cmake version 3.8



 Description   

If mongoc is configured with ENABLE_SRV=OFF
the following error occurs:
invalid token at start of a preprocessor expression
#if MONGOC_HAVE_DNSAPI != 1
...
if a define directive doesn't have a token we cannot use comparator operator.
we can use only #ifdef and if defined



 Comments   
Comment by Githook User [ 22/Nov/17 ]

Author:

{'name': 'Iulian Rotaru', 'username': 'tzulea', 'email': 'iulian.rotaru@gmail.com'}

Message: CDRIVER-2396 build error if ENABLE_SRV=OFF
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/de392722236121977dda4c1d4a9ca2aae02bdeae

Comment by iulian [ 22/Nov/17 ]

we still nid to fix the build if ENABLE_SRV=OFF.
So we can set default values only in this case, and to allow check_symbol_exist to do his things.

pullrequest:
https://github.com/mongodb/mongo-c-driver/pull/464/files

Comment by Githook User [ 22/Nov/17 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: Revert "CDRIVER-2396 Set default values for mongoc-config.h. Simplify if checking and setting default values for mongoc-config.h"

This reverts commit f81e63d
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/cab0d5c62cce7d361b07cc3f2ced4b1cbcdd2224

Comment by Githook User [ 21/Nov/17 ]

Author:

{'name': 'Iulian Rotaru', 'email': 'i.rotaru@cloudplan.net'}

Message: CDRIVER-2396 Set default values for mongoc-config.h.
Simplify if checking and setting default values for mongoc-config.h
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f81e63dd554946c5acc025ba4e9fffe90fbcfde9

Comment by iulian [ 21/Nov/17 ]

https://github.com/mongodb/mongo-c-driver/pull/463

Generated at Wed Feb 07 21:15:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.