cmake_test/asserts/library_exists
- cmake_test/asserts/library_exists.ct_assert_library_target_exists(name)
Asserts that a library exists.
Asserts that the target exists and is a library, if not then an
ASSERTION_FAILED
exception is raised.- Parameters:
name (target) – The name of the library
- cmake_test/asserts/library_exists.ct_assert_library_does_not_exist(name)
Asserts that a library does not exist.
Asserts that the target does not exist or is not a library, otherwise an
ASSERTION_FAILED
exception is raised.- Parameters:
name (target) – The name of the library
- cmake_test/asserts/library_exists.ct_library_target_exists(result name)
Determines if a target exists and if it is a library.
This function checks whether a target exists and then checks whether that target is of type
STATIC_LIBRARY
,MODULE_LIBRARY
, orSHARED_LIBRARY
and then returns an integer indicating what it found.- Parameters:
result (int*) – Name to use for the variable which will hold the result.
name (str) – The target name to check.
- Returns:
result
will be set to0
if the target is a library,1
if the target is not a library, and2
if target does not exist.- Return type:
int