google / google/or-tools

cmake: Sample/Examples/Tests Layout Rework

Open
#2,816 1 comment 2 reactions 1 assignee Claimed by @Mizux View on GitHub
Build: CMake Feature Request
Dominant language
C++
Stars
14.1k
Forks
2.5k
Avg merge
8h 39m
Merged PRs (30d)
72

Description

Currently we only have SAMPLES (`or-tools//samples`) and EXAMPLES (`examples/*`).

I propose to:

* [x] Move lang test to `ortools//`
e.g. `ortools/sat/java/CpModelTest.java`
* [x] ~~Add a `BUILD_TEST` option to only build what is currently located in `examples/tests`~~
* [ ] Move tests to `or-tools//tests`
* [ ] Add option to control if binaries or source are installed e.g.
* [ ] `INSTALL_SAMPLES_BINARIES` to install samples binaries (to `CMAKE_INSTALL_BINDIR`)
* [ ] `INSTALL_SAMPLES_SOURCES` to install samples source code (to `CMAKE_INSTALL_DATADIR`)
* [ ] Add a General and `` options e.g. `INSTALL_SAMPLES_BINARIES`, and `INSTALL_CXX_SAMPLES_BINARIES`

note: For python while binary and sources file is identical (i.e. the *.py* file) it will be installed in BINDIR and/or DATADIR according to the option enabled.

Any feedback welcome !

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.