Files | Functions | Variables

Utilities implementated by the CMake modules. More...

+ Collaboration diagram for CMake Utilities:

Files

file  CheckPublicHeaders.cmake
 CMake script used to check whether public headers were added/removed.
 
file  ConfigureIncludeFiles.cmake
 CMake script used to configure and copy the public header files.
 
file  ExecuteProcess.cmake
 Execute process using CMake script mode.
 
file  TopologicalSort.cmake
 CMake implementation of topological sorting algorithm.
 

Functions

function add_executable (in TARGET_UID, in ARGN)
 Add executable target. More...
 
function add_library (in TARGET_UID, in ARGN)
 Add library target. More...
 
function basis_add_bash_utilities_library (out UID)
 Add build target for BASIS Bash utilities library. More...
 
function basis_add_custom_export_target (in TARGET_UID, in IS_TEST)
 Add target to custom export set. More...
 
macro basis_add_custom_target (in TARGET_NAME)
 Add custom target. More...
 
function basis_add_cxx_utilities_library (out UID)
 Add build target for BASIS C++ utilities library. More...
 
function basis_add_executable_target (in TARGET_NAME, in ARGN)
 Add executable built from C++ source code. More...
 
function basis_add_export_target (out EXPORT_OPTION, in TARGET_UID, in IS_TEST, in ARGN)
 Add target to export set. More...
 
function basis_add_glob_target (in TARGET_UID, out SOURCES, in ARGN)
 Glob source files. More...
 
function basis_add_imported_target (in TARGET, in TYPE)
 Add imported target. More...
 
function basis_add_init_py_target ()
 
function basis_add_library_target (in TARGET_NAME, in ARGN)
 Add library built from C++ source code. More...
 
function basis_add_mcc_target (in TARGET_NAME, in ARGN)
 Add MATLAB Compiler target. More...
 
function basis_add_mex_file (in TARGET_NAME, in ARGN)
 Add MEX-file target. More...
 
macro basis_add_module_info (in MODULE_NAME, in F)
 Manually add project module to list of modules. More...
 
function basis_add_perl_utilities_library (out UID)
 Add build target for BASIS Perl utilities library. More...
 
function basis_add_python_utilities_library (out UID)
 Add build target for BASIS Python utilities library. More...
 
function basis_add_script_library (in TARGET_NAME, in ARGN)
 Add script library target. More...
 
function basis_add_tests_of_default_options (in TARGET_NAME)
 Add tests of default options for given executable. More...
 
function basis_add_uninstall ()
 Add uninstall target. More...
 
macro basis_add_utilities_library (out UID, in LANGUAGE)
 Add build target for BASIS utilities library. More...
 
function basis_append_to_each (in OUTPUT_LIST, in INPUT_LIST, in ITEM_TO_APPEND)
 basis_append_to_each takes an input list and appends a single element to each item in that list and appends it to the output list. For example, this is useful for adding relative paths to the end of a list of paths. More...
 
function basis_build_mcc_target (in TARGET_UID)
 Add custom command for build of MATLAB Compiler target. More...
 
function basis_build_mex_file (in TARGET_UID)
 Add custom command for build of MEX-file. More...
 
function basis_build_script (in TARGET_UID)
 Add custom command for build of single script. More...
 
function basis_build_script_library (in TARGET_UID)
 Add custom command for build of script library. More...
 
function basis_buildtree_asserts (in ARGN)
 Ensure certain requirements on build tree. More...
 
function basis_check_if_module_depends_on_package (out result, in module, in package)
 Check if named project module depends on the specified package. More...
 
function basis_check_if_package_is_needed_by_modules (out result, in package, in ARGN)
 Check if any of the named/enabled modules depends on the specified package. More...
 
function basis_check_target_name (in TARGET_NAME)
 Checks whether a given name is a valid target name. More...
 
function basis_check_test_name (in TEST_NAME)
 Checks whether a given name is a valid test name. More...
 
macro basis_compare_lists (out RESULT, in LIST1, in LIST2)
 Compare two lists. More...
 
macro basis_compile_python_modules_for_jython (out FLAG)
 Whether to compile Python modules for Jython interpreter. More...
 
function basis_configure_public_headers ()
 Configure public header files. More...
 
macro basis_configure_root_documentation_files ()
 Configure root documentation files. More...
 
function basis_configure_script (in INPUT, in OUTPUT, in ARGN)
 Configure and optionally compile script file. More...
 
function basis_configure_script_libraries ()
 Add library targets for the public modules in PROJECT_LIBRARY_DIR. More...
 
function basis_configure_sources (out LIST_NAME, in ARGN)
 Configure .in source files. More...
 
function basis_configure_utilities ()
 Configure BASIS utilities. More...
 
function basis_create_addpaths_mfile ()
 This function writes a MATLAB M-file with addpath() statements. More...
 
function basis_disable_testing_if_no_tests ()
 Disable testing if project does not implement any tests. More...
 
function basis_dump_variables (in RESULT_FILE)
 Output current CMake variables to file. More...
 
macro basis_exists_target (out RESULT_VARIABLE, in TARGET_NAME)
 Whether a given target exists. More...
 
function basis_export_build_properties (in CODE)
 Add code to set properties of imported targets for build tree. More...
 
function basis_export_footer (in CODE)
 Add footer of exports file. More...
 
function basis_export_header (in CODE)
 Generate header of exports file. More...
 
function basis_export_import_targets (in CODE)
 Add code to add import targets. More...
 
function basis_export_install_properties (in CODE)
 Add code to set properties of imported targets for installation. More...
 
function basis_export_prefix (in CODE)
 Add code to compute prefix relative to INSTALL_CONFIG_DIR. More...
 
function basis_export_targets ()
 Export all targets added by basis_add_* commands. More...
 
function basis_finalize_targets (in ARGN)
 Finalize custom targets by adding the missing build commands. More...
 
function basis_find_logo (in OUTPUT_VARIABLE, in SPECIFIED_LOGO, in DEFAULT_NAME)
 Find standard project logo files with standardized PROJECT_${LOGO_TYPE}_LOGO variable names This is an internal function not designed for general use. More...
 
macro basis_find_packages ()
 Find packages this project depends on. More...
 
function basis_get_bash_version (out ARGV1)
 Get version of Bash interpreter. More...
 
function basis_get_build_timestamp (in TIMESTAMP)
 Get build time stamp. More...
 
function basis_get_compiled_file (out CFILE, in SOURCE, in ARGV2)
 Get file name of compiled script. More...
 
macro basis_get_compiled_jython_file_of_python_module (out CFILE, in MODULE)
 Get file path of Jython file compiled from the given Python module. More...
 
function basis_get_full_matlab_version (out VERSION)
 Determine version of MATLAB installation. More...
 
function basis_get_fully_qualified_target_uid (out TARGET_UID, in TARGET_NAME)
 Get fully-qualified target name. More...
 
function basis_get_fully_qualified_test_uid (out TEST_UID, in TEST_NAME)
 Get "global" test name, i.e., actual CTest test name. More...
 
function basis_get_jython_version (out ARGV1)
 Get version of Jython interpreter. More...
 
function basis_get_matlab_release (out ARGV1)
 Get release version of MATLAB installation. More...
 
function basis_get_matlab_version (out ARGV1)
 Get version of MATLAB installation. More...
 
function basis_get_module_info (in MODULE_NAME, in F, in ARGN)
 
function basis_get_perl_version (out ARGV1)
 Get version of Perl interpreter. More...
 
function basis_get_project_property (out VARIABLE, in ARGN)
 Get project-global property value. More...
 
function basis_get_project_uses_utilities (in RETVAL)
 Determine whether this project uses any of the BASIS Utilities. More...
 
macro basis_get_property (in ARGN)
 
function basis_get_python_version (out ARGV1)
 Get version of Python interpreter. More...
 
function basis_get_revision (in URL, out REV)
 Get revision of file or directory. More...
 
function basis_get_soname (out SONAME, in OBJFILE)
 Get soname of object file. More...
 
function basis_get_source_language (out LANGUAGE, in ARGN)
 Detect programming language of given source code files. More...
 
function basis_get_source_target_name (out TARGET_NAME, in SOURCE_FILE, in ARGN)
 Derive target name from source file name. More...
 
function basis_get_target_link_libraries (out LINK_DEPENDS, in TARGET_NAME)
 Get link libraries/dependencies of (imported) target. More...
 
function basis_get_target_location (out VAR, in TARGET_NAME, in PART)
 Get location of build target output file(s). More...
 
function basis_get_target_name (out TARGET_NAME, in TARGET_UID)
 Get "local" target name, i.e., BASIS target name without check of UID. More...
 
function basis_get_target_namespace (out TARGET_NS, in TARGET_UID)
 Get namespace of build target without check of UID. More...
 
function basis_get_target_type (out TYPE, in TARGET_NAME)
 Get type name of target. More...
 
function basis_get_target_uid (out TARGET_UID, in TARGET_NAME)
 Get "global" target name, i.e., actual CMake target name. More...
 
function basis_get_test_name (out TEST_NAME, in TEST_UID)
 Get "local" test name, i.e., BASIS test name. More...
 
function basis_get_test_namespace (out TEST_NS, in TEST_UID)
 Get namespace of test. More...
 
function basis_get_test_uid (out TEST_UID, in TEST_NAME)
 Get "global" test name, i.e., actual CTest test name. More...
 
function basis_git_get_revision (in URL, out REV, in ARGN)
 Get HEAD commit SHA of file or directory. More...
 
macro basis_initialize_settings ()
 Initialize project settings. More...
 
function basis_install_links ()
 Adds installation rules to create default symbolic links. More...
 
macro basis_install_public_headers ()
 Add installation rules for public header files. More...
 
function basis_install_template (in TEMPLATE, in DESTINATION)
 Add installation rule for project template. More...
 
function basis_installtree_asserts (in ARGN)
 Ensure certain requirements on install tree. More...
 
macro basis_is_cached (out VAR, in ENTRY)
 Determine if cache entry exists. More...
 
function basis_is_git_repository (in FLAG, in DIR)
 
function basis_join (in VALUES, in DELIMITER, out OUTPUT)
 Concatenates all list elements into a single delimited string. More...
 
macro basis_library_prefix (out PREFIX, in LANGUAGE)
 Get default subdirectory prefix of scripted library modules. More...
 
function basis_list_to_delimited_string (out STR, in DELIM, in ARGN)
 Concatenates all list elements into a single delimited string. More...
 
macro basis_list_to_regex (out REGEX, in ARGN)
 Convert list into regular expression. More...
 
function basis_list_to_string (out STR, in ARGN)
 Concatenates all list elements into a single string. More...
 
function basis_make_target_uid (out TARGET_UID, in TARGET_NAME)
 Make target UID from given target name. More...
 
function basis_make_test_uid (out TEST_UID, in TEST_NAME)
 Make test UID from given test name. More...
 
function basis_mexext (out ARGN)
 Determine extension of MEX-files for this architecture. More...
 
macro basis_module_enable (in MODULE, in NEEDED_BY)
 
function basis_normalize_name (out OUT, in STR)
 Convert string to lowercase only or mixed case. More...
 
function basis_process_generator_expressions (out ARGS, in ARGN)
 Process generator expressions in arguments. More...
 
macro basis_project_initialize ()
 Initialize project, calls CMake's project() command. More...
 
macro basis_project_modules ()
 Initialize project modules. More...
 
function basis_register_package ()
 Register installed package with CMake. More...
 
macro basis_remove_blank_line (in STRVAR)
 Remove one blank line from top of string. More...
 
macro basis_sanitize_for_regex (out OUT, in STR)
 Sanitize string variable for use in regular expression. More...
 
macro basis_set_config_option (out VAR, in OPT)
 Set value of variable to either 0 or 1 based on option value. More...
 
macro basis_set_flag (in PREFIX, out FLAG, in DEFAULT)
 Set flag given mutually exclusive ARGN_<FLAG> and ARGN_NO<FLAG> function arguments. More...
 
macro basis_set_if_empty (out VAR, in ARGN)
 Set value of variable only if variable is not set already. More...
 
macro basis_set_if_not_set (out VAR, in ARGN)
 Set value of variable only if variable is not defined yet. More...
 
macro basis_set_or_update_type (in VAR, in TYPE, in ARGN)
 Set type of variable. More...
 
macro basis_set_or_update_value (in VAR)
 Set variable value. More...
 
function basis_set_project_property ()
 Set project-global property. More...
 
macro basis_set_property (in ARGN)
 
function basis_set_target_install_rpath (in TARGET_NAME)
 Set INSTALL_RPATH property of executable or shared library target. More...
 
macro basis_slicer_module_initialize ()
 Initialize slicer module meta-data. More...
 
