Commit Graph

122 Commits

Author SHA1 Message Date
Corentin Le Molgat
f5d9ea77be cmake: cleanup 2024-07-12 15:50:55 +02:00
Laurent Perron
4cbd27dae9 sync with main 2024-05-30 10:52:42 +02:00
Mizux Seiha
1ad26ed5f5 cmake: fix re2 dependency 2024-02-13 15:39:51 +01:00
Laurent Perron
d2b7270657 second tentative of fixing github runner with LP_PARSER OFF 2024-02-09 11:05:17 -08:00
Laurent Perron
bd466d3b24 second tentative of fixing github runner with LP_PARSER OFF 2024-02-09 10:58:02 -08:00
Mizux Seiha
e5b4a75923 cmake: cleanup cpp.cmake 2024-02-09 01:00:56 +01:00
Corentin Le Molgat
b3ec9077cb cmake: cleanup cpp.cmake 2024-01-18 10:19:02 +01:00
Mizux Seiha
ed52480195 cmake: format fix 2024-01-17 13:42:26 +01:00
Mizux Seiha
dec772d810 cmake: rework add_cxx_test 2024-01-17 13:42:12 +01:00
Mizux Seiha
adf0e29582 cmake: rework add_cxx_example
* Add mandatory FILE_NAME option
* Add COMPONENT_NAME option
2024-01-17 12:03:09 +01:00
Corentin Le Molgat
835d93025f cmake: Rework add_cxx_sample()
* Add mandatory FILE_NAME option
* Add COMPONENT_NAME option
2024-01-16 11:27:01 +01:00
Corentin Le Molgat
f225de8b20 cmake: Fix function doc 2024-01-15 13:33:49 +01:00
Mizux Seiha
5407bd7f58 cmake: Make BOP and GLOP regular optional solver
* Add USE_BOP option for consistency
* Add USE_GLOP option for consistency

note: OFF is not supported, i.e. GLOP is currently mandatory
2024-01-15 13:33:49 +01:00
Mizux Seiha
a76bf1c5dd bump license boilerplate 2024-01-04 13:43:15 +01:00
Laurent Perron
0bb7d0c58b Merge pull request #3966 from rte-france/feature/xpress_only
Improve the Xpress interface and add dynamic loading of the Xpress library
2023-12-11 11:48:24 +01:00
Corentin Le Molgat
a87803a881 cmake: find proto in algorithms/ 2023-12-08 14:32:20 +01:00
Andrea Sgattoni
2637c36b59 Merge branch 'google/main' into feature/xpress_only_RTE 2023-11-06 18:07:37 +01:00
Corentin Le Molgat
a33bf9a8d8 cmake: Rework add_cxx_test 2023-11-06 17:10:46 +01:00
Andrea Sgattoni
b190d1d799 remove USE_XPRESS variable 2023-10-27 09:42:35 +02:00
Mizux Seiha
d8634ab0f2 cmake: Split math_opt into sub library
XCode do not support object library with several file with the same name
since it use a flat directory, Xcode "fix" using a UID but CMake can't catch it.

math_opt also use a parameters.proto which conflict with the
glop/parameters.proto -> need to split the proto to .cc generation in
two libraries
2023-09-25 10:46:02 +02:00
Mizux Seiha
2899beb8f3 cmake: rework gurobi support 2023-09-25 10:46:02 +02:00
Corentin Le Molgat
8aa27339c0 cmake: Fix math_opt singleton on windows 2023-09-25 10:44:04 +02:00
Corentin Le Molgat
461c3db587 cmake: clean comment 2023-09-25 10:44:04 +02:00
Corentin Le Molgat
36aaa82356 cmake: Fix math_opt build when USE_PDLP=OFF 2023-09-08 18:05:49 +02:00
Corentin Le Molgat
9a1313b138 cmake: cleanup 2023-09-04 16:55:01 +02:00
Mizux Seiha
2f04afb7c0 cmake: Fix mathop_build when USE_SCIP=OFF 2023-09-04 16:55:01 +02:00
Mizux Seiha
fbf27ec73e cmake: Add math_opt/ 2023-09-04 16:55:01 +02:00
StefanBruens
4633e1080c Fix RUNPATHs for libraries and executables (#3383)
* Only add relevant directories to various RUNPATHs

The old code added several irrelevant, duplicate or even non-existing
directories to the RUNPATHs of the samples/flatzinc/sat_solver./linear_solver

Calculate the actual relative path between binary and library install
directory (using the absolute paths, CMAKE_INSTALL_LIBDIR may be either
relative or absolute), and set it as target property.
2023-07-28 14:38:25 +02:00
Mizux Seiha
77b58661aa Fix windows build
related to https://github.com/microsoft/STL/issues/2613
2023-04-07 17:22:51 +02:00
Mizux Seiha
4f30a7ff2c cmake: Add C++ documentation 2023-02-02 11:40:42 +01:00
Corentin Le Molgat
86321f2025 cmake: prepare HiGHS support 2022-10-06 14:45:07 +02:00
Mizux Seiha
e956acee92 cmake: Fix C++17 Unix / C++20 MSVC management 2022-09-20 22:33:30 +02:00
Mizux Seiha
0ad6639c0f Fix windows build 2022-09-20 15:42:44 +02:00
Laurent Perron
2698acc6d4 fix 2022-09-12 14:35:27 +02:00
Laurent Perron
81b31ff24b Move model_builder under linear_solver 2022-09-12 11:28:52 +02:00
Corentin Le Molgat
43d3d4d53b cmake: Fix remaining C++20 property 2022-08-01 15:43:59 +00:00
Corentin Le Molgat
5d222cc681 CMake: update
* Remove FindProtobuf.cmake (builtin provided by CMake)
* Install missing Find module
* remove `${CONFIG_FLAG}` in ortoolsConfig.cmake when irrelevant.
2022-06-24 17:35:08 +02:00
Corentin Le Molgat
045a5d93b7 Sync google3 github 2022-06-17 14:23:23 +02:00
Mizux Seiha
b0a78201dd cmake: Fix GLPK support (Fix #3312)
* Eigen was spuriously enabling fortran
* Missing GLKP helpers functions
2022-06-09 12:39:57 +02:00
Corentin Le Molgat
a8ffe28948 cmake: install internal doc. 2022-04-06 11:15:59 +02:00
Corentin Le Molgat
3c6f88de3b c++: Add USE_LP_PARSER define (#3201) 2022-03-25 11:12:00 +01:00
Corentin Le Molgat
57b182d2df make: Create a bundle lib on windows 2022-03-08 11:02:04 +00:00
Corentin Le Molgat
ffb5ea4dc3 make: Fix RPATH in [fz_]archive 2022-03-04 09:17:01 +01:00
Mizux Seiha
32b101b9ee cmake: Fixup for pdlp 2022-02-25 23:43:01 +01:00
Mizux Seiha
cde1771554 cmake(cpp): Add model_builder wrappers 2022-02-24 08:29:43 +01:00
Corentin Le Molgat
e01e061bb6 cmake: cpp.cmake cleanup 2022-02-23 16:17:47 +01:00
Laurent Perron
357ff08581 fix C++20 for windows when compiling pdlp 2022-02-19 16:21:46 +01:00
Laurent Perron
0266492da6 more work on makefiles/cmake.cpp 2022-02-19 15:05:17 +01:00
Corentin Le Molgat
761982a17f cmake: Add PDLP support 2022-02-17 15:02:23 +01:00
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