Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3699

Use cmake, not make/msbuild, in compile scripts

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.17.0-rc0, 1.17.0
    • cmake, tests
    • None

    Description

      Our documentation and test scripts configure using cmake and then use the native build system to compile. E.g. libmongoc's installation documentation has this for Unix:

      $ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..
      $ make install 

      And this for Windows:

      $ cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX="C:\mongo-c-driver" ..
      $ msbuild.exe /p:Configuration=RelWithDebInfo INSTALL.vcxproj 

      Using cmake for the build instructions may simplify this a bit, changing both build instructions to:

      cmake --build cmake-build --config RelWithDebInfo --target install 

      In addition, if we take this approach we may be able to consolidate some of compile-unix.sh, compile-windows.sh, and compile-windows-mingw.bat.

      Documenting this as the way to build may also prevent users from accidentally mixing release/debug runtimes in their application, as there have been several related bug reports: CXX-1961CDRIVER-3558CXX-1780

      This ticket is associated with the compilation script update.

      Attachments

        Issue Links

          Activity

            People

              roberto.sanchez@mongodb.com Roberto Sanchez
              roberto.sanchez@mongodb.com Roberto Sanchez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: