[CDRIVER-2895] make dist fails if configuring with cmake 3.3 and 3.4 Created: 01/Dec/18  Updated: 28/Oct/23  Resolved: 03/Dec/18

Status: Closed
Project: C Driver
Component/s: cmake
Affects Version/s: None
Fix Version/s: 1.14.0

Type: Bug Priority: Minor - P4
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

When reading about cmake_parse_arguments I saw that this became a native cmake command in cmake 3.5 (release notes).

Prior to 3.5, cmake_parse_arguments was only available after including the "CMakeParseArguments" module. We check whether to include this in our dist scripts by checking if CMake is older than 3.3. So for CMake versions 3.3 and 3.4 we are not including CMakeParseArguments.

I confirmed locally with cmake version 3.4.3:

> $CMAKE --version
cmake version 3.4.3
 
> cd cmake-build-debug
> $CMAKE -DENABLE_MAN_PAGES=ON -DENABLE_HTML_DOCS=ON -DENABLE_ZLIB=BUNDLED -DENABLE_BSON=ON ../
 
> make dist
...
CMake Error at /Users/kevinalbertson/code/mongo-c-driver/build/cmake/make_dist/MakeDistFiles.cmake:25 (cmake_parse_arguments):
  Unknown CMake command "cmake_parse_arguments".
Call Stack (most recent call first):
  /Users/kevinalbertson/code/mongo-c-driver/build/cmake/make_dist/MakeDist.cmake:74 (execute_process_and_check_result)
  /Users/kevinalbertson/code/mongo-c-driver/build/cmake/make_dist/MakeDist.cmake:103 (make_dist)
 
 
 
make[3]: *** [mongo-c-driver-1.14.0-20181015+git7e2e9caeba.tar.gz] Error 1
make[2]: *** [CMakeFiles/dist.dir/all] Error 2
make[1]: *** [CMakeFiles/dist.dir/rule] Error 2
make: *** [dist] Error 2



 Comments   
Comment by Githook User [ 03/Dec/18 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@10gen.com', 'username': 'kevinAlbs'}

Message: CDRIVER-2895 fix make dist on cmake 3.[3|4]
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/8d9e5d917d4d2122905aa5fad5db696d2c780bed

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