function basis_slicer_module_to_extension_metadata ()
 Copy MODULE_* metadata to EXTENSION_* metadata of Slicer Extension. More...
 
function basis_string_to_list (out LST, in STR)
 Splits a string at space characters into a list. More...
 
function basis_strip_target_uid (inout TARGET_UID)
 Strip of top-level package name from target UID if present. More...
 
function basis_svn_get_last_changed_revision (in URL, out REV)
 Get revision number when directory or file was last changed. More...
 
function basis_svn_get_revision (in URL, out REV)
 Get current revision of file or directory. More...
 
function basis_svn_status (in URL, out STATUS)
 Get status of revision controlled file. More...
 
function basis_tokenize_dependency (in DEP, out PKG, out VER, out CMP)
 Tokenize dependency specification. More...
 
function basis_update_imported_location (in TARGET, in PROPERTY, in LOCATION)
 Update location of imported target. More...
 
function basis_update_imported_type (in TARGET, in TYPE)
 Update type of imported target. More...
 
macro basis_update_type_of_variable (in VAR, in TYPE)
 Change type of cached variable. More...
 
macro basis_update_value (in VAR)
 Update cache variable. More...
 
function basis_utilities_check (out VAR, in SOURCE_FILE, in ARGN)
 Check whether the BASIS utilities are used within a given source file. More...
 
function basis_variable_check (in ARGN)
 Checks for a list of variables required later in the script. More...
 
function basis_variable_value_status (out VAR_INFO_STRING, in ARGN)
 Create a string from a list of variables indicating if they are defined and their values. More...
 
function basis_version_numbers (in VERSION, out MAJOR, out MINOR, out PATCH)
 Extract version numbers from version string. More...
 
macro basis_write_addpaths_mfile (in MFILE, in ARGN)
 This function writes a MATLAB M-file with addpath() statements. More...
 
function basis_write_list (in FILENAME, in VARIABLE)
 Write CMake script file which sets the named variable to the specified (list of) values. More...
 
macro find_package ()
 Overloaded find_package() command. More...
 
function get_filename_component (inout ARGN)
 Fixes CMake's get_filename_component() command. More...
 
macro include_directories (in ARGN)
 Add directories to search path for include files. More...
 
macro link_directories (in ARGN)
 Add directories to search path for libraries. More...
 
function set_target_properties (in ARGN)
 Set target property. More...
 

Variables

option BUILD_ALL_MODULES = OFF
 
cmake CONFIG_FILE
 Name of the CMake package configuration file. More...
 
cmake CONFIG_PREFIX
 Package name. More...
 
cmake CUSTOM_EXPORTS_FILE
 Name of the CMake target exports file for custom targets. More...
 
cmake EXPORTS_FILE
 Name of the CMake target exports file. More...
 
cmake msg
 
cmake PROJECT_MODULES_DISABLED
 
cmake PROJECT_MODULES_ENABLED
 
cmake PROJECT_MODULES_SORTED
 
cmake USE_FILE
 Name of the CMake package use file. More...
 
cmake VERSION_FILE
 Name of the CMake package version file. More...
 

Detailed Description

Utilities implementated by the CMake modules.

Names of recognized properties on tests.

Unfortunately, the ARGV and ARGN arguments of a CMake function() or macro() does not preserve values which themselves are lists. Therefore, it is not possible to distinguish between property names and their values in the arguments passed to basis_set_tests_properties(). To overcome this problem, this list specifies all the possible property names. Everything else is considered to be a property value except the first argument follwing right after the PROPERTIES keyword. Alternatively, basis_set_property() can be used as here no disambiguity exists.

Note
Placeholders such as <CONFIG> are allowed. These are treated as the regular expression "[^ ]+". See basis_list_to_regex().
See also
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#section_PropertiesonTests

Function Documentation

§ add_executable()

function add_executable ( in  TARGET_UID,
in  ARGN 
)

Add executable target.

This BASIS function overwrites CMake's add_executable() command in order to store information of imported targets which is in particular used to generate the source code of the ExecutableTargetInfo modules which are part of the BASIS utilities.

Note
Use basis_add_executable() instead where possible!
Parameters
[in]TARGET_UIDName of the target.
[in]ARGNFurther arguments of CMake's add_executable().
See also
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_executable
Returns
Nothing.

§ add_library()

function add_library ( in  TARGET_UID,
in  ARGN 
)

Add library target.

This BASIS function overwrites CMake's add_library() command in order to store information of imported targets.

Note
Use basis_add_library() instead where possible!
Parameters
[in]TARGET_UIDName of the target.
[in]ARGNFurther arguments of CMake's add_library().
See also
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_library
Returns
Nothing.

§ basis_add_bash_utilities_library()

function basis_add_bash_utilities_library ( out  UID)

Add build target for BASIS Bash utilities library.

This function is called by basis_target_link_libraries() in order to add the "basis" build target for the project-specific BASIS Bash utilities. If the target was added before, it is only used to get the target UID of this build target so the executable or library can be linked to it.

Note
The basis_target_link_libraries() function in fact calls basis_add_utilities_library() which calls this function.
Parameters
[out]UIDUID of added build target.
Returns
Nothing.

§ basis_add_custom_export_target()

function basis_add_custom_export_target ( in  TARGET_UID,
in  IS_TEST 
)

Add target to custom export set.

Targets are added to the export set named after the top-level project. This is necessary because CMake does not allow us to split the exports into different sets when there are inter-dependencies between library targets of the modules.

Parameters
[in]TARGET_UIDUID of target to add to the export set.
[in]IS_TESTWhether given target is a test executable or library.
Returns
Nothing.

§ basis_add_custom_target()

macro basis_add_custom_target ( in  TARGET_NAME)

Add custom target.

Returns
Nothing.

§ basis_add_cxx_utilities_library()

function basis_add_cxx_utilities_library ( out  UID)

Add build target for BASIS C++ utilities library.

This function is called by basis_add_executable_target() and basis_add_library_target() in order to add the "basis" build target for the static project-specific BASIS utilities library for C++. If the target was added before, it is only used to get the target UID of this build target so the newly added executable or library can be linked to it.

The CMake function add_library() checks if the specified source code files exist. If a source file is not found, an error is raised by CMake. The BASIS utilities can, however, only be configured at the end of the configuration step. Therefore, this function simply writes dummy C++ source files in order to pass the existence check. The actual source files are configured by the function basis_configure_utilities() which is called by basis_project_end().

After writing these dummy source files, a library build target for the project-specific BASIS C++ utilities is added. This build target is not being build as part of the ALL target in case it is never used by any of the build targets of the project. Only if build target links to this library, it will be build and installed.

Parameters
[out]UIDUID of added build target.
Returns
Nothing.

§ basis_add_executable_target()

function basis_add_executable_target ( in  TARGET_NAME,
in  ARGN 
)

Add executable built from C++ source code.

Note
This function should not be used directly. Instead, it is called by basis_add_executable() if the (detected) programming language of the given source code files is CXX (i.e., C/C++).

This function adds an executable target for the build of an executable from C++ source code files. Refer to the documentation of basis_add_executable() for a description of general options for adding an executable target.

By default, the BASIS C++ utilities library is added as link dependency. If none of the BASIS C++ utilities are used by this target, the option NO_BASIS_UTILITIES can be given. To enable this option by default, set the variable BASIS_UTILITIES to FALSE, best in the Settings.cmake file located in the PROJECT_CONFIG_DIR (add such file if missing). If the use of the BASIS C++ utilities is disabled by default, the USE_BASIS_UTILITIES option can be used to enable them for this target only. Note that the utilities library is a static library and thus the linker would simply not include any of the BASIS utility functions in the final binary file if not used. The only advantage of setting BASIS_UTILITIES to FALSE or to always specify NO_BASIS_UTILITIES if no target uses the utilities is that the BASIS utilities library will not be build in this case.

Parameters
[in]TARGET_NAMEName of build target.
[in]ARGNThis argument list is parsed and the following arguments are extracted, all other arguments are considered to be source code files and simply passed on to CMake's add_executable() command.
COMPONENT name Name of component as part of which this executable will be installed if the specified DESTINATION is not "none". (default: BASIS_RUNTIME_COMPONENT)
DESTINATION dir Installation directory relative to CMAKE_INSTALL_PREFIX. If "none" (case-insensitive) is given as argument, no default installation rules are added for this executable target. (default: INSTALL_RUNTIME_DIR or INSTALL_LIBEXEC_DIR if LIBEXEC is given)
LIBEXEC Specifies that the built executable is an auxiliary executable which is only called by other executables. (default: FALSE)
[NO]EXPORT Whether to export this target. (default: TRUE)
NO_BASIS_UTILITIES Specify that the BASIS utilities are not used by this executable and hence no link dependency on the BASIS utilities library shall be added. (default: NOT BASIS_UTILITIES)
USE_BASIS_UTILITIES Specify that the BASIS utilities are used and required by this executable and hence a link dependency on the BASIS utilities library has to be added. (default: BASIS_UTILITIES)
Returns
Adds executable target using CMake's add_executable() command.
See also
basis_add_executable()

§ basis_add_export_target()

function basis_add_export_target ( out  EXPORT_OPTION,
in  TARGET_UID,
in  IS_TEST,
in  ARGN 
)

Add target to export set.

Targets are added to the export set named after the top-level project. This is necessary because CMake does not allow us to split the exports into different sets when there are inter-dependencies between library targets of the modules.

Parameters
[out]EXPORT_OPTIONExport option for install() command including the EXPORT option name. Set to an empty string if target is not installed (see ARGN).
[in]TARGET_UIDUID of target to be exported.
[in]IS_TESTWhether given target is a test executable or library.
[in]ARGNOptional installation destinations. The actual values are ignored and argument TRUE should be used if no specific destination paths are given, but the target is also to be included in the export set used for installation. If ARGN is empty, the target is only added to the build tree export set. When ARGN is 0, FALSE or OFF, the target is not added to list of installation exports.
Returns
Nothing.

§ basis_add_glob_target()

function basis_add_glob_target ( in  TARGET_UID,
out  SOURCES,
in  ARGN 
)

Glob source files.

This function gets a list of source files and globbing expressions, evaluates the globbing expression, and replaces these by the found source files such that the resulting list of source files contains only absolute paths of source files. It is used by basis_add_executable() and basis_add_library() to get a list of all source files. The syntax for the glob expressions corresponds to the one used by CMake's file(GLOB) command. Additionally, if the pattern ** is found in a glob expression, it is replaced by a single * and the recursive version, i.e., file(GLOB_RECURSE), is used instead.

Parameters
[in]TARGET_UIDUID of build target which builds the globbed source files. The custom target which re-globs the source files before each build of this target is named after this build target with two leading underscores (__).
[out]SOURCESList of absolute source paths.
[in]ARGNInput file paths and/or globbing expressions.
See also
basis_add_executable()
basis_add_library()
Returns
Nothing.

§ basis_add_imported_target()

function basis_add_imported_target ( in  TARGET,
in  TYPE 
)

Add imported target.

Imported targets are only valid in the scope where they were imported. In order to be able to add the information of the imported executable targets to the ExecutableTargetInfo modules of the BASIS utilities which are configured during the finalization of the (top-level) project, the information of imported targets has to be stored in the global scope. Therefore, internal cache variables prefixed by the name of the project are used (see basis_set_project_property()):

IMPORTED_TARGETS List of imported targets.
IMPORTED_TYPES Types of imported targets.
IMPORTED_LOCATIONS Locations of imported target files.
IMPORTED_RANKS Rank of current imported locations. This rank value is used to decide whether the current location takes precedence over another imported location. For example, IMPORTED_LOCATION_<a>, may be preferred over IMPORTED_LOCATION_<b>.
Parameters
[in]TARGETName (UID) of the imported target.
[in]TYPEType of the imported target.
See also
basis_update_imported_location()
Returns
Nothing.

§ basis_add_init_py_target()

function basis_add_init_py_target ( )
Returns
Nothing.

§ basis_add_library_target()

function basis_add_library_target ( in  TARGET_NAME,
in  ARGN 
)

Add library built from C++ source code.

Note
This function should not be used directly. Instead, it is called by basis_add_library() if the (detected) programming language of the given source code files is CXX (i.e., C/C++) and the option MEX is not given.

This function adds a library target which builds a library from C++ source code files. Refer to the documentation of basis_add_library() for a description of the general options for adding a library target.

By default, the BASIS C++ utilities library is added as link dependency. If none of the BASIS C++ utilities are used by this target, the option NO_BASIS_UTILITIES can be given. To enable this option by default, set the variable BASIS_UTILITIES to FALSE, best in the Settings.cmake file located in the PROJECT_CONFIG_DIR (add such file if missing). If the use of the BASIS C++ utilities is disabled by default, the USE_BASIS_UTILITIES option can be used to enable them for this target only. Note that the utilities library is a static library and thus the linker would simply not include any of the BASIS utility functions in the final binary file if not used. The only advantage of setting BASIS_UTILITIES to FALSE or to always specify NO_BASIS_UTILITIES if no target uses the utilities is that the BASIS utilities library will not be build in this case.

