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.11 #116

Open
wants to merge 3 commits into
base: stable/2.11
Choose a base branch
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.11 Add CMake-based build support on stable/2.11 Feb 6, 2020
@wolfv
Copy link

wolfv commented Feb 26, 2020

I am packaging CoinUtils up to google-or tools for conda right now and I am basing it off of your CMake files.

However, they don't seem to install a pkgconfig file, right? I think it would be nice to also configure a pkg-config file so that users of that toolchain can still use it.

@Mizux
Copy link
Author

Mizux commented Feb 26, 2020

This patch was mainly to add Coin-OR to the CMake world (e.g. in order to consume it in google/or-tools when using the CMake build system, have a clean vcpkg package)...

Sure you can add pkg-config generation using CMake but:

  1. out of the scope of this PR IMHO, could be done in a later PR
  2. I'm currently not have a working business need for it, I need a Modern CMake config file to depends on it or be able to incorporate it to a super project build (see FetchContent)

@wolfv
Copy link

wolfv commented Feb 26, 2020

I understand what and why you're doing this -- but IMO this current CMake is wrong in this regard and it doesn't generate a "clean" recipe if it doesn't additionally install the pkg-config file since (especially in a package manager) other downstream packages might need / expect the file.

Btw. do you want to be part of the maintainers for the conda packages? I am adding or-tools next, just waiting for the (lib) protobuf build on conda to be based on CMake as well:

conda-forge/staged-recipes#10935

@CLAassistant
Copy link

CLAassistant commented Jun 24, 2020

CLA assistant check
All committers have signed the CLA.

target_compile_definitions(CoinUtils
PUBLIC HAVE_CONFIG_H
PRIVATE COINUTILS_BUILD)
if(CMAKE_VERSION VERSION_LESS "3.8.2")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either this should be removed, or the toplevel cmake_minimum_required(VERSION 3.15) should be adjusted.

if(NOT TARGET ZLIB::ZLIB)
find_package(ZLIB)
endif()
if(ZLIB_FOUND OR TARGET ZLIB::ZLIB)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later on, ZLIB::ZLIB is required, thus ZLIB_FOUND is not relevant.

set_target_properties(CoinUtils PROPERTIES
PUBLIC_HEADER "${_HDRS};${CMAKE_CURRENT_BINARY_DIR}/config_coinutils.h"
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect, the current SOVERSION for libtool builds is 3.

You get the SOVERSION by calculating current - age from the libtool version triplett [current:revision:age], i.e. 14:6:11 -> SOVERSION = 14 - 11 = 3

@Mizux Mizux force-pushed the stable/2.11 branch 3 times, most recently from d820685 to 6422e15 Compare October 11, 2024 08:24
- Fix ZLIB usage
- Fix super build (e.g. FetchContent) integration
- Add install_rpath
- Based on Docker for environment and Make for orchestration
- Add amd64 docker cmake based build workflows
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.

5 participants