CetCMakeConfig¶
Module defining the lazy functions:
cet_cmake_config()
to finalize project bookkeeping and generate CMake “config” and “version” files.
cet_finalize()
to finalize project bookkeeping without generating config and version files.
Note
Precisely one of the above functions should be called precisely once
after each cet_cmake_env()
call.
- cet_cmake_config¶
Generate and install
<PROJECT-NAME>Config.cmake
and<PROJECT-NAME>ConfigVersion.cmake
.cet_make_config([<options>])
Options¶
COMPATIBILITY <val>
Set the compatibility for this version of your package (default
AnyNewerVersion
).See also
CONFIG_PRE_INIT <config-fragment-file>... CONFIG_POST_(DEPS|INIT|TARGETS|TARGET_VARS|VARS) <config-fragment-file>...
Specify files containing CMake code to be included in the CMake config file at the appropriate place.
cetbuildtools
EXTRA_TARGET_VARS <target>
Create cetbuidltools-compatible variables for the specified targets.
NO_CMAKE_CONFIG
Disable the production of
<PROJECT-NAME>Config.cmake
and<PROJECT-NAME>ConfigVersion.cmake
; necessary bookkeeping is still done.Deprecated since version 3.23.00: use
cet_finalize()
PATH_VARS <path-vars>
Specify variables containing paths that will be defined in the CMake config file relative to the installation path.
WORKDIR <workdir>
Set the directory in which to generate config files for later installation (default
genConfig
). Ifworkdir
is not absolute it will be calculated relative toCETMODULES_CURRENT_PROJECT_BINARY_DIR
Variables affecting behavior¶
-
If
TRUE
, the CMake config and version files will be installed under<PROJECT-NAME>_DATA_DIR
rather than<PROJECT-NAME>_LIBRARY_DIR
.If unset, a vacuous
<PROJECT-NAME>_LIBRARY_DIR
will produce a warning.If explicitly
FALSE
,cet_cmake_config()
will fail on vacuous<PROJECT-NAME>_LIBRARY_DIR
.
- cet_finalize¶
Finalize bookkeeping for the current project.
New in version 3.23.00: to replace
cet_cmake_config(NO_CMAKE_CONFIG)
Note
cet_finalize()
should be called—at most—once after callingcet_cmake_env()
for each project.Note
An explicit call to
cet_finalize()
for a project is not necessary ifcet_cmake_config()
is invoked for that project.