You will find here a CMake module allowing to easily create a build system on top of ExternalProject module.
- Intuitive and easy way to "pass" CMake variables to external project. By default, variables are associated with
CMAKE_CACHE_ARGS
. - Support association of CMake variable with labels.
- Automatically associate variables with
CMAKE_ARGS
if a multi-configuration CMake generator is used and${CMAKE_CFG_INTDIR}
is found in the value. - Automatically set external options
LIST_SEPARATOR
,CMAKE_GENERATOR
,CMAKE_GENERATOR_PLATFORM
andCMAKE_GENERATOR_TOOLSET
. - If CMake >= 3.24, set
DOWNLOAD_EXTRACT_TIMESTAMP
to1
. See CMP0135 - If not explicitly enabled, ensure
User Package Registry
look up usingfind_*
commands is disabled.- If CMake >= 3.16, set
CMAKE_FIND_USE_PACKAGE_REGISTRY
toOFF
otherwise setCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
toON
.
- If CMake >= 3.16, set
- Display a well-formatted and user friendly summary of the included external projects. For example, see here
- Support Ninja generator:
- If supported,
USES_TERMINAL_*
options are always set to dependent projects. - The following variables are automatically propagated to all projects:
CMAKE_EXPORT_COMPILE_COMMANDS
CMAKE_JOB_POOL_COMPILE
CMAKE_JOB_POOL_LINK
CMAKE_JOB_POOLS
- If supported,
- Intuitive handling of USE_SYSTEM options.
- Recipe to write external project file that can be:
- downloaded/configured/built/installed
- and/or found on system using
find_package(<projectname> ...)
calls - and/or explicitly specified using
-D<projectname>_DIR:PATH=...
variables.
Note
To be documented
Note
To be documented
Two possible approaches:
- Use git submodule to reference this repository.
- Copy ExternalProjectDependency.cmake into your source tree making sure you reference the SHA in the associated commit message.
.. toctree:: :maxdepth: 2 /ExternalProjectDependency
sudo apt-get install cmake
git clone git://github.com/commontk/Artichoke
mkdir ArtichokeTest-build
cd ArtichokeTest-build
cmake ../Artichoke/Tests
ctest