mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-09 17:18:18 +00:00
FindArmadillo: Remove unnecessary setting of ARMADILLO_LIBRARY to empty
This is not a typical pattern for find modules, and it breaks subsequent calls to `find_package(Armadillo)`. See also commit38c6dd7b19(FindArmadillo: Add support for non-wrapper case, 2020-03-02, v3.18.0-rc1~594^2) and commit6745af99c8(FindArmadillo: Fix wrapper linking with MSVC, 2025-02-05, v4.0.0-rc1~53^2).
This commit is contained in:
@@ -133,7 +133,7 @@ if(ARMADILLO_INCLUDE_DIR)
|
||||
set(Armadillo_VERSION_NAME "EARLY RELEASE")
|
||||
|
||||
if(EXISTS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/arma_version.hpp")
|
||||
# Read and parse armdillo version header file for version number
|
||||
# Read and parse Armadillo version header file for version number.
|
||||
file(STRINGS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/arma_version.hpp" _ARMA_HEADER_CONTENTS REGEX "#define ARMA_VERSION_[A-Z]+ ")
|
||||
string(REGEX REPLACE ".*#define ARMA_VERSION_MAJOR ([0-9]+).*" "\\1" ARMADILLO_VERSION_MAJOR "${_ARMA_HEADER_CONTENTS}")
|
||||
string(REGEX REPLACE ".*#define ARMA_VERSION_MINOR ([0-9]+).*" "\\1" ARMADILLO_VERSION_MINOR "${_ARMA_HEADER_CONTENTS}")
|
||||
@@ -176,8 +176,6 @@ if(_ARMA_USE_WRAPPER)
|
||||
)
|
||||
mark_as_advanced(ARMADILLO_LIBRARY)
|
||||
set(_ARMA_REQUIRED_VARS ARMADILLO_LIBRARY)
|
||||
else()
|
||||
set(ARMADILLO_LIBRARY "")
|
||||
endif()
|
||||
|
||||
# Transitive linking with the wrapper does not work with MSVC,
|
||||
|
||||
Reference in New Issue
Block a user