Parameters
[in]TARGET_NAMEName of build target.
[in]ARGNThis argument list is parsed and the following arguments are extracted. All other arguments are considered to be source code files and simply passed on to CMake's add_library() command.
STATIC|SHARED|MODULE Type of the library. (default: SHARED if BUILD_SHARED_LIBS evaluates to true or STATIC otherwise)
COMPONENT name Name of component as part of which this library will be installed if either the RUNTIME_INSTALL_DIRECTORY or LIBRARY_INSTALL_DIRECTORY property is not "none". Used only if either RUNTIME_COMPONENT or LIBRARY_COMPONENT not specified. (default: see RUNTIME_COMPONENT and LIBRARY_COMPONENT)
DESTINATION dir Installation directory for runtime and library component relative to CMAKE_INSTALL_PREFIX. Used only if either RUNTIME_DESTINATION or LIBRARY_DESTINATION not specified. If "none" (case-insensitive) is given as argument, no default installation rules are added. (default: see RUNTIME_DESTINATION and LIBRARY_DESTINATION)
LIBRARY_COMPONENT name Name of component as part of which import/static library will be intalled if LIBRARY_INSTALL_DIRECTORY property is not "none". (default: COMPONENT if specified or BASIS_LIBRARY_COMPONENT otherwise)
LIBRARY_DESTINATION dir Installation directory of the library component relative to CMAKE_INSTALL_PREFIX. If "none" (case-insensitive) is given as argument, no installation rule for the library component is added. (default: INSTALL_ARCHIVE_DIR)
RUNTIME_COMPONENT name Name of component as part of which runtime library will be installed if RUNTIME_INSTALL_DIRECTORY property is not "none". (default: COMPONENT if specified or BASIS_RUNTIME_COMPONENT otherwise)
RUNTIME_DESTINATION dir Installation directory of the runtime component relative to CMAKE_INSTALL_PREFIX. If "none" (case-insensitive) is given as argument, no installation rule for the runtime library is added. (default: INSTALL_LIBRARY_DIR on Unix or INSTALL_RUNTIME_DIR Windows)
[NO]EXPORT Whether to export this target. (default: TRUE)
NO_BASIS_UTILITIES Specify that the BASIS utilities are not used by this executable and hence no link dependency on the BASIS utilities library shall be added. (default: NOT BASIS_UTILITIES)
USE_BASIS_UTILITIES Specify that the BASIS utilities are used and required by this executable and hence a link dependency on the BASIS utilities library shall be added. (default: BASIS_UTILITIES)
Returns
Adds library target using CMake's add_library() command.
See also
basis_add_library()

§ basis_add_mcc_target()

function basis_add_mcc_target ( in  TARGET_NAME,
in  ARGN 
)

Add MATLAB Compiler target.

Note
This function should not be used directly. Instead, it is called by either basis_add_executable() or basis_add_library() if the (detected) programming language of the given source code files is MATLAB.

This function is used to add an executable or shared library target which is built using the MATLAB Compiler (MCC).

A custom CMake build target with the following properties is added by this function to the build system. These properties are used by basis_build_mcc_target() to generate a build script written in CMake code which is executed by a custom CMake command. Before the invokation of basis_build_mcc_target(), the target properties can be modified using basis_set_target_properties().

Note
Custom BASIS build targets are finalized by BASIS using basis_project_end(), i.e., the end of the root CMake configuration file of the (sub-)project.
Properties on MATLAB Compiler targets
TODO

An install command for the added executable or library target is added by this function as well. The executable will be installed as part of the RUNTIME_COMPONENT in the directory INSTALL_RUNTIME_DIR. The runtime library will be installed as part of the RUNTIME_COMPONENT in the directory INSTALL_LIBRARY_DIR on Unix and INSTALL_RUNTIME_DIR on Windows. Static/import libraries will be installed as part of the LIBRARY_COMPONENT in the directory INSTALL_ARCHIVE_DIR.

Note
If this function is used within the PROJECT_TESTING_DIR, the built executable is output to the BINARY_TESTING_DIR directory tree instead. Moreover, no installation rules are added. Test executables are further not exported, regardless of the value of the EXPORT property.
Parameters
[in]TARGET_NAMEName of build target.
[in]ARGNThe remaining arguments are parsed and the following arguments extracted. All unparsed arguments are treated as the MATLAB or C/C++ source files, respectively.
EXECUTABLE|LIBEXEC|SHARED Type of the MATLAB Compiler target which can be either a stand-alone executable, an auxiliary executable, or a shared library. (default: EXECUTABLE)
COMPONENT name Name of component as part of which this executable or library will be installed if the RUNTIME_INSTALL_DIRECTORY or LIBRARY_INSTALL_DIRECTORY property is not "none". Used only if RUNTIME_COMPONENT or LIBRARY_COMPONENT not specified. (default: see RUNTIME_COMPONENT and LIBRARY_COMPONENT arguments)
DESTINATION dir Installation directory for executable or runtime and library component of shared library relative to CMAKE_INSTALL_PREFIX. Used only if RUNTIME_DESTINATION or LIBRARY_DESTINATION not specified. If "none" (case-insensitive) is given as argument, no default installation rules are added. (default: see RUNTIME_DESTINATION and LIBRARY_DESTINATION arguments)
LIBRARY_COMPONENT name Name of component as part of which import/static library will be intalled if a shared library is build and the LIBRARY_INSTALL_DIRECTORY property is not "none". (default: COMPONENT if specified or BASIS_LIBRARY_COMPONENT otherwise)
LIBRARY_DESTINATION dir Installation directory of the library component relative to CMAKE_INSTALL_PREFIX. If "none" (case-insensitive) is given as argument or an executable is build, no installation rule for the library component is added. (default: INSTALL_ARCHIVE_DIR)
HEADER_DESTINATION dir Installation directory of the library header file relative to INSTALL_INCLUDE_DIR. If "none" (case-insensitive) is given as argument or an executable is build, no installation rule for the library header file is added. (default: INSTALL_INCLUDE_DIR)
RUNTIME_COMPONENT name Name of component as part of which executable or runtime library, respectively, will be installed if the RUNTIME_INSTALL_DIRECTORY property is not "none". (default: COMPONENT if specified or BASIS_RUNTIME_COMPONENT otherwise)
RUNTIME_DESTINATION dir Installation directory of the executable or runtime component of the shared library relative to CMAKE_INSTALL_PREFIX. If "none" (case-insensitive) is given as argument, no installation rule for the runtime library is added. (default: INSTALL_LIBRARY_DIR for shared libraries on Unix or INSTALL_RUNTIME_DIR otherwise)
[NO]EXPORT Whether to export this target. (default: TRUE)
NO_BASIS_UTILITIES Specify that the BASIS utilities are not used by this executable or shared library and hence no link dependency on the BASIS utilities shall be added. (default: NOT BASIS_UTILITIES)
USE_BASIS_UTILITIES Specify that the BASIS utilities are used and required by this executable or shared library, respectively, and hence a link dependency on the BASIS utilities must be added. (default: BASIS_UTILITIES)
FINAL Finalize custom targets immediately. Any following target property changes will have no effect. When this option is used, the custom target which executes the custom build command is added in the current working directory. Otherwise it will be added in the top-level source directory of the project. Which with the Visual Studio generators adds the corresponding Visual Studio Project files directly to the top-level build directory. This can be avoided using this option or calling basis_finalize_targets() at the end of each CMakeLists.txt file.
Todo:
Consider NO_BASIS_UTILITIES and USE_BASIS_UTILITIES options after the BASIS utilities for MATLAB have been implemented.
Returns
Adds custom target which builds depending on the BASIS_TYPE property either an executable or a shared library using the MATLAB Compiler.
See also
basis_add_executable()
basis_add_library()

§ basis_add_mex_file()

function basis_add_mex_file ( in  TARGET_NAME,
in  ARGN 
)

Add MEX-file target.

Note
This function should not be used directly. Instead, it is called by basis_add_library() if the (detected) programming language of the given source code files is CXX (i.e., C/C++) and the MEX type option is given.

This function is used to add a shared library target which is built using the MATLAB MEX script (mex).

By default, the BASIS C++ utilities library is added as link dependency. If none of the BASIS C++ utilities are used by this target, the option NO_BASIS_UTILITIES can be given. To enable this option by default, set the variable BASIS_UTILITIES to FALSE, best in the Settings.cmake file located in the PROJECT_CONFIG_DIR (add such file if missing). If the use of the BASIS C++ utilities is disabled by default, the USE_BASIS_UTILITIES option can be used to enable them for this target only. Note that the utilities library is a static library and thus the linker would simply not include any of the BASIS utility functions in the final binary file if not used. The only advantage of setting BASIS_UTILITIES to FALSE or to always specify NO_BASIS_UTILITIES if no target uses the utilities is that the BASIS utilities library will not be build in this case.

A custom CMake build target with the following properties is added by this function to the build system. These properties are used by basis_build_mex_target() to generate a build script written in CMake code which is executed by a custom CMake command. Before the invokation of basis_build_mex_target(), the target properties can be modified using basis_set_target_properties().

Note
Custom BASIS build targets are finalized by BASIS using basis_project_end(), i.e., the end of the root CMake configuration file of the (sub-)project.
Properties on script library targets
MFILE file MATLAB source file with function prototype and documentation of MEX-file. (default: none)
PREFIX prefix Output prefix of build MEX-file such as package name (the prefix must include the leading + and trailing /).
Attention
Properties documented as read-only must not be modified.

An install command for the added library target is added by this function as well. The MEX-file will be installed as part of the specified COMPONENT in the INSTALL_LIBRARY_DIR on Unix and INSTALL_RUNTIME_DIR on Windows.

Parameters
[in]TARGET_NAMEName of build target.
[in]ARGNThe remaining arguments are parsed and the following arguments extracted. All unparsed arguments are treated as the source files of the MEX-file.
COMPONENT name Name of installation component as part of which this MEX-file is being installed if the LIBRARY_INSTALL_DIRECTORY property is not "none". (default: BASIS_LIBRARY_COMPONENT)
[NO]EXPORT Whether to export this target. (default: TRUE)
NO_BASIS_UTILITIES Specify that the BASIS utilities are not used by this MEX-file and hence no link dependency on the BASIS utilities shall be added. (default: NOT BASIS_UTILITIES)
USE_BASIS_UTILITIES Specify that the BASIS utilities are used and required by this MEX-file and hence a link dependency on the BASIS utilities must be added. (default: BASIS_UTILITIES)
FINAL Finalize custom targets immediately. Any following target property changes will have no effect. When this option is used, the custom target which executes the custom build command is added in the current working directory. Otherwise it will be added in the top-level source directory of the project. Which with the Visual Studio generators adds the corresponding Visual Studio Project files directly to the top-level build directory. This can be avoided using this option or calling basis_finalize_targets() at the end of each CMakeLists.txt file.
Returns
Adds custom target to build MEX-file using the MEX script.
See also
basis_add_library()

§ basis_add_module_info()

macro basis_add_module_info ( in  MODULE_NAME,
in  F 
)

Manually add project module to list of modules.

Returns
Nothing.

§ basis_add_perl_utilities_library()

function basis_add_perl_utilities_library ( out  UID)

Add build target for BASIS Perl utilities library.

This function is called by basis_target_link_libraries() in order to add the "basis" build target for the project-specific BASIS Perl utilities. If the target was added before, it is only used to get the target UID of this build target so the executable or library can be linked to it.

Note
The basis_target_link_libraries() function in fact calls basis_add_utilities_library() which calls this function.
Parameters
[out]UIDUID of added build target.
Returns
Nothing.

§ basis_add_python_utilities_library()

function basis_add_python_utilities_library ( out  UID)

Add build target for BASIS Python utilities library.

This function is called by basis_target_link_libraries() in order to add the "basis" build target for the project-specific BASIS Python utilities. If the target was added before, it is only used to get the target UID of this build target so the executable or library can be linked to it.

Note
The basis_target_link_libraries() function in fact calls basis_add_utilities_library() which calls this function.
Parameters
[out]UIDUID of added build target.
Returns
Nothing.

§ basis_add_script_library()

function basis_add_script_library ( in  TARGET_NAME,
in  ARGN 
)

Add script library target.

Note
This function should not be used directly. Instead, it is called by basis_add_library() if the (detected) programming language of the given source code files is neither CXX (i.e., C/C++) nor MATLAB.

