FindArmadillo¶
Finds the Armadillo C++ library:
find_package(Armadillo [<version>] [...])
Armadillo is a library for linear algebra and scientific computing.
Добавлено в версии 3.18: Support for linking wrapped libraries directly (see the
ARMA_DONT_USE_WRAPPER
preprocessor macro that needs to be defined before
including the <armadillo>
header).
Result Variables¶
This module defines the following variables:
Armadillo_FOUND
Добавлено в версии 3.3.
Boolean indicating whether the (requested version of) Armadillo library was found.
Armadillo_VERSION
Добавлено в версии 4.2.
The version of Armadillo found (e.g.,
14.90.0
).Armadillo_VERSION_NAME
Добавлено в версии 4.2.
The version name of Armadillo found (e.g.,
Antipodean Antileech
).ARMADILLO_INCLUDE_DIRS
List of required include directories.
ARMADILLO_LIBRARIES
List of libraries to be linked.
Deprecated Variables¶
The following variables are provided for backward compatibility:
ARMADILLO_FOUND
Устарело, начиная с версии 4.2: Use
Armadillo_FOUND
, which has the same value.Boolean indicating whether the (requested version of) Armadillo library was found.
ARMADILLO_VERSION_STRING
Устарело, начиная с версии 4.2: Superseded by the
Armadillo_VERSION
.The version of Armadillo found.
ARMADILLO_VERSION_MAJOR
Устарело, начиная с версии 4.2: Superseded by the
Armadillo_VERSION
.Major version number.
ARMADILLO_VERSION_MINOR
Устарело, начиная с версии 4.2: Superseded by the
Armadillo_VERSION
.Minor version number.
ARMADILLO_VERSION_PATCH
Устарело, начиная с версии 4.2: Superseded by the
Armadillo_VERSION
.Patch version number.
ARMADILLO_VERSION_NAME
Устарело, начиная с версии 4.2: Superseded by the
Armadillo_VERSION_NAME
.The version name of Armadillo found (e.g.,
Antipodean Antileech
).
Examples¶
Finding Armadillo and creating an imported target:
find_package(Armadillo REQUIRED)
if(Armadillo_FOUND AND NOT TARGET Armadillo::Armadillo)
add_library(Armadillo::Armadillo INTERFACE IMPORTED)
set_target_properties(
Armadillo::Armadillo
PROPERTIES
INTERFACE_LINK_LIBRARIES "${ARMADILLO_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${ARMADILLO_INCLUDE_DIRS}"
)
endif()
add_executable(foo foo.cc)
target_link_libraries(foo PRIVATE Armadillo::Armadillo)