Commit Graph

455 Commits

Author SHA1 Message Date
Geoffrey Gunter
68f4e80e2c Fix CMake package config file (#3068)
* Fix CMake package config file

There are currently a few issues with how the COIN-OR dependencies are
resolved when using `find_package(ortools CONFIG)` to add or-tools to
an external CMake project.

* With CMake >=3.9.6, we try to find the Clp and Cbc packages using the
  CONFIG mode of `find_package`. This always fails since neither
  library provides a CMake config file.

* If we address the above issue by instead using the MODULE mode of
  `find_package`, then we need to add `FindCbc.cmake` and
  `FindCpl.cmake` scripts to the CMAKE_MODULE_PATH in order to teach
  CMake how to find these dependencies. I propose that or-tools should
  install these scripts alongside its config file so that they're
  available to external CMake projects.

* Finally, the `FindCbc.cmake` script included with or-tools defines the
  variable `CBC_FOUND` when it's successful, rather than `Cbc_FOUND` as
  expected (CMake variables are case-sensitive). The `FindCpl.cmake`
  script has a similar issue. As a result, even when the above two
  points are addressed, `find_package(ortools CONFIG)` will still fail
  because CMake erroneously thinks that these two dependencies weren't
  succesfully found.

This commit attempts to address the above issues with the following
changes:

* The or-tools CMake config file is modified to allow searching for Cbc
  and Cpl using the MODULE mode of `find_package`.

* `FindCbc.cmake` and `FindCpl.cmake` are installed with the CMake
  package config files and are added to the CMAKE_MODULE_PATH if
  `USE_COINOR` was truthy.

* The `FindCbc.cmake` and `FindCpl.cmake` files are modified to change
  the case of variables they export.

* Only install FindXXX.cmake modules if COIN-OR support was enabled
2022-01-14 08:38:37 +01:00
Mizux Seiha
8d96a95479 rename internal doc/ folders to docs/ 2022-01-06 17:06:56 +01:00
Mizux Seiha
03f534137a java: Fix CWE-200 in sample 2021-12-17 13:52:28 +01:00
Corentin Le Molgat
689160bfe1 python: use system-site-packages for venv
on Alpine pillow package from pip can't be built
2021-12-13 16:15:50 +01:00
Corentin Le Molgat
6a58dcd465 cmake(ci): Fix alpine Python Dockerfile 2021-12-13 10:51:02 +01:00
Mizux Seiha
5c3d6a91d0 cmake: Fix macos Coin-OR 2021-12-08 14:35:10 +01:00
Corentin Le Molgat
1115798cd7 cmake: WORKING_DIRECTORY Fixup 2021-12-06 16:37:17 +01:00
Corentin Le Molgat
e4167b03e9 opensuse: fix sha512sum 2021-12-06 14:47:14 +01:00
Corentin Le Molgat
193390c6c0 ubuntu: revert docker to microsoft 21.04 feed for dotnet-sdk
feed 21.10 not available yet
> The .NET 6 packages haven't yet been published for Ubuntu 21.10.
  The following wget command uses the Ubuntu 21.04 repository.
ref: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2110-
2021-12-06 14:47:14 +01:00
Corentin Le Molgat
046c153e36 cmake(ci): Update .Net docker 2021-12-06 14:00:03 +01:00
Corentin Le Molgat
a6408ddb3b dotnet: Use multiple TFM in samples 2021-12-06 12:02:40 +01:00
Corentin Le Molgat
07127d463c dotnet: bump TFM net5.0 -> net6.0 LTS 2021-12-06 09:13:47 +01:00
Corentin Le Molgat
df2f7cf352 cmake: Fix java.cmake 2021-12-03 17:55:48 +01:00
Corentin Le Molgat
81e568d519 Fixup dotnet.cmake 2021-12-03 15:28:26 +01:00
Corentin Le Molgat
5f567735d7 cmake: Fix dotnet.cmake and path 2021-12-03 14:20:19 +01:00
Mizux Seiha
72ebd8b748 cmake: rework .Net support 2021-12-03 14:20:19 +01:00
Mizux Seiha
976f227b67 cmake: rework java 2021-12-03 14:20:19 +01:00
Mizux Seiha
655eec5260 cmake: rework python 2021-12-03 14:20:19 +01:00
Mizux Seiha
d4a40bbd4c cmake: Fix dotnet.cmake 2021-12-01 12:23:38 +01:00
Mizux Seiha
95e31a7e8c cmake: Fixup java.cmake 2021-12-01 10:31:33 +01:00
Mizux Seiha
d6ae509342 Fix Protobuf and Absl bump 2021-11-30 18:34:58 +01:00
Mizux Seiha
db96176998 cmake: Rework java.cmake 2021-11-30 18:02:46 +01:00
Corentin Le Molgat
9bcf117040 cmake: Rework dotnet.cmake 2021-11-30 18:02:46 +01:00
Corentin Le Molgat
d17660c9a1 cmake(ci): fix Python Alpine docker 2021-11-29 16:30:20 +01:00
Corentin Le Molgat
ea67b85c30 cmake(ci): Fix .Net CMake docker 2021-11-29 14:26:14 +01:00
Corentin Le Molgat
c2316407b4 cmake(ci): Fix opensuse java.Dockerfile 2021-11-29 11:46:37 +01:00
Corentin Le Molgat
882f13d248 cmake: Remove CMakeTest.java 2021-11-29 11:02:35 +01:00
Corentin Le Molgat
d51879e3d7 cmake: cleanup <lang>.cmake 2021-11-26 10:29:35 +01:00
Corentin Le Molgat
2ed613cec2 Update cmake/README.md 2021-11-25 15:47:07 +01:00
Corentin Le Molgat
eb1d802e5a cmake: fix glop build 2021-11-22 17:31:51 +01:00
Corentin Le Molgat
323df716f3 cmake: Make BUILD_LP_PARSER optional (OFF by default) 2021-11-22 17:17:43 +01:00
Corentin Le Molgat
24b32ddc57 cmake: Apply re2 patch 2021-11-22 09:23:56 +01:00
Corentin Le Molgat
94d4c25438 cmake: Fix python executable in python install script 2021-11-19 14:24:03 +01:00
Corentin Le Molgat
cfa0eec941 Add lp_parser 2021-11-19 14:02:44 +01:00
Mizux Seiha
f0fdd90c64 python: install pandas and matplotlib in venv 2021-11-17 20:57:19 +01:00
Mizux Seiha
229db02749 cmake: clean python.cmake 2021-11-17 15:45:49 +01:00
Mizux Seiha
d0e7970c6b cmake: Added GLPK support and docs
* Use Mizux/GLPK (Tag 5.0)
* cmake: Fix swig flags
* cmake: Update ortoolsConfig.cmake
2021-11-17 14:04:57 +01:00
Mizux Seiha
ddeb35881e cmake: Use virtualenv instead of venv
windows runner fail when using venv...
2021-11-17 12:30:01 +01:00
Mizux Seiha
a27974a1da cmake: Fix error when using MSVC 2021-11-17 12:28:42 +01:00
Mizux Seiha
5713958c45 cmake: Use PROJECT_NAMESPACE 2021-11-17 12:28:42 +01:00
Corentin Le Molgat
bcd652c7b2 python: Add numpy as dependency
Use version shipped with Ubuntu 18.04 as minimal version.
src: https://launchpad.net/ubuntu/+source/python-numpy
2021-11-15 11:46:27 +01:00
Mizux Seiha
eed8c4206b cmake: Rework FindSCIP.cmake 2021-11-11 22:51:28 +01:00
Two4
8f47babb1c add --ignore-whitespace to git apply commands (#2875)
* add `--ignore-whitespace` to `git apply` commands

* Add missing `--ignore-whitespace`

Co-authored-by: Mizux Seiha <mizux.dev@gmail.com>
2021-11-10 12:11:41 +01:00
Corentin Le Molgat
4f7d1cc258 cmake(python): cleanup 2021-11-05 14:10:37 +01:00
Mizux Seiha
89dc88bfdd cmake(python): Fix search module functions
* Don't look for __version__ when unavailable
2021-11-04 14:46:55 +01:00
Laurent Perron
ce867ae974 fix glop only build for cmake 2021-10-31 18:54:30 +01:00
Corentin Le Molgat
09051d756b cmake(python): improve non rebuild 2021-10-29 17:39:19 +02:00
Corentin Le Molgat
61aa579f5c cmake(python): add missing __version__ to ortools package 2021-10-29 17:37:46 +02:00
Corentin Le Molgat
04393e43d1 python: Fix venv not being updated 2021-10-29 17:22:37 +02:00
kyle
70db1c1ff6 Fixed support and documentation for Cmake CPLEX build on Linux 2021-10-29 13:42:41 +02:00