https://github.com/hughperkins/cmake-childproject-minimumexample
cmake-childproject-minimumexample
https://github.com/hughperkins/cmake-childproject-minimumexample
Last synced: 7 months ago
JSON representation
cmake-childproject-minimumexample
- Host: GitHub
- URL: https://github.com/hughperkins/cmake-childproject-minimumexample
- Owner: hughperkins
- License: mpl-2.0
- Created: 2015-06-09T23:07:52.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-09T23:40:04.000Z (over 10 years ago)
- Last Synced: 2025-02-06T02:47:51.963Z (8 months ago)
- Language: CMake
- Size: 141 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmake-childproject-minimumexample
cmake-childproject-minimumexampleThis is a minimal example of adding a child project to cmake, ie instead of using `include` or `add_subdirectory`, both of which are conceptually simpler, but have their own set of issues, ie minimal isolation between projects.
This is based on the arrayfile cmake files/configuration, which downloads, builds, and installs clBLAS.
In this implementation in this repository here, it uses an existing source-code directory, but note that 'externalproject' can actually take a git repository url, and do the download automatically, and thus take the place of `git submodule`.
# Variations
There are two variations:
* testextinc-manual: uses externalproject to build the external project, but sets up include directory paths etc manually in the parent project
* eg, if we dont own the child proejct, this could be appropriate?
* testextinc-findpackage: puts the variables in a xxxConfig.cmake file, that we read using find_package# To build
*Assumptions*:
* using linux ubuntu 14.04
* cmake installed
* g++ installedProcedure:
* cd into testextinc-manual or testextinc-findpackage
* run `./run.sh`
=> hopefully binaries should pop out in `install` subdirectory. Can run it by doing:
```
install/run.sh
```