This function adds a build target for libraries which are a collection of one or more modules written in a scripting language. The relative paths of the modules relative to the library's SOURCE_DIRECTORY property are preserved. This is important for the most widely used scripting languages such as Python, Perl, or MATLAB, where the file path relative to the package root directory defines the package namespace.

A custom CMake build target with the following properties is added by this function to the build system. These properties are used by basis_build_script_library() to generate a build script written in CMake code which is executed by a custom CMake command. Before the invokation of basis_build_script_library(), the target properties can be modified using basis_set_target_properties().

Note
Custom BASIS build targets are finalized by BASIS using basis_project_end(), i.e., the end of the root CMake configuration file of the (sub-)project.
Properties on script library targets
BASIS_TYPE Read-only property with value "SCRIPT_LIBRARY" for script library targets.
BASIS_UTILITIES Whether the BASIS utilities are used by any module of this library. For the supported scripting languages for which BASIS utilities are implemented, BASIS will in most cases automatically detect whether these utilities are used by a module or not. Otherwise, set this property manually or use either the USE_BASIS_UTILITIES or the NO_BASIS_UTILITIES option when adding the library target. (default: auto-detected or UNKNOWN)
BINARY_DIRECTORY Build tree directory of this target. (default: CMAKE_CURRENT_BINARY_DIR)
COMPILE Whether to compile the library, respectively, it's modules if the programming language allows such pre-compilation as in case of Python, for example. If TRUE, only the compiled files are installed. (default: BASIS_COMPILE_SCRIPTS)
SCRIPT_DEFINITIONS CMake code which is evaluated after the inclusion of the default script configuration files. This code can be used to set the replacement text of the CMake variables ("@VAR@" patterns) used in the source files. See Build System Standard for details. (default: "")
SCRIPT_DEFINITIONS_FILE CMake script file with compile definitions, also referred to as script configuration file. The named files are included after the default BASIS script configuration and before the SCRIPT_DEFINITIONS code is being evaluated. (default: BINARY_CONFIG_DIR/ScriptConfig.cmake)
EXPORT Whether to export this build target in which case an import library target is added to the custom exports file with the path to the built/installed modules set as IMPORT_LOCATION. (default: TRUE)
LANGUAGE Read-only property of programming language of modules in uppercase letters. (default: see LANGUAGE argument)
LIBRARY_COMPONENT Name of component as part of which this library is installed if LIBRARY_INSTALL_DIRECTORY is not set to "none". (default: see COMPONENT argument)
LIBRARY_INSTALL_DIRECTORY Installation directory of library configured for use in installation tree relative to CMAKE_INSTALL_PREFIX. Set to "none" (case-insensitive) to skip the addition of an installation rule. (default: INSTALL_<LANGUAGE>_LIBRARY_DIR if defined or INSTALL_LIBRARY_DIR otherwise)
LIBRARY_OUTPUT_DIRECTORY Output directory of library configured for use within the build tree. (default: BINARY_<LANGUAGE>_LIBRARY_DIR if defined or BINARY_LIBRARY_DIR otherwise)
LINK_DEPENDS Paths or target names of script modules and libraries used by this script. For each listed build target, a dependency is added between this library target and the named build targets. Use basis_target_link_libraries() to add additional link dependencies. Further note that if this library is a link dependency of an executable script added by basis_add_executable() (i.e., basis_add_script() actually), the link dependencies of this library are inherited by the executable script. (default: BASIS utilities module if used or empty list otherwise)
PREFIX Common module prefix. The given directory path is appended to both LIBRAR_OUTPUT_DIRECTORY and LIBRARY_INSTALL_DIRECTORY and can, for example, be used to install modules of a Python package as part of another Python package, where LIBRARY_OUTPUT_DIRECTORY or LIBRARY_INSTALL_DIRECTORY, respectively, is the directory of the main package which is added to the PYTHONPATH. Possibly missing init.py files in case of Python are generated by the _initpy target which is automatically added by BASIS in that case and further added to the dependencies of this library target. (default: PROJECT_NAMESPACE_PYTHON if LANGUAGE is PYTHON with periods (.) replaced by slashes (/), PROJECT_NAMESPACE_PERL if LANGUAGE is PERL with :: replaced by slashes (/), and "" otherwise)
SOURCE_DIRECTORY Source directory of this target. This directory is in particular used to convert the paths of the given source files to relative paths. The built modules within the build and installation tree will have the same relative path (relative to the LIBRARY_OUTPUT_DIRECTORY or LIBRARY_INSTALL_DIRECTORY, respectively). (default: CMAKE_CURRENT_SOURCE_DIR)
SOURCES Read-only property which lists the source files of this library. Note that the first element in this list actually names a directory in the build, the one where the build script for this target is located instead of a source file and thus should be ignored.
Attention
Properties documented as read-only must not be modified.
Parameters
[in]TARGET_NAMEName of build target.
[in]ARGNThe remaining arguments are parsed and the following arguments extracted. All unparsed arguments are treated as the module files of the script library.
COMPONENT name Name of installation component as part of which this library is being installed if the LIBRARY_INSTALL_DIRECTORY property is not "none". (default: BASIS_LIBRARY_COMPONENT)
DESTINATION dir Installation directory for library relative to CMAKE_INSTALL_PREFIX. If an absolute path is given as argument, it is made relative to the configured installation prefix. (default: INSTALL_LIBRARY_DIR)
LANGUAGE lang Programming language in which modules are written (case-insensitive). If not specified, the programming language is derived from the file name extensions of the source files and the shebang directive on the first line of each module if any. If the programming language could not be detected automatically, the LANGUAGE property is set to UNKNOWN. Note that for script library targets, the library may still be built correctly even if the scripting language was not recognized. The automatic detection whether the BASIS utilities are used and required will fail, however. In this case, specify the programming language using this option. (default: auto-detected or UNKNOWN)
[NO]EXPORT Whether to export this target. (default: TRUE)
NO_BASIS_UTILITIES Specify that the BASIS utilities are not used by this library. If the programming language of the modules is known and BASIS utilities are available for this language, BASIS will in most cases automatically detect whether these utilities are used by any module of this library. Use this option to skip this check in the case that no module makes use of the BASIS utilities.
USE_BASIS_UTILITIES Specify that the BASIS utilities are used and thus required by this library. If the programming language of the modules is known and BASIS utilities are available for this language, BASIS will in most cases automatically detect whether these utilities are used by any module of this library. Use this option to skip this check when it is already known that no module makes use of the BASIS utilities. Note that an error is raised if this option is given, but no BASIS utilities are available for the programming language of this script or if the programming language is unknown, respectively, not detected correctly. In this case, consider the use of the LANGUAGE argument.
FINAL Finalize custom targets immediately. Any following target property changes will have no effect. When this option is used, the custom target which executes the custom build command is added in the current working directory. Otherwise it will be added in the top-level source directory of the project. Which with the Visual Studio generators adds the corresponding Visual Studio Project files directly to the top-level build directory. This can be avoided using this option or calling basis_finalize_targets() at the end of each CMakeLists.txt file.
Returns
Adds a custom CMake target with the documented properties. The actual custom command to build the library is added by basis_build_script_library().
See also
basis_add_library()

§ basis_add_tests_of_default_options()

function basis_add_tests_of_default_options ( in  TARGET_NAME)

Add tests of default options for given executable.

Default options:
–helpshort Short help. The output has to match the regular expression "[Uu]sage:\n\s*\<executable name\>", where <executable name> is the name of the tested executable.
–help, -h Help screen. Simply tests if the option is accepted.
–version Version information. Output has to include the project version string.
–verbose, -v Increase verbosity of output messages. Simply tests if the option is accepted.
Parameters
[in]TARGET_NAMEName of executable or script target.
Returns
Adds tests for the default options of the specified executable.

§ basis_add_uninstall()

function basis_add_uninstall ( )

Add uninstall target.

Returns
Adds the custom target uninstall and code to cmake_install.cmake to install an uninstaller.

§ basis_add_utilities_library()

macro basis_add_utilities_library ( out  UID,
in  LANGUAGE 
)

Add build target for BASIS utilities library.

This function is called by basis_target_link_libraries() in order to add the "basis" build target for the project-specific BASIS utilities for a given source code language. If the target was added before, it is only used to get the target UID of this build target so the executable or library can be linked to it.

Parameters
[out]UIDUID of added build target.
[in]LANGUAGEProgramming language of utilities.
Returns
Nothing.

§ basis_append_to_each()

function basis_append_to_each ( in  OUTPUT_LIST,
in  INPUT_LIST,
in  ITEM_TO_APPEND 
)

basis_append_to_each takes an input list and appends a single element to each item in that list and appends it to the output list. For example, this is useful for adding relative paths to the end of a list of paths.

Parameters
OUTPUT_LISTName of list that will be filled with appended names.
INPUT_LISTName of list that contains items to have text appended.
ITEM_TO_APPENDtext to append to each item in the input list.
Returns
Nothing.

§ basis_build_mcc_target()

function basis_build_mcc_target ( in  TARGET_UID)

Add custom command for build of MATLAB Compiler target.

This function is called by basis_finalize_targets() which in turn is called by basis_project_end(), i.e., the end of the root CMake configuration file of the (sub-)project.

Parameters
[in]TARGET_UIDName/UID of custom target added by basis_add_mcc_target().
See also
basis_add_mcc_target()
Returns
Nothing.

§ basis_build_mex_file()

function basis_build_mex_file ( in  TARGET_UID)

Add custom command for build of MEX-file.

This function is called by basis_finalize_targets() which in turn is called by basis_project_end(), i.e., the end of the root CMake configuration file of the (sub-)project.

Parameters
[in]TARGET_UIDName/UID of custom target added by basis_add_mex_file().
See also
basis_add_mex_file()
Returns
Nothing.

§ basis_build_script()

function basis_build_script ( in  TARGET_UID)

Add custom command for build of single script.

This function is called by basis_finalize_targets() which in turn is called by basis_project_end(), i.e., the end of the root CMake configuration file of the (sub-)project.

Parameters
[in]TARGET_UIDName/UID of custom target added by basis_add_script().
See also
basis_add_script()
Returns
Nothing.

§ basis_build_script_library()

function basis_build_script_library ( in  TARGET_UID)

Add custom command for build of script library.

This function is called by basis_finalize_targets() which in turn is called by basis_project_end(), i.e., the end of the root CMake configuration file of the (sub-)project.

Parameters
[in]TARGET_UIDName/UID of custom target added by basis_add_script_library().
See also
basis_add_script_library()
Returns
Nothing.

§ basis_buildtree_asserts()

function basis_buildtree_asserts ( in  ARGN)

Ensure certain requirements on build tree.

Requirements:

  • Root of build tree must not be root of source tree.
Parameters
[in]ARGNNot used.
Returns
Nothing.

§ basis_check_if_module_depends_on_package()

function basis_check_if_module_depends_on_package ( out  result,
in  module,
in  package 
)

Check if named project module depends on the specified package.

Parameters
[out]resultName of boolean return variable.
[in]moduleName of project module.
[in]packageName of (external) package.
Returns
Sets result variable to either TRUE or FALSE.

§ basis_check_if_package_is_needed_by_modules()

function basis_check_if_package_is_needed_by_modules ( out  result,
in  package,
in  ARGN 
)

Check if any of the named/enabled modules depends on the specified package.

Parameters
[out]resultName of boolean return variable.
[in]packageName of (external) package.
[in]ARGNNames of project modules. If none specified, the list of enabled modules is used instead.
Returns
Sets result variable to either TRUE or FALSE.

§ basis_check_target_name()

function basis_check_target_name ( in  TARGET_NAME)

Checks whether a given name is a valid target name.

Displays fatal error message when target name is invalid.

Parameters
[in]TARGET_NAMEDesired target name.
Returns
Nothing.

§ basis_check_test_name()

function basis_check_test_name ( in  TEST_NAME)

Checks whether a given name is a valid test name.

Displays fatal error message when test name is invalid.

Parameters
[in]TEST_NAMEDesired test name.
Returns
Nothing.

§ basis_compare_lists()

macro basis_compare_lists ( out  RESULT,
in  LIST1,
in  LIST2 
)

Compare two lists.

Parameters
[out]RESULTResult of comparison.
[in]LIST1Name of variable holding the first list.
[in]LIST2Name of varaible holding the second list.
Return values
0The two lists are not identical.
1Both lists have identical elements (not necessarily in the same order).
Returns
Nothing.

§ basis_compile_python_modules_for_jython()

macro basis_compile_python_modules_for_jython ( out  FLAG)

Whether to compile Python modules for Jython interpreter.

This macro returns a boolean value stating whether Python modules shall also be compiled for use by Jython interpreter if BASIS_COMPILE_SCRIPTS is ON.

Parameters
[out]FLAGSet to either TRUE or FALSE depending on whether Python modules shall be compiled using Jython or not.
Returns
Nothing.

§ basis_configure_public_headers()

