aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/FindEigen3.cmake
diff options
context:
space:
mode:
authorGravatar Hans Johnson <hans.j.johnson@gmail.com>2019-10-31 11:36:27 -0500
committerGravatar Hans Johnson <hans.j.johnson@gmail.com>2019-10-31 11:36:27 -0500
commit6fb3e5f1767855bc1a8aa3c868bc7fbf0eeb67ef (patch)
treeee5db623e6eb11561a60f9abf0f6d0696c950360 /cmake/FindEigen3.cmake
parentf1e83073082f2733eec6235f2fdf251217a54ade (diff)
STYLE: Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style.
Diffstat (limited to 'cmake/FindEigen3.cmake')
-rw-r--r--cmake/FindEigen3.cmake24
1 files changed, 12 insertions, 12 deletions
diff --git a/cmake/FindEigen3.cmake b/cmake/FindEigen3.cmake
index 4d9bc1a52..0b36805e7 100644
--- a/cmake/FindEigen3.cmake
+++ b/cmake/FindEigen3.cmake
@@ -28,16 +28,16 @@
if(NOT Eigen3_FIND_VERSION)
if(NOT Eigen3_FIND_VERSION_MAJOR)
set(Eigen3_FIND_VERSION_MAJOR 2)
- endif(NOT Eigen3_FIND_VERSION_MAJOR)
+ endif()
if(NOT Eigen3_FIND_VERSION_MINOR)
set(Eigen3_FIND_VERSION_MINOR 91)
- endif(NOT Eigen3_FIND_VERSION_MINOR)
+ endif()
if(NOT Eigen3_FIND_VERSION_PATCH)
set(Eigen3_FIND_VERSION_PATCH 0)
- endif(NOT Eigen3_FIND_VERSION_PATCH)
+ endif()
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
-endif(NOT Eigen3_FIND_VERSION)
+endif()
macro(_eigen3_check_version)
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
@@ -52,16 +52,16 @@ macro(_eigen3_check_version)
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK FALSE)
- else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
+ else()
set(EIGEN3_VERSION_OK TRUE)
- endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
+ endif()
if(NOT EIGEN3_VERSION_OK)
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
"but at least version ${Eigen3_FIND_VERSION} is required")
- endif(NOT EIGEN3_VERSION_OK)
-endmacro(_eigen3_check_version)
+ endif()
+endmacro()
if (EIGEN3_INCLUDE_DIR)
@@ -70,7 +70,7 @@ if (EIGEN3_INCLUDE_DIR)
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
set(Eigen3_FOUND ${EIGEN3_VERSION_OK})
-else (EIGEN3_INCLUDE_DIR)
+else ()
# search first if an Eigen3Config.cmake is available in the system,
# if successful this would set EIGEN3_INCLUDE_DIR and the rest of
@@ -87,18 +87,18 @@ else (EIGEN3_INCLUDE_DIR)
${KDE4_INCLUDE_DIR}
PATH_SUFFIXES eigen3 eigen
)
- endif(NOT EIGEN3_INCLUDE_DIR)
+ endif()
if(EIGEN3_INCLUDE_DIR)
_eigen3_check_version()
- endif(EIGEN3_INCLUDE_DIR)
+ endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
mark_as_advanced(EIGEN3_INCLUDE_DIR)
-endif(EIGEN3_INCLUDE_DIR)
+endif()
if(EIGEN3_FOUND AND NOT TARGET Eigen3::Eigen)
add_library(Eigen3::Eigen INTERFACE IMPORTED)