Add an example CMake configuration file

Issue #13404 wontfix
J Álvarez created an issue

I'm using CMake in most of my C/C++ projects. It works pretty much like Makefile test ./configure; make; make test only the first step is cmake . instead.

Comments (7)

  1. Philip Hodder staff


    Pipelines already supports the use of cmake. You will need to either install it into your running Docker container, try find a public image on DockerHub that has cmake installed, or create a new Docker image with cmake installed.

    Here's an example of installing it as part of your build:

        - step:
              - apt-get update
              - apt-get install -y cmake
              - cmake .

    I would recommend that you use an image with cmake installed (so you don't need to download cmake for every build). You can look on DockerHub, or you can create you own by following this guide:

    We also have an Atlassian Answers question in regards of what example bitbucket-pipelines.yml files we should add, which you can find here:

    I am going to rename the issue to reflect adding cmake as an example configuration file.



  2. Matt Ryall

    Pipelines will continue to work fine with cmake if you want to use it as described by Phil above, but because we don't see a lot of usage of it, we don't plan to add an example configuration to Pipelines itself.

  3. Areg Harutyunyan

    Vast majority of C++ projects use cmake; not make. It would make a lot more sense if cmake was used as an example.

  4. Roberto Orellana

    Disagree to close this. Would be nice to have a full pipeline example for best practice use of cmake and ctest In our environment, we use the qt, gtests, and opengl with a custom docker image. For example, should build, and test be separate steps? Should build, test, and deploy be in the same step to optimize the use of the container (avoid downloading the image again).? These things are not clear enough for someone new starting without spending a lot of time. In an unrelated note, Windows containers should be supported.

  5. Log in to comment