function basis_configure_public_headers ( )

Configure public header files.

Returns
Nothing.

§ basis_configure_root_documentation_files()

macro basis_configure_root_documentation_files ( )

Configure root documentation files.

The root documentation files are located in the top-level directory of the project's source tree. These are, in particular, the

  • AUTHORS.txt or AUTHORS.md file with information on the authors of the software,
  • COPYING.txt or COPYING.md file with copyright and licensing information,
  • README.txt or README.md file,
  • INSTALL.txt or INSTALL.md file with build and installation instructions,
  • WELCOME.txt or WELCOME.md file with text used as welcome text of the installer. where the top-level project requires all of these files except of the WELCOME.txt or WELCOME.md file which defaults to the readme file. Modules of a project usually do not include any of these files. Otherwise, the content of the module's documentation file is appended to the corresponding file of the top-level project.
    Returns
    Nothing.

§ basis_configure_script()

function basis_configure_script ( in  INPUT,
in  OUTPUT,
in  ARGN 
)

Configure and optionally compile script file.

This function is used to configure script files during the build. It is called by the build script generated by basis_add_script_target() for each script target. It is also used to configure the modules of the packages implemented in supported scripting languages which are located in the PROJECT_LIBRARY_DIR of the source tree.

In case of executable scripts, this function automatically prepends the module search paths such that the modules of this software package are found (and preferred in case of potential name conflicts with other packages). Moreover, it adds (or replaces) the shebang directive on Unix such that the configured interpreter version is used. On Windows, it converts the executable script into a Windows Command instead which executes the proper interpreter with the code section of the input script.

Parameters
[in]INPUTInput script file.
[in]OUTPUTConfigured output script file.
[in]ARGNOptional arguments:
COMPILE Whether to compile module scripts if suitable, i.e., an intermediate format exists for the specific scripting language. For example, Python modules can be compiled. CONFIGURATION name Name of build configuration.
COPYONLY Whether to only copy the script file without replacing CMake variables within the file. This option is passed on to CMake's configure_file() command used to configure the script file. By default, the option @ONLY is used instead.
EXECUTABLE Specifies that the given script file is an executable script and not a module script. Otherwise, if this option is not given and the output file name contains a file name extension, the given script file is configured as module script. A script file with an output file name that has no extension, is always considered to be an executable.
DIRECTORY dir Build tree directory of configured script. By default, the directory of the output script file is used to set the DIR variable used to make absolute file paths relative to the configured build tree script file in the script configuration file (see basis_set_script_path()).
DESTINATION dir Installation directory for configured script. If this option is given, the BUILD_INSTALL_SCRIPT variable is set to TRUE before including any specified script configuration files (see CONFIG_FILE option). Moreover, the DIR variable is set to the specified directory. Otherwise, if this option is omitted, the BUILD_INSTALL_SCRIPT variable is set to FALSE instead and DIR is set to the directory of the configured OUTPUT file. Note that the BUILD_INSTALL_SCRIPT and DIR variables are in particular used by basis_set_script_path() to convert the given paths to paths relative to the location of the configured/installed script.
CACHE_FILE file1 [file2...] List of CMake files with dump of variables which should be included before configuring the script. The cache files can be generated using the basis_dump_variables() function.
CONFIG_FILE file1 [file2...] List of script configuration files to include before the configuration of the script. See also the documentation of the DESTINATION option.
LINK_DEPENDS dep1 [dep2...] List of "link" dependencies, i.e., modules and script/module libraries required by this script. For executable scripts, the paths to these modules/packages is added to the module search path. If the prefix "relative " is given before a file path, it is made relative to the output/installation directory of the script file. All given input paths must be absolute, however, as the relative location depends on whether the script will be installed, i.e., the DESTINATION is specified, or not.
Returns
Nothing.

§ basis_configure_script_libraries()

function basis_configure_script_libraries ( )

Add library targets for the public modules in PROJECT_LIBRARY_DIR.

This function configures ("builds") the library modules in the PROJECT_LIBRARY_DIR that are written in a scripting language such as Python or Perl. The names of the added library targets can be modified using the BASIS_<LANG>_LIBRARY_TARGET variables, which are set to their default values in the BasisSettings.cmake file.

Returns
Nothing.

§ basis_configure_sources()

function basis_configure_sources ( out  LIST_NAME,
in  ARGN 
)

Configure .in source files.

This function configures each source file in the given argument list with a .in file name suffix and stores the configured file in the build tree with the same relative directory as the template source file itself. The first argument names the CMake variable of the list of configured source files where each list item is the absolute file path of the corresponding (configured) source file.

Parameters
[out]LIST_NAMEName of output list.
[in]ARGNThese arguments are parsed and the following options recognized. All remaining arguments are considered to be source file paths.
BINARY_DIRECTORY Explicitly specify directory in build tree where configured source files should be written to.
KEEP_DOT_IN_SUFFIX By default, after a source file with the .in extension has been configured, the .in suffix is removed from the file name. This can be omitted by giving this option.
Returns
Nothing.

§ basis_configure_utilities()

function basis_configure_utilities ( )

Configure BASIS utilities.

This function configures the following source files which can be used within the source code of the project. If the BASIS utilities for a specific language are not used by any of the project's build targets, no target for the build of these utilities is added, unless the BUILD_BASIS_UTILITIES_FOR_<LANGUAGE> option is set to ON. A reason for forcing the build of the BASIS utilities is that the libraries should be used by other projects which may want to make use of the BASIS Utilities to get access to the project attributes.

basis.h Header file declaring the BASIS utilities for C++.
basis.cxx Definitions of the constants and functions declared in basis.h.
basis.py Module defining the BASIS utilities for Python.
Basis.pm Module defining the BASIS utilities for Perl.
basis.sh Module defining the BASIS utilities for Bash.
Note
Dummy versions of the C++ source files have been written by the function basis_add_utilities_library() beforehand. This is necessary because CMake's add_executable() and add_library() commands raise an error if any of the specified source files does not exist.
Returns
Nothing.

§ basis_create_addpaths_mfile()

function basis_create_addpaths_mfile ( )

This function writes a MATLAB M-file with addpath() statements.

This function writes an MATLAB M-file into the top directory of the build tree which contains an addpath() statement for each directory that was added via basis_include_directories().

Returns
Creates file add_<project>_paths.m in the current binary directory.

§ basis_disable_testing_if_no_tests()

function basis_disable_testing_if_no_tests ( )

Disable testing if project does not implement any tests.

This function checks if there are test/ subdirectories in the project and disables and hides the BUILD_TESTING option if none are found.

Returns
Nothing.

§ basis_dump_variables()

function basis_dump_variables ( in  RESULT_FILE)

Output current CMake variables to file.

Returns
Nothing.

§ basis_exists_target()

macro basis_exists_target ( out  RESULT_VARIABLE,
in  TARGET_NAME 
)

Whether a given target exists.

This function should be used instead of the if(TARGET) command of CMake because target names are mapped by BASIS to target UIDs.

Parameters
[out]RESULT_VARIABLEBoolean result variable.
[in]TARGET_NAMEName which to check whether it is a target.
See also
basis_make_target_uid()
basis_get_target_uid()
Returns
Nothing.

§ basis_export_build_properties()

function basis_export_build_properties ( in  CODE)

Add code to set properties of imported targets for build tree.

Returns
Nothing.

§ basis_export_footer()

function basis_export_footer ( in  CODE)

Add footer of exports file.

Returns
Nothing.

§ basis_export_header()

function basis_export_header ( in  CODE)

Generate header of exports file.

Returns
Nothing.

§ basis_export_import_targets()

function basis_export_import_targets ( in  CODE)

Add code to add import targets.

Returns
Nothing.

§ basis_export_install_properties()

function basis_export_install_properties ( in  CODE)

Add code to set properties of imported targets for installation.

Returns
Nothing.

§ basis_export_prefix()

function basis_export_prefix ( in  CODE)

Add code to compute prefix relative to INSTALL_CONFIG_DIR.

Returns
Nothing.

§ basis_export_targets()

function basis_export_targets ( )

Export all targets added by basis_add_* commands.

Returns
Nothing.

§ basis_finalize_targets()

function basis_finalize_targets ( in  ARGN)

Finalize custom targets by adding the missing build commands.

This function is called by basis_project_end() in order to finalize the addition of the custom build targets such as, for example, build targets for the build of executable scripts, Python packages, MATLAB Compiler executables and shared libraries, and MEX-files. It can, however, also be called explicitly either at the end of each CMakeLists.txt file that adds new build targets or with the name of the target(s) to finalize in some of the CMakeLists.txt files. This is to ensure that the custom target which executes the actual build command is added in the same directory as the original custom target with the respective target properties.

Parameters
[in]ARGNList of targets to finalize. If none specified, all custom targets that were added before and are not finalized already will be finalized using the current binary directory.
Returns
Generates the CMake build scripts and adds custom build commands and corresponding targets for the execution of these scripts.
See also
basis_build_script()
basis_build_script_library()
basis_build_mcc_target()
basis_build_mex_file()

§ basis_find_logo()

function basis_find_logo ( in  OUTPUT_VARIABLE,
in  SPECIFIED_LOGO,
in  DEFAULT_NAME 
)

Find standard project logo files with standardized PROJECT_${LOGO_TYPE}_LOGO variable names This is an internal function not designed for general use.

Parameters
OUTPUT_VARIABLEthe name of the variable that will contain the final
SPECIFIED_LOGOthe value that is already set for the logo
DEFAULT_NAMEthe default filename of the logo
Returns
Nothing.

§ basis_find_packages()

macro basis_find_packages ( )

Find packages this project depends on.

Returns
Nothing.

§ basis_get_bash_version()

function basis_get_bash_version ( out  ARGV1)

Get version of Bash interpreter.

Parameters
[out]ARGV1If given, the named variable is set to the version string of the Bash interpreter. Otherwise, the variables BASH_VERSION_STRING, BASH_VERSION_MAJOR, BASH_VERSION_MINOR, and BASH_VERSION_PATCH are set in the scope of the caller.
Returns
Nothing.

§ basis_get_build_timestamp()

function basis_get_build_timestamp ( in  TIMESTAMP)

Get build time stamp.

The build time stamp is used as an alternative to the version and revision information in PROJECT_RELEASE if version is invalid, i.e., set to 0.0.0 as is the case for development branches, and now revision from a revision control system is available.

Returns
Nothing.

§ basis_get_compiled_file()

function basis_get_compiled_file ( out  CFILE,
in  SOURCE,
in  ARGV2 
)

Get file name of compiled script.

Parameters
[out]CFILEFile path of compiled script file.
[in]SOURCEScript source file.
[in]ARGV2Language of script file. If not specified, the language is derived from the file name extension and shebang of the script source file.
Returns
Nothing.

§ basis_get_compiled_jython_file_of_python_module()

macro basis_get_compiled_jython_file_of_python_module ( out  CFILE,
in  MODULE 
)

Get file path of Jython file compiled from the given Python module.

Python modules are also compiled using Jython. This macro returns the file path of the compiled Jython file in the build tree which corresponds to the specified Python module.

Parameters
[out]CFILEPath of corresponding compiled Jython file.
[in]MODULEPath of input Python module in build tree.
Returns
Nothing.

§ basis_get_full_matlab_version()

function basis_get_full_matlab_version ( out  VERSION)

Determine version of MATLAB installation.

Parameters
[out]VERSIONValue returned by the "version" command of MATLAB or an empty string if execution of MATLAB failed.
Returns
Sets the variable named by VERSION to the full MATLAB version.

§ basis_get_fully_qualified_target_uid()

function basis_get_fully_qualified_target_uid ( out  TARGET_UID,
in  TARGET_NAME 
)

Get fully-qualified target name.

This function always returns a fully-qualified target UID, no matter if the option BASIS_USE_TARGET_UIDS or BASIS_USE_FULLY_QUALIFIED_UIDS is OFF. Note that if BASIS_USE_FULLY_QUALIFIED_UIDS is ON, the returned target UID may not be the actual name of a CMake target.

Parameters
[out]TARGET_UIDFully-qualified target UID.
[in]TARGET_NAMETarget name used as argument to BASIS CMake functions.
See also
basis_get_target_uid()
Returns
Nothing.

§ basis_get_fully_qualified_test_uid()

function basis_get_fully_qualified_test_uid ( out  TEST_UID,
in  TEST_NAME 
)

Get "global" test name, i.e., actual CTest test name.

This function always returns a fully-qualified test UID, no matter if the option BASIS_USE_FULLY_QUALIFIED_UIDS is OFF. Note that if this option is ON, the returned test UID may not be the actual name of a CMake test.

If BASIS_USE_TARGET_UIDS is set to OFF, this operation always just sets the TEST_UID to the given TEST_NAME.

