[CXX-1792] Add CMake flag for skipping tests compilation Created: 17/Jun/19  Updated: 10/Aug/23  Resolved: 10/Aug/23

Status: Closed
Project: C++ Driver
Component/s: Build, Testing
Affects Version/s: 3.4.0
Fix Version/s: 3.9.0

Type: Task Priority: Trivial - P5
Reporter: Emmanuel Hadoux Assignee: Kyle Kloberdanz
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CXX-2702 Do not build tests or examples on def... Closed
Epic Link: CXX-2622
Quarter: FY24Q3

 Description   

Hello,

is there a way like -DENABLE_TESTS=OFF for libmongoc to avoid the compilation of the tests altogether?

I can't seem to find one in the code nor any question related to it here.

Thanks!



 Comments   
Comment by Githook User [ 09/Aug/23 ]

Author:

{'name': 'Kyle Kloberdanz', 'email': 'kyle.kloberdanz@mongodb.com', 'username': 'kkloberdanz'}

Message: Skip building tests by default (#993)

CXX-1792
CXX-2702

Tests will not be compiled by default.
To enable building tests, build with -DBUILD_TESTING=ON

---------

Co-authored-by: vector-of-bool <vectorofbool@gmail.com>
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/7b01ed292151a24bb7901e3b1236ad5a3a910c9e

Comment by Emmanuel Hadoux [ 12/Sep/19 ]

No worries, thanks for your work.

Comment by Clyde Bazile III (Inactive) [ 12/Sep/19 ]

ehadoux, thanks for bringing this to our attention. C++ Driver currently does not support this option but we will consider it for a future release. We've placed this in the backlog for the time being but feel free to follow this issue for updates.

Comment by Emmanuel Hadoux [ 12/Sep/19 ]

Hi @Clyde Bazile,

I was indeed referring to libmongocxx. Is there any sort of plan to add the option to it?

 

Thanks,

Emmanuel

Comment by Clyde Bazile III (Inactive) [ 10/Sep/19 ]

Hi, ehadoux, are you referring to libmongoc or libmongocxx? For libmongoc you can add -DENABLE_TESTS=OFF to the cmake arguments when you build the driver. The C++ Driver does not have this option.

Thanks, clyde.bazile.

Generated at Wed Feb 07 22:03:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.