KasperskyOS Community Edition 1.2
nk_build_cdl_files()
nk_build_cdl_files()
This command is declared in the file /opt/KasperskyOS-Community-Edition-<version>toolchain/share/cmake/Modules/platform/nk2.cmake
.
nk_build_cdl_files(NAME ...)
This command creates a CMake
target for generating .cdl.h
files for one or more defined CDL files using the NK compiler.
Parameters:
NAME
– name of theCMake
target for building.cdl.h
files. If a target has not yet been created, it will be created by usingadd_library()
with the specified name. Required parameter.NOINSTALL
– if this option is specified, files will only be generated in the working directory and are not installed in global directories:${CMAKE_BINARY_DIR}/_headers_ ${CMAKE_BINARY_DIR}/_headers_/${PROJECT_NAME}
.IDL_TARGET
– target when building.idl.h
files for IDL files containing descriptions of endpoints provided by components described in CDL files.NK_MODULE
– parameter in which you need to specify the component name, excluding the name of the CDL file. For example, if the component name in the CDL description is defined askl.core.NameServer
, thekl.core
value must be passed in theNK_MODULE
parameter.WORKING_DIRECTORY
– working directory for calling the NK compiler, which is${CMAKE_CURRENT_BINARY_DIR}
by default.DEPENDS
– additional build targets on which the CDL file depends.To add multiple targets, you need to use multiple
DEPENDS
parameters.CDL
– path to the CDL file for which the.cdl.h
file is being generated. Required parameter.To add multiple CDL files, you need to use multiple
CDL
parameters.NK_FLAGS
– additional flags for the NK compiler.
Example call:
nk_build_cdl_files (echo_cdl_files IDL_TARGET echo_idl_files NK_MODULE "echo" CDL "resources/Ping.cdl")
For an example of using this command, see the article titled "CMakeLists.txt files for building application software".
Article ID: cmake_build_cdl, Last review: May 21, 2024