Parameters
[out]TEST_UIDFully-qualified test UID.
[in]TEST_NAMETest name used as argument to BASIS CMake functions.
See also
basis_get_test_uid()
Returns
Nothing.
Nothing.

§ basis_get_jython_version()

function basis_get_jython_version ( out  ARGV1)

Get version of Jython interpreter.

Parameters
[out]ARGV1If given, the named variable is set to the version string of the Jython interpreter. Otherwise, the variables JYTHON_VERSION_STRING, JYTHON_VERSION_MAJOR, JYTHON_VERSION_MINOR, and JYTHON_VERSION_PATCH are set in the scope of the caller.
Returns
Nothing.

§ basis_get_matlab_release()

function basis_get_matlab_release ( out  ARGV1)

Get release version of MATLAB installation.

Parameters
[out]ARGV1If given, the named variable is set to the release string of the MATLAB installation, e.g., "R2009b". Otherwise, the variable MATLAB_RELEASE is set in the scope of the caller.
Returns
Nothing.

§ basis_get_matlab_version()

function basis_get_matlab_version ( out  ARGV1)

Get version of MATLAB installation.

Parameters
[out]ARGV1If given, the named variable is set to the version string ("<major>.<minor>.<patch>") of the MATLAB installation. Otherwise, the variables MATLAB_VERSION_STRING, MATLAB_VERSION_MAJOR, MATLAB_VERSION_MINOR, MATLAB_VERSION_PATCH, and MATLAB_RELEASE are set in the scope of the caller.
Returns
Nothing.

§ basis_get_module_info()

function basis_get_module_info ( in  MODULE_NAME,
in  F,
in  ARGN 
)

§ basis_get_perl_version()

function basis_get_perl_version ( out  ARGV1)

Get version of Perl interpreter.

Parameters
[out]ARGV1If given, the named variable is set to the version string of the Perl interpreter. Otherwise, the variables PERL_VERSION_STRING, PERL_VERSION_MAJOR, PERL_VERSION_MINOR, and PERL_VERSION_PATCH are set in the scope of the caller.
Returns
Nothing.

§ basis_get_project_property()

function basis_get_project_property ( out  VARIABLE,
in  ARGN 
)

Get project-global property value.

Example:

basis_get_project_property(TARGETS ${PROJECT_NAME})
basis_get_project_property(TARGETS ${PROJECT_NAME} TARGETS)
basis_get_project_property(TARGETS PROPERTY TARGETS)
Parameters
[out]VARIABLEName of result variable.
[in]ARGNSee the example uses. The optional second argument is either the name of the project similar to CMake's get_target_property() command or the keyword PROPERTY followed by the name of the property.
Returns
Nothing.

§ basis_get_project_uses_utilities()

function basis_get_project_uses_utilities ( in  RETVAL)

Determine whether this project uses any of the BASIS Utilities.

Returns
Nothing.

§ basis_get_property()

macro basis_get_property ( in  ARGN)

§ basis_get_python_version()

function basis_get_python_version ( out  ARGV1)

Get version of Python interpreter.

Parameters
[out]ARGV1If given, the named variable is set to the version string of the Python interpreter. Otherwise, the variables PYTHON_VERSION_STRING, PYTHON_VERSION_MAJOR, PYTHON_VERSION_MINOR, and PYTHON_VERSION_PATCH are set in the scope of the caller.
Returns
Nothing.

§ basis_get_revision()

function basis_get_revision ( in  URL,
out  REV 
)

Get revision of file or directory.

Parameters
[in]URLAbsolute path to directory or single file.
[out]REVRevision number when directory / repository or file was last modified, "0" is returned when no known revision control system is used or revision command not found.
Returns
Revision when directory of file was last modified.

§ basis_get_soname()

function basis_get_soname ( out  SONAME,
in  OBJFILE 
)

Get soname of object file.

This function extracts the soname from object files in the ELF format on systems where the objdump command is available. On all other systems, an empty string is returned.

Parameters
[out]SONAMEThe soname of the object file.
[in]OBJFILEObject file in ELF format.
Returns
Nothing.

§ basis_get_source_language()

function basis_get_source_language ( out  LANGUAGE,
in  ARGN 
)

Detect programming language of given source code files.

This function determines the programming language in which the given source code files are written. If no common programming language could be determined, "AMBIGUOUS" is returned. If none of the following programming languages could be determined, "UNKNOWN" is returned: CXX (i.e., C++), JAVA, MATLAB, PYTHON, JYTHON, PERL, BASH, BATCH.

Parameters
[out]LANGUAGEDetected programming language.
[in]ARGNList of source code files.
Returns
Nothing.

§ basis_get_source_target_name()

function basis_get_source_target_name ( out  TARGET_NAME,
in  SOURCE_FILE,
in  ARGN 
)

Derive target name from source file name.

Parameters
[out]TARGET_NAMETarget name.
[in]SOURCE_FILESource file.
[in]ARGNThird argument to get_filename_component(). If not specified, the given path is only sanitized.
Returns
Target name derived from SOURCE_FILE.

§ basis_get_target_link_libraries()

function basis_get_target_link_libraries ( out  LINK_DEPENDS,
in  TARGET_NAME 
)

Get link libraries/dependencies of (imported) target.

This function recursively adds the dependencies of the dependencies as well and returns them together with the list of the direct link dependencies. Moreover, for script targets, if any of the dependencies uses the BASIS utilities for the given language (BASIS_UTILITIES property), the corresponding utilities library is added to the list of dependencies. Note that therefore the BASIS utilities targets have to be added already, which is only the case during the finalization of script targets.

Parameters
[out]LINK_DEPENDSList of all link dependencies. In case of scripts, the dependencies are the required modules or paths to required packages, respectively.
[in]TARGET_NAMEName of the target.
Returns
Nothing.

§ basis_get_target_location()

function basis_get_target_location ( out  VAR,
in  TARGET_NAME,
in  PART 
)

Get location of build target output file(s).

This convenience function can be used to get the full path of the output file(s) generated by a given build target. It is similar to the read-only LOCATION property of CMake targets and should be used instead of reading this porperty. In case of scripted libraries, this function returns the path of the root directory of the library that has to be added to the module search path.

Note
If the target is a binary built from C++ source files and the CMake generator is an IDE such as Visual Studio or Xcode, the absolute directory of the target location ends with the generator expression "/$<${BASIS_GE_CONFIG}>" which is to be substituted by the respective build configuration.
Parameters
[out]VARPath of build target output file.
[in]TARGET_NAMEName of build target.
[in]PARTWhich file name component of the LOCATION property to return. See get_filename_component(). If POST_INSTALL_RELATIVE is given as argument, VAR is set to the path of the installed file relative to the installation prefix. Similarly, POST_INSTALL sets VAR to the absolute path of the installed file post installation.
Returns
Path of output file similar to LOCATION property of CMake targets.
See also
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:LOCATION

§ basis_get_target_name()

function basis_get_target_name ( out  TARGET_NAME,
in  TARGET_UID 
)

Get "local" target name, i.e., BASIS target name without check of UID.

If BASIS_USE_TARGET_UIDS is set to OFF, this operation always just sets the TARGET_NAME to the given TARGET_UID.

Parameters
[out]TARGET_NAMETarget name used as argument to BASIS functions.
[in]TARGET_UID"Global" target name, i.e., actual CMake target name.
Returns
Sets TARGET_NAME to the name of the build target with UID TARGET_UID.
See also
basis_get_target_name(), basis_get_target_uid() Get "local" target name, i.e., BASIS target name.

If BASIS_USE_TARGET_UIDS is set to OFF, this operation always just sets the TARGET_NAME to the given TARGET_UID.

Parameters
[out]TARGET_NAMETarget name used as argument to BASIS functions.
[in]TARGET_UID"Global" target name, i.e., actual CMake target name.
Returns
Sets TARGET_NAME to the name of the build target with UID TARGET_UID.
See also
basis_get_target_uid()

§ basis_get_target_namespace()

function basis_get_target_namespace ( out  TARGET_NS,
in  TARGET_UID 
)

Get namespace of build target without check of UID.

If BASIS_USE_TARGET_UIDS is set to OFF, this operation always just sets the TARGET_NS to an empty string.

Parameters
[out]TARGET_NSNamespace part of target UID.
[in]TARGET_UIDTarget UID. Get namespace of build target.

If BASIS_USE_TARGET_UIDS is set to OFF, this operation always just sets the TARGET_NS to an empty string.

Parameters
[out]TARGET_NSNamespace part of target UID.
[in]TARGET_UIDTarget UID/name.
Returns
Nothing.
Nothing.

§ basis_get_target_type()

function basis_get_target_type ( out  TYPE,
in  TARGET_NAME 
)

Get type name of target.

Parameters
[out]TYPEThe target's type name or NOTFOUND.
[in]TARGET_NAMEThe name of the target.
Returns
Nothing.

§ basis_get_target_uid()

function basis_get_target_uid ( out  TARGET_UID,
in  TARGET_NAME 
)

Get "global" target name, i.e., actual CMake target name.

In order to ensure that CMake target names are unique across modules of a BASIS project, the target name given to the BASIS CMake functions is converted by basis_make_target_uid() into a so-called target UID which is used as actual CMake target name. This function can be used to get for a given target name or UID the closest match of a known target UID.

The individual parts of the target UID, i.e, package name, module name, and target name are separated by a dot (.). If BASIS_USE_FULLY_QUALIFIED_UIDS is set to OFF, the common part of all target UIDs is removed by this function from the target UID. When the target is exported, however, this common part will be prefixed again. This is done by the basis_export_targets() function.

Note that names of imported targets are not prefixed in any case.

The counterpart basis_get_target_name() can be used to convert the target UID back to the target name without namespace prefix.

If BASIS_USE_TARGET_UIDS is set to OFF, this operation always just sets the TARGET_UID to the given TARGET_NAME.

Note
At the moment, BASIS does not support modules which themselves have modules again. This would require a more nested namespace hierarchy and makes things unnecessarily complicated.
Parameters
[out]TARGET_UID"Global" target name, i.e., actual CMake target name.
[in]TARGET_NAMETarget name used as argument to BASIS CMake functions.
Returns
Sets TARGET_UID to the UID of the build target TARGET_NAME.
See also
basis_get_target_name()

§ basis_get_test_name()

function basis_get_test_name ( out  TEST_NAME,
in  TEST_UID 
)

Get "local" test name, i.e., BASIS test name.

If BASIS_USE_TARGET_UIDS is set to OFF, this operation always just sets the TEST_NAME to the given TEST_UID.

Parameters
[out]TEST_NAMETest name used as argument to BASIS functions.
[in]TEST_UID"Global" test name, i.e., actual CTest test name.
Returns
Sets TEST_NAME to the name of the test with UID TEST_UID.
See also
basis_get_test_uid()

§ basis_get_test_namespace()

function basis_get_test_namespace ( out  TEST_NS,
in  TEST_UID 
)

Get namespace of test.

If BASIS_USE_TARGET_UIDS is set to OFF, this operation always just sets the TEST_NS to an empty string.

Parameters
[out]TEST_NSNamespace part of test UID. If TEST_UID is no UID, i.e., does not contain a namespace part, the namespace of this project is returned.
[in]TEST_UIDTest UID/name.
Returns
Nothing.
Nothing.

§ basis_get_test_uid()

function basis_get_test_uid ( out  TEST_UID,
in  TEST_NAME 
)

Get "global" test name, i.e., actual CTest test name.

In order to ensure that CTest test names are unique across BASIS projects, the test name used by a developer of a BASIS project is converted by this function into another test name which is used as actual CTest test name.

The function basis_get_test_name() can be used to convert the unique test name, the test UID, back to the original test name passed to this function.

If BASIS_USE_TARGET_UIDS is set to OFF, this operation always just sets the TEST_UID to the given TEST_NAME.

Parameters
[out]TEST_UID"Global" test name, i.e., actual CTest test name.
[in]TEST_NAMETest name used as argument to BASIS CMake functions.
Returns
Sets TEST_UID to the UID of the test TEST_NAME.
See also
basis_get_test_name()

§ basis_git_get_revision()

function basis_git_get_revision ( in  URL,
out  REV,
in  ARGN 
)

Get HEAD commit SHA of file or directory.

Parameters
[in]URLAbsolute path to repository directory or single file.
[out]REVThe short commit SHA when URL was last modified. If URL is not under Git control or GIT_EXECUTABLE is invalid, "0" is returned.
[in]ARGNLength of commit SHA to return.
Returns
Sets REV either to the HEAD commit SHA of the repository at directory URL or the last commit which modified the file.

§ basis_initialize_settings()

macro basis_initialize_settings ( )

Initialize project settings.

Returns
Nothing.

§ basis_install_links()

function basis_install_links ( )

Adds installation rules to create default symbolic links.

This function creates for each main executable a symbolic link directly in the directory INSTALL_PREFIX/bin if INSTALL_SINFIX is TRUE and the software is installed on a Unix-like system, i.e., one which supports the creation of symbolic links.

Returns
Adds installation command for creation of symbolic links in the installation tree.

§ basis_install_public_headers()

macro basis_install_public_headers ( )

Add installation rules for public header files.

Returns
Nothing.

§ basis_install_template()

function basis_install_template ( in  TEMPLATE,
in  DESTINATION 
)

Add installation rule for project template.

Returns
Nothing.

§ basis_installtree_asserts()

function basis_installtree_asserts ( in  ARGN)

Ensure certain requirements on install tree.

Requirements:

  • Prefix must be an absolute path.
  • Install tree must be different from source and build tree.
Parameters
[in]ARGNNot used.
Returns
Nothing.

§ basis_is_cached()

macro basis_is_cached ( out  VAR,
in  ENTRY 
)

Determine if cache entry exists.

Parameters
[out]VARName of boolean result variable.
[in]ENTRYName of cache entry.
Returns
Nothing.

§ basis_is_git_repository()

function basis_is_git_repository ( in  FLAG,
in  DIR 
)

§ basis_join()

function basis_join ( in  VALUES,
in  DELIMITER,
out  OUTPUT 
)

Concatenates all list elements into a single delimited string.

Parameters
[in]VALUESInput list string.
[in]DELIMITERDelimiter glue used to separate list elements. Each element which contains the delimiter as substring is surrounded by double quotes (") in the output string.
[out]OUTPUTOutput string variable name.
set( letters "" "\;a" b c "d\;d" )
basis_join("${letters}" ":" output)
message("${output}") # :;a:b:c:d;d
Returns
Sets OUTPUT to the resulting string.
See also
basis_list_to_delimited_string

§ basis_library_prefix()

macro basis_library_prefix ( out  PREFIX,
in  LANGUAGE 
)

Get default subdirectory prefix of scripted library modules.

Parameters
[out]PREFIXName of variable which is set to the default library prefix, i.e., subdirectory relative to the library root directory as used for the PREFIX property of scripted module libraries (see basis_add_script_library()) or relative to the include directory in case of C++. Note that this prefix includes a trailing slash to indicate that the prefix is a subdirectory.
[in]LANGUAGEProgramming language (case-insenitive), e.g., CXX, Python, Matlab...
Returns
Nothing.

§ basis_list_to_delimited_string()

function basis_list_to_delimited_string ( out  STR,
in  DELIM,
in  ARGN 
)

Concatenates all list elements into a single delimited string.

Parameters
[out]STROutput string.
[in]DELIMDelimiter used to separate list elements. Each element which contains the delimiter as substring is surrounded by double quotes (") in the output string.
[in]ARGNInput list. If this list starts with the argument NOAUTOQUOTE, the automatic quoting of list elements which contain the delimiter is disabled.
Returns
Sets STR to the resulting string.
See also
basis_join
Todo:
consider replacing basis_list_to_delimited_string with basis_join

§ basis_list_to_regex()

macro basis_list_to_regex ( out  REGEX,
in  ARGN 
)

Convert list into regular expression.

This function is in particular used to convert a list of property names such as <CONFIG>_OUTPUT_NAME, e.g., the list BASIS_PROPERTIES_ON_TARGETS, into a regular expression which can be used in pattern matches.

Parameters
[out]REGEXName of variable for resulting regular expression.
[in]ARGNList of patterns which may contain placeholders in the form of "<this is a placeholder>". These are replaced by the regular expression "[^ ]+".
Returns
Nothing.

§ basis_list_to_string()

function basis_list_to_string ( out  STR,
in  ARGN 
)

Concatenates all list elements into a single string.

The list elements are concatenated without any delimiter in between. Use basis_list_to_delimited_string() to specify a delimiter such as a whitespace character or comma (,) as delimiter.

Parameters
[out]STROutput string.
[in]ARGNInput list.
Returns
Sets STR to the resulting string.
See also
basis_list_to_delimited_string()

§ basis_make_target_uid()

function basis_make_target_uid ( out  TARGET_UID,
in  TARGET_NAME 
)

Make target UID from given target name.

This function is intended for use by the basis_add_*() functions only.

If BASIS_USE_TARGET_UIDS is set to OFF, this operation always just sets the TARGET_UID to the given TARGET_NAME.

Parameters
[out]TARGET_UID"Global" target name, i.e., actual CMake target name.
[in]TARGET_NAMETarget name used as argument to BASIS CMake functions.
Returns
Sets TARGET_UID to the UID of the build target TARGET_NAME.
See also
basis_get_target_uid()

§ basis_make_test_uid()

function basis_make_test_uid ( out  TEST_UID,
in  TEST_NAME 
)

Make test UID from given test name.

This function is intended for use by the basis_add_test() only.

If BASIS_USE_TARGET_UIDS is set to OFF, this operation always just sets the TEST_UID to the given TEST_NAME.

Parameters
[out]TEST_UID"Global" test name, i.e., actual CTest test name.
[in]TEST_NAMETest name used as argument to BASIS CMake functions.
Returns
Sets TEST_UID to the UID of the test TEST_NAME.
See also
basis_get_test_uid()

§ basis_mexext()

function basis_mexext ( out  ARGN)

Determine extension of MEX-files for this architecture.

Parameters
[out]ARGNThe first argument ARGV0 is set to the extension of MEX-files (excluding '.'). If the CMake variable MEX_EXT is set, its value is returned. Otherwise, this function tries to determine it from the system information. If the extension could not be determined, an empty string is returned. If no argument is given, the extension is cached as the variable MEX_EXT.
Returns
Sets the variable named by the first argument to the platform-specific extension of MEX-files.

§ basis_module_enable()

macro basis_module_enable ( in  MODULE,
in  NEEDED_BY 
)
Returns
Nothing.

§ basis_normalize_name()

function basis_normalize_name ( out  OUT,
in  STR 
)

Convert string to lowercase only or mixed case.

Strings in all uppercase or all lowercase are converted to all lowercase letters because these are usually used for acronymns. All other strings are returned unmodified with the one exception that the first letter has to be uppercase for mixed case strings.

This function is in particular used to normalize the project name for use in installation directory paths and namespaces.

Parameters
[out]OUTString in CamelCase.
[in]STRString.
Returns
Nothing.

§ basis_process_generator_expressions()

function basis_process_generator_expressions ( out  ARGS,
in  ARGN 
)

Process generator expressions in arguments.

This command evaluates the $<TARGET_FILE:tgt> and related generator expressions also for custom targets such as scripts and MATLAB Compiler targets. For other generator expressions whose argument is a target name, this function replaces the target name by the target UID, i.e., the actual CMake target name such that the expression can be evaluated by CMake. The following generator expressions are directly evaluated by this function:

$<TARGET_FILE:tgt> Absolute file path of built target.
$<TARGET_FILE_POST_INSTALL:tgt> Absolute path of target file after installation using the current CMAKE_INSTALL_PREFIX.
$<TARGET_FILE_POST_INSTALL_RELATIVE:tgt> Path of target file after installation relative to CMAKE_INSTALL_PREFIX.

Additionally, the suffix _NAME or _DIR can be appended to the name of each of these generator expressions to get only the basename of the target file including the extension or the corresponding directory path, respectively.

Generator expressions are in particular supported by basis_add_test().

Parameters
[out]ARGSName of output list variable.
[in]ARGNList of arguments to process.
See also
basis_add_test()
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_test
Returns
Nothing.

§ basis_project_initialize()

macro basis_project_initialize ( )

Initialize project, calls CMake's project() command.

See also
basis_project(), basis_project_begin()
Returns
Sets the following non-cached CMake variables:
Return values
PROJECT_REVISIONRevision number of Subversion controlled source tree or 0 if the source tree is not under revision control.
PROJECT_RELEASEA string of project version and revision that can be used for the output of version information. The format of this string is either one of the following:
  • "v1.0 (r42)"
  • "v1.0.5 (r50)"
  • "v1.0" (if revision unknown)
  • "r42" (if version is 0.0.0)
  • "" (otherwise)

§ basis_project_modules()

macro basis_project_modules ( )

Initialize project modules.

Most parts of this macro were copied from the ITK4 project (http://www.vtk.org/Wiki/ITK_Release_4), in particular, the top-level CMakeLists.txt file. This file does not state any specific license, but the ITK package itself is released under the Apache License Version 2.0, January 2004 (http://www.apache.org/licenses/).

Returns
Nothing.

§ basis_register_package()

function basis_register_package ( )

Register installed package with CMake.

This function adds an entry to the CMake registry for packages with the path of the directory where the package configuration file is located in order to help CMake find the package.

The uninstaller whose template can be found in cmake_uninstaller.cmake.in is responsible for removing the registry entry again.

Returns
Nothing.

§ basis_remove_blank_line()

macro basis_remove_blank_line ( in  STRVAR)

Remove one blank line from top of string.

Returns
Nothing.

§ basis_sanitize_for_regex()

macro basis_sanitize_for_regex ( out  OUT,
in  STR 
)

Sanitize string variable for use in regular expression.

Note
This function may not work for all cases, but is used in particular to sanitize project names, target names, namespace identifiers,...

This takes all of the dollar signs, and other special characters and adds escape characters such as backslash as necessary.

Parameters
[out]OUTString that can be used in regular expression.
[in]STRString to sanitize.
Returns
Nothing.

§ basis_set_config_option()

macro basis_set_config_option ( out  VAR,
in  OPT 
)

Set value of variable to either 0 or 1 based on option value.

This function can be used to convert option values from TRUE/ON to 1 and FALSE/OFF to 0 such that they can be used to configure a config.h.in header.

Parameters
[out]VARName of configuration header variable.
[in]OPTValue of CMake option.
Returns
Nothing.

§ basis_set_flag()

macro basis_set_flag ( in  PREFIX,
out  FLAG,
in  DEFAULT 
)

Set flag given mutually exclusive ARGN_<FLAG> and ARGN_NO<FLAG> function arguments.

Parameters
[in]PREFIXPrefix of function arguments. Set to the first argument of the CMAKE_PARSE_ARGUMENTS() command.
[out]FLAGName of flag.
[in]DEFAULTDefault flag value if neither ARGN_<FLAG;gt; nor ARGN_NO<FLAG;gt; evaluates to true.
Returns
Nothing.

§ basis_set_if_empty()

macro basis_set_if_empty ( out  VAR,
in  ARGN 
)

Set value of variable only if variable is not set already.

Parameters
[out]VARName of variable.
[in]ARGNArguments to set() command excluding variable name.
Returns
Sets VAR if its value was not valid before.

§ basis_set_if_not_set()

macro basis_set_if_not_set ( out  VAR,
in  ARGN 
)

Set value of variable only if variable is not defined yet.

Parameters
[out]VARName of variable.
[in]ARGNArguments to set() command excluding variable name.
Returns
Sets VAR if it was not defined before.

§ basis_set_or_update_type()

macro basis_set_or_update_type ( in  VAR,
in  TYPE,
in  ARGN 
)

Set type of variable.

If the variable is cached, the type is updated, otherwise, a cache entry of the given type with the current value of the variable is added.

Parameters
[in]VARName of variable.
[in]TYPEDesired type of variable.
[in]ARGNOptional DOC string used if variable was not cached before.
Returns
Nothing.

§ basis_set_or_update_value()

macro basis_set_or_update_value ( in  VAR)

Set variable value.

If the variable is cached, this function will update the cache value, otherwise, it simply sets the CMake variable uncached to the given value(s).

Returns
Nothing.

§ basis_set_project_property()

function basis_set_project_property ( )

Set project-global property.

Set property associated with current project/module. The property is in fact just a cached variable whose name is prefixed by the project's name.

Returns
Nothing.

§ basis_set_property()

macro basis_set_property ( in  ARGN)

§ basis_set_target_install_rpath()

function basis_set_target_install_rpath ( in  TARGET_NAME)

Set INSTALL_RPATH property of executable or shared library target.

This function sets the INSTALL_RPATH property of a specified executable or shared library target using the LINK_DEPENDS obtained using the basis_get_target_link_libraries() function. It determines the installation location of each dependency using the basis_get_target_location() function.

Returns
Sets the INSTALL_RPATH property of the specified target.
See also
basis_get_target_link_libraries()

§ basis_slicer_module_initialize()

macro basis_slicer_module_initialize ( )

Initialize slicer module meta-data.

At the moment, only one module, most often the top-level project can be a Slicer module, i.e., call basis_slicer_module() either in the BasisProject.cmake file of the top-level project or in the corresponding file of at most one of the project modules.

Returns
Nothing.

§ basis_slicer_module_to_extension_metadata()

function basis_slicer_module_to_extension_metadata ( )

Copy MODULE_* metadata to EXTENSION_* metadata of Slicer Extension.

This function is required to work-around bug 1901 in Slicer 4.1.0. It basically implements what the SlicerBlockModuleToExtensionMetadata.cmake module which can be found in the Extensions/CMake/ directory of the Slicer 4 source tree is implementing. The list of metadata has been copied from this particular CMake module of the 4.1.0 release of Slicer.

See also
http://www.na-mic.org/Bug/view.php?id=1901
Returns
Nothing.

§ basis_string_to_list()

function basis_string_to_list ( out  LST,
in  STR 
)

Splits a string at space characters into a list.

Todo:
Probably this can be done in a better way... Difficulty is, that string(REPLACE) does always replace all occurrences. Therefore, we need a regular expression which matches the entire string. More sophisticated regular expressions should do a better job, though.
Parameters
[out]LSTOutput list.
[in]STRInput string.
Returns
Sets LST to the resulting CMake list.

§ basis_strip_target_uid()

function basis_strip_target_uid ( inout  TARGET_UID)

Strip of top-level package name from target UID if present.

If BASIS_USE_FULLY_QUALIFIED_TARGET_UID is ON, the top-level package name is always preserved and this operation does nothing.

Parameters
[in,out]TARGET_UID"Global" target name, i.e., actual CMake target name.
Returns
Sets TARGET_UID to the (stripped) UID.

§ basis_svn_get_last_changed_revision()

function basis_svn_get_last_changed_revision ( in  URL,
out  REV 
)

Get revision number when directory or file was last changed.

Parameters
[in]URLAbsolute path to directory or file. May also be a URL to the directory or file in the repository. A leading "file://" is automatically removed such that the svn command treats it as a local path.
[out]REVRevision number when URL was last modified. If URL is not under Subversion control or Subversion_SVN_EXECUTABLE is invalid, "0" is returned.
Returns
Sets REV to revision number at which the working copy/repository specified by the URL URL was last modified.

§ basis_svn_get_revision()

function basis_svn_get_revision ( in  URL,
out  REV 
)

Get current revision of file or directory.

Parameters
[in]URLAbsolute path to directory or file. May also be a URL to the directory or file in the repository. A leading "file://" is automatically removed such that the svn command treats it as a local path.
[out]REVThe revision number of URL. If URL is not under revision control or Subversion_SVN_EXECUTABLE is invalid, "0" is returned.
Returns
Sets REV to the revision of the working copy/repository at URL URL.

§ basis_svn_status()

function basis_svn_status ( in  URL,
out  STATUS 
)

Get status of revision controlled file.

Parameters
[in]URLAbsolute path to directory or file. May also be a URL to the directory or file in the repository. A leading "file://" will be removed such that the svn command treats it as a local path.
[out]STATUSThe status of URL as returned by 'svn status'. If the local directory or file is unmodified, an empty string is returned. An empty string is also returned when Subversion_SVN_EXECUTABLE is invalid.
Returns
Sets STATUS to the output of the svn info command.

§ basis_tokenize_dependency()

function basis_tokenize_dependency ( in  DEP,
out  PKG,
out  VER,
out  CMP 
)

Tokenize dependency specification.

This function parses a dependency specification such as "ITK-4.1{TestKernel,IO}" into the package name, i.e., ITK, the requested (minimum) package version(s), i.e., 4.1, and a list of package components, i.e., TestKernel and IO. A valid dependency specification must specify the package name of the dependency (case-sensitive). The version and components specification are optional. Note that the components specification may be separated by an arbitrary number of whitespace characters including newlines. The same applies to the specification of the components themselves. This allows one to format the dependency specification as follows, for example:

ITK {
TestKernel,
IO
}

VTK-7|6{}

Parameters
[in]DEPDependency specification, i.e., "<Pkg>[-<version>[|...]][{<Component1>[,...]}]".
[out]PKGPackage name.
[out]VERPackage version(s).
[out]CMPList of package components.
Returns
Nothing.

§ basis_update_imported_location()

function basis_update_imported_location ( in  TARGET,
in  PROPERTY,
in  LOCATION 
)

Update location of imported target.

Parameters
[in]TARGETName (UID) of the imported target.
[in]PROPERTYTarget location property. Either IMPORTED_LOCATION or IMPORTED_LOCATION_<config>, where <config> is one of the imported build configurations. This argument is used to decide whether to keep the current target information or to replace it by the new one.
[in]LOCATIONLocation of imported target.
Returns
Nothing.

§ basis_update_imported_type()

function basis_update_imported_type ( in  TARGET,
in  TYPE 
)

Update type of imported target.

This function is in particular called in basis_set_target_properties() if the BASIS_TYPE property of custom BASIS targets is set after the imported target was added with the initial type UNKNOWN.

Parameters
[in]TARGETName (UID) of the imported target.
[in]TYPEType of imported target.
Returns
Nothing.

§ basis_update_type_of_variable()

macro basis_update_type_of_variable ( in  VAR,
in  TYPE 
)

Change type of cached variable.

If the variable is not cached, nothing is done.

Returns
Nothing.

§ basis_update_value()

macro basis_update_value ( in  VAR)

Update cache variable.

Returns
Nothing.

§ basis_utilities_check()

function basis_utilities_check ( out  VAR,
in  SOURCE_FILE,
in  ARGN 
)

Check whether the BASIS utilities are used within a given source file.

This function matches the source code against specific import patterns which are all valid imports of the BASIS utilities for the respective programming language of the specified file. If the BASIS utilities are used within the specified source file, the variable named VAR is set to TRUE. Otherwise, it is set to FALSE.

Parameters
[out]VARWhether the BASIS utilites are used.
[in]SOURCE_FILEPath of source file to check.
[in]ARGNSource code language. If not specified, the programming language is determined automatically.
Returns
Nothing.

§ basis_variable_check()

function basis_variable_check ( in  ARGN)

Checks for a list of variables required later in the script.

Produces a clear error message explaining the problem and how to fix it if they are not present.

REQUIRED
LIBRARY1_INCLUDE_DIRS
LIBRARY2_INCLUDE_DIRS
LIBRARY2_LIBRARIES
LIBRARY3_INCLUDE_DIRS
LIBRARY3_LIBRARIES
OPTIONAL_PATH
)
Parameters
[in]ARGNThis argument list is parsed and the following arguments are extracted.
REQUIRED var... List of variables that MUST be set to run this script correctly. Will produce a FATAL_ERROR message explaining which variables are misisng and exit the cmake script.
OPTIONAL var... List of variables need not be set to run this script correctly.
PATH_EXISTS var... List of path variables that MUST be set to a location that exists.
OPTIONAL_PATH_EXISTS var... List of path variables that are optional, but once set must be empty or provide a path to location that exists.
Returns
Nothing.

§ basis_variable_value_status()

function basis_variable_value_status ( out  VAR_INFO_STRING,
in  ARGN 
)

Create a string from a list of variables indicating if they are defined and their values.

Useful for debug and user errors, for example:

set(VAR1 "I'm a string")
set(VAR2 2)
basis_variable_value_status(VAR_INFO_STRING VAR1 VAR2 VAR3)
message(STATUS ${VAR_INFO_STRING})
Parameters
[out]VAR_INFO_STRINGThe output string variable that will set with the debug string.
[in]ARGNList of variables to be put into a string along with their value.
Returns
Nothing.

§ basis_version_numbers()

function basis_version_numbers ( in  VERSION,
out  MAJOR,
out  MINOR,
out  PATCH 
)

Extract version numbers from version string.

Parameters
[in]VERSIONVersion string in the format "MAJOR[.MINOR[.PATCH]]".
[out]MAJORMajor version number if given or 0.
[out]MINORMinor version number if given or 0.
[out]PATCHPatch number if given or 0.
Returns
See [out] parameters.

§ basis_write_addpaths_mfile()

macro basis_write_addpaths_mfile ( in  MFILE,
in  ARGN 
)

This function writes a MATLAB M-file with addpath() statements.

Parameters
[in]MFILEName of M-file.
[in]ARGNThe remaining arguments are the paths which should be added to the search path of MATLAB when this M-file is being executed. If the option APPEND is given, the paths are appended to the specified M-file. Otherwise, any existing file will be overwritten. The given directory paths can be relative, in which case they are interpreted relative to the location of the written M-file using the mfilename() function of MATLAB.
Returns
Nothing.

§ basis_write_list()

function basis_write_list ( in  FILENAME,
in  VARIABLE 
)

Write CMake script file which sets the named variable to the specified (list of) values.

Returns
Nothing.

§ find_package()

macro find_package ( )

Overloaded find_package() command.

This macro calls CMake's find_package() command and converts obsolete all uppercase "<PKG>_<VAR>" variables to case-sensitive "<Pkg>_<VAR>" variables. It further ensures that the global variables CMAKE_FIND_LIBRARY_SUFFIXES and CMAKE_FIND_EXECUTABLE_SUFFIX are reset to the values they had before the call to find_package(). This is required if the "Find<Pkg>.cmake" module has modified these variables, but not restored their initial value.

Returns
Nothing.

§ get_filename_component()

function get_filename_component ( inout  ARGN)

Fixes CMake's get_filename_component() command.

The get_filename_component() command of CMake returns the entire portion after the first period (.) [including the period] as extension. However, only the component following the last period (.) [including the period] should be considered to be the extension.

Note
Consider the use of the basis_get_filename_component() macro as an alias to emphasize that this function is different from CMake's get_filename_component() command.
Todo:
Fix issue http://public.kitware.com/Bug/view.php?id=15743 which affects also basis_get_relative_path.
Parameters
[in,out]ARGNArguments as accepted by get_filename_component().
Returns
Sets the variable named by the first argument to the requested component of the given file path.
See also
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:get_filename_component
basis_get_filename_component()

§ include_directories()

macro include_directories ( in  ARGN)

Add directories to search path for include files.

Overwrites CMake's include_directories() command. This is required because the basis_include_directories() function is not used by other projects in their package use files. Therefore, this macro is an alias for basis_include_directories().

Parameters
[in]ARGNList of arguments for basis_include_directories().
Returns
Adds the given paths to the search path for include files.
See also
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:include_directories

§ link_directories()

macro link_directories ( in  ARGN)

Add directories to search path for libraries.

Overwrites CMake's link_directories() command. This is required because the basis_link_directories() function is not used by other projects in their package use files. Therefore, this macro is an alias for basis_link_directories().

Parameters
[in]ARGNList of arguments for basis_link_directories().
Returns
Adds the given paths to the search path for libraries.
See also
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:link_directories

§ set_target_properties()

function set_target_properties ( in  ARGN)

Set target property.

This function is overwritten by BASIS in order to update the information about imported build targets.

Note
Do not use this function in your CMakeLists.txt configuration files. Use basis_set_target_properties() instead.
Due to a bug in CMake (http://www.cmake.org/Bug/view.php?id=12303), except of the first property given directly after the PROPERTIES keyword, only properties listed in BASIS_PROPERTIES_ON_TARGETS can be set.
Parameters
[in]ARGNList of arguments for set_target_properties().
See also
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:set_target_properties
Returns
Nothing.

Variable Documentation

§ BUILD_ALL_MODULES

option BUILD_ALL_MODULES = OFF

Definition at line 1083 of file ProjectTools.cmake.

§ CONFIG_FILE

cmake CONFIG_FILE

Name of the CMake package configuration file.

Definition at line 47 of file GenerateConfig.cmake.

§ CONFIG_PREFIX

cmake CONFIG_PREFIX

Package name.

Definition at line 45 of file GenerateConfig.cmake.

§ CUSTOM_EXPORTS_FILE

cmake CUSTOM_EXPORTS_FILE

Name of the CMake target exports file for custom targets.

Definition at line 55 of file GenerateConfig.cmake.

§ EXPORTS_FILE

cmake EXPORTS_FILE

Name of the CMake target exports file.

Definition at line 53 of file GenerateConfig.cmake.

§ msg

cmake msg

Definition at line 1210 of file ProjectTools.cmake.

§ PROJECT_MODULES_DISABLED

cmake PROJECT_MODULES_DISABLED

Definition at line 1147 of file ProjectTools.cmake.

§ PROJECT_MODULES_ENABLED

cmake PROJECT_MODULES_ENABLED

Definition at line 1146 of file ProjectTools.cmake.

§ PROJECT_MODULES_SORTED

cmake PROJECT_MODULES_SORTED

Definition at line 1172 of file ProjectTools.cmake.

§ USE_FILE

cmake USE_FILE

Name of the CMake package use file.

Definition at line 51 of file GenerateConfig.cmake.

§ VERSION_FILE

cmake VERSION_FILE

Name of the CMake package version file.

Definition at line 49 of file GenerateConfig.cmake.