Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake based build support on stable/2.10 #287

Closed
wants to merge 1,558 commits into from

Conversation

Mizux
Copy link

@Mizux Mizux commented Feb 5, 2020

Add CMake based build + Makefile/docker CI + Travis-CI

@Mizux Mizux changed the title Stable/2.10 Add CMake based build support on stable/2.10 Feb 6, 2020
@nikaza
Copy link

nikaza commented Apr 1, 2020

I love this. It would be amazing if we had a cmake version of cbc because we would then be able to contribute to the build and, more crucially, easily split the code into more files/classes and add our own files.

@Mizux
Copy link
Author

Mizux commented Apr 1, 2020

@nikaza FYI I'm currently trying to maintain the last stable branch and master for projects:

  • CoinUtils
  • Osi
  • Clp
  • Cgl
  • Cbc

which is more or less needed for my job which is to maintain google/or-tools project (which is currently migrating to CMake also)...

@nikaza
Copy link

nikaza commented Apr 1, 2020

Honestly that would be life-changing for so many reasons, you're a hero - I'm switching all my developers to this.

Could you add some build instructions for the dependencies? I tried creating a build folder and then the classic $ cmake .. but I'm getting a dependency error:

CMake Error at CMakeLists.txt:63 (find_package):
  Could not find a package configuration file provided by "CoinUtils" with
  any of the following names:

    CoinUtilsConfig.cmake
    coinutils-config.cmake

  Add the installation prefix of "CoinUtils" to CMAKE_PREFIX_PATH or set
  "CoinUtils_DIR" to a directory containing one of the above files.  If
  "CoinUtils" provides a separate development package or SDK, be sure it has
  been installed.

so I assume we need a certain directory layout and all cmake projects inside.

Do you have a link to the cmake build for the master project?

@tkralphs
Copy link
Member

tkralphs commented Apr 1, 2020

Sorry that this has been sitting for so long. We just haven't had the bandwidth to look at it yet!

@Mizux
Copy link
Author

Mizux commented Apr 1, 2020

@nikaza not exactly, You can take a look at the CMake of google/or-tools
see: https://github.com/google/or-tools/blob/858fa626959f7e386153af82756384b79f983b5a/cmake/dependencies/CMakeLists.txt#L112-L180
and https://github.com/google/or-tools/blob/858fa626959f7e386153af82756384b79f983b5a/cmake/utils.cmake#L66-L126
which use a kind of prebuilt and local install using ExternalProject hack.

I'll try to provide a clean example using FetchContent OR/AND using a local install.

Also you can try to look at the dockerfile -> 1c70574#diff-ef27d5937c144ea10291b80274d3a311 where we install one by one in the system all the stack

ps: we can discuss about it on discord -> https://discord.gg/ENkQrdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants