0
0
mirror of https://gitlab.com/libeigen/eigen.git synced 2026-01-18 17:31:19 +01:00

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.
This commit is contained in:
Hans Johnson
2019-10-31 11:36:27 -05:00
parent f1e8307308
commit 6fb3e5f176
59 changed files with 253 additions and 253 deletions

View File

@@ -29,7 +29,7 @@ ENDIF(MSVC)
if(IS_ICPC)
set(CMAKE_CXX_FLAGS "-fast ${CMAKE_CXX_FLAGS}")
set(CMAKE_Fortran_FLAGS "-fast ${CMAKE_Fortran_FLAGS}")
endif(IS_ICPC)
endif()
include_directories(
${PROJECT_SOURCE_DIR}/actions
@@ -41,7 +41,7 @@ include_directories(
# if (MKL_FOUND)
# add_definitions(-DHAVE_MKL)
# set(DEFAULT_LIBRARIES ${MKL_LIBRARIES})
# endif (MKL_FOUND)
# endif ()
find_library(EIGEN_BTL_RT_LIBRARY rt)
# if we cannot find it easily, then we don't need it!
@@ -53,7 +53,7 @@ MACRO(BTL_ADD_BENCH targetname)
foreach(_current_var ${ARGN})
set(_last_var ${_current_var})
endforeach(_current_var)
endforeach()
set(_sources ${ARGN})
list(LENGTH _sources _argn_length)
@@ -64,7 +64,7 @@ MACRO(BTL_ADD_BENCH targetname)
if (${_argn_length} EQUAL ${_src_length})
set(_last_var ON)
endif (${_argn_length} EQUAL ${_src_length})
endif ()
OPTION(BUILD_${targetname} "Build benchmark ${targetname}" ${_last_var})
@@ -86,7 +86,7 @@ macro(btl_add_target_property target prop value)
set_target_properties(${target} PROPERTIES ${prop} "${previous} ${value}")
endif()
endmacro(btl_add_target_property)
endmacro()
ENABLE_TESTING()

View File

@@ -1,7 +1,7 @@
if (ACML_LIBRARIES)
set(ACML_FIND_QUIETLY TRUE)
endif (ACML_LIBRARIES)
endif ()
find_library(ACML_LIBRARIES
NAMES

View File

@@ -1,7 +1,7 @@
if (ATLAS_LIBRARIES)
set(ATLAS_FIND_QUIETLY TRUE)
endif (ATLAS_LIBRARIES)
endif ()
find_file(ATLAS_LIB libatlas.so.3 PATHS /usr/lib /usr/lib/atlas /usr/lib64 /usr/lib64/atlas $ENV{ATLASDIR} ${LIB_INSTALL_DIR})
find_library(ATLAS_LIB satlas PATHS $ENV{ATLASDIR} ${LIB_INSTALL_DIR})
@@ -23,7 +23,7 @@ if(ATLAS_LIB AND ATLAS_CBLAS AND ATLAS_LAPACK AND ATLAS_F77BLAS)
# set(ATLAS_LIBRARIES ${ATLAS_LIBRARIES} ${ATLAS_REFERENCE_LAPACK})
# endif()
endif(ATLAS_LIB AND ATLAS_CBLAS AND ATLAS_LAPACK AND ATLAS_F77BLAS)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ATLAS DEFAULT_MSG ATLAS_LIBRARIES)

View File

@@ -15,7 +15,7 @@ if (BLAZE_INCLUDE_DIR)
# in cache already
set(BLAZE_FOUND TRUE)
else (BLAZE_INCLUDE_DIR)
else ()
find_path(BLAZE_INCLUDE_DIR NAMES blaze/Blaze.h
PATHS
@@ -27,5 +27,5 @@ find_package_handle_standard_args(BLAZE DEFAULT_MSG BLAZE_INCLUDE_DIR)
mark_as_advanced(BLAZE_INCLUDE_DIR)
endif(BLAZE_INCLUDE_DIR)
endif()

View File

@@ -15,7 +15,7 @@
if (BLITZ_INCLUDES AND BLITZ_LIBRARIES)
set(Blitz_FIND_QUIETLY TRUE)
endif (BLITZ_INCLUDES AND BLITZ_LIBRARIES)
endif ()
find_path(BLITZ_INCLUDES
NAMES

View File

@@ -2,7 +2,7 @@
if (CBLAS_INCLUDES AND CBLAS_LIBRARIES)
set(CBLAS_FIND_QUIETLY TRUE)
endif (CBLAS_INCLUDES AND CBLAS_LIBRARIES)
endif ()
find_path(CBLAS_INCLUDES
NAMES

View File

@@ -1,7 +1,7 @@
if (GMM_INCLUDE_DIR)
# in cache already
set(GMM_FOUND TRUE)
else (GMM_INCLUDE_DIR)
else ()
find_path(GMM_INCLUDE_DIR NAMES gmm/gmm.h
PATHS
@@ -14,4 +14,4 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMM DEFAULT_MSG GMM_INCLUDE_DIR )
mark_as_advanced(GMM_INCLUDE_DIR)
endif(GMM_INCLUDE_DIR)
endif()

View File

@@ -1,7 +1,7 @@
if (MKL_LIBRARIES)
set(MKL_FIND_QUIETLY TRUE)
endif (MKL_LIBRARIES)
endif ()
if(CMAKE_MINOR_VERSION GREATER 4)
@@ -30,7 +30,7 @@ if(MKL_LIBRARIES AND MKL_GUIDE)
set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel_lp64 mkl_sequential ${MKL_GUIDE} pthread)
endif()
else(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64")
else()
find_library(MKL_LIBRARIES
mkl_core
@@ -55,9 +55,9 @@ if(MKL_LIBRARIES AND MKL_GUIDE)
set(MKL_LIBRARIES ${MKL_LIBRARIES} mkl_intel mkl_sequential ${MKL_GUIDE} pthread)
endif()
endif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64")
endif()
endif(CMAKE_MINOR_VERSION GREATER 4)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MKL DEFAULT_MSG MKL_LIBRARIES)

View File

@@ -15,7 +15,7 @@ if (MTL4_INCLUDE_DIR)
# in cache already
set(MTL4_FOUND TRUE)
else (MTL4_INCLUDE_DIR)
else ()
find_path(MTL4_INCLUDE_DIR NAMES boost/numeric/mtl/mtl.hpp
PATHS
@@ -27,5 +27,5 @@ find_package_handle_standard_args(MTL4 DEFAULT_MSG MTL4_INCLUDE_DIR)
mark_as_advanced(MTL4_INCLUDE_DIR)
endif(MTL4_INCLUDE_DIR)
endif()

View File

@@ -1,7 +1,7 @@
if (OPENBLAS_LIBRARIES)
set(OPENBLAS_FIND_QUIETLY TRUE)
endif (OPENBLAS_LIBRARIES)
endif ()
find_file(OPENBLAS_LIBRARIES NAMES libopenblas.so libopenblas.so.0 PATHS /usr/lib /usr/lib64 $ENV{OPENBLASDIR} ${LIB_INSTALL_DIR})
find_library(OPENBLAS_LIBRARIES openblas PATHS $ENV{OPENBLASDIR} ${LIB_INSTALL_DIR})

View File

@@ -15,7 +15,7 @@ if (TVMET_INCLUDE_DIR)
# in cache already
set(TVMET_FOUND TRUE)
else (TVMET_INCLUDE_DIR)
else ()
find_path(TVMET_INCLUDE_DIR NAMES tvmet/tvmet.h
PATHS
@@ -28,5 +28,5 @@ find_package_handle_standard_args(Tvmet DEFAULT_MSG TVMET_INCLUDE_DIR)
mark_as_advanced(TVMET_INCLUDE_DIR)
endif(TVMET_INCLUDE_DIR)
endif()

View File

@@ -5,8 +5,8 @@ if (ATLAS_FOUND)
if(BUILD_btl_atlas)
target_link_libraries(btl_atlas ${ATLAS_LIBRARIES})
set_target_properties(btl_atlas PROPERTIES COMPILE_FLAGS "-DCBLASNAME=ATLAS -DHAS_LAPACK=1")
endif(BUILD_btl_atlas)
endif (ATLAS_FOUND)
endif()
endif ()
find_package(MKL)
if (MKL_FOUND)
@@ -14,8 +14,8 @@ if (MKL_FOUND)
if(BUILD_btl_mkl)
target_link_libraries(btl_mkl ${MKL_LIBRARIES})
set_target_properties(btl_mkl PROPERTIES COMPILE_FLAGS "-DCBLASNAME=INTEL_MKL -DHAS_LAPACK=1")
endif(BUILD_btl_mkl)
endif (MKL_FOUND)
endif()
endif ()
find_package(OPENBLAS)
@@ -24,8 +24,8 @@ if (OPENBLAS_FOUND)
if(BUILD_btl_openblas)
target_link_libraries(btl_openblas ${OPENBLAS_LIBRARIES} )
set_target_properties(btl_openblas PROPERTIES COMPILE_FLAGS "-DCBLASNAME=OPENBLAS")
endif(BUILD_btl_openblas)
endif (OPENBLAS_FOUND)
endif()
endif ()
find_package(ACML)
if (ACML_FOUND)
@@ -33,8 +33,8 @@ if (ACML_FOUND)
if(BUILD_btl_acml)
target_link_libraries(btl_acml ${ACML_LIBRARIES} )
set_target_properties(btl_acml PROPERTIES COMPILE_FLAGS "-DCBLASNAME=ACML -DHAS_LAPACK=1")
endif(BUILD_btl_acml)
endif (ACML_FOUND)
endif()
endif ()
if(Eigen_SOURCE_DIR AND CMAKE_Fortran_COMPILER_WORKS)
# we are inside Eigen and blas/lapack interface is compilable

View File

@@ -7,11 +7,11 @@ if (BLITZ_FOUND)
btl_add_bench(btl_blitz btl_blitz.cpp)
if (BUILD_btl_blitz)
target_link_libraries(btl_blitz ${BLITZ_LIBRARIES})
endif (BUILD_btl_blitz)
endif ()
btl_add_bench(btl_tiny_blitz btl_tiny_blitz.cpp OFF)
if (BUILD_btl_tiny_blitz)
target_link_libraries(btl_tiny_blitz ${BLITZ_LIBRARIES})
endif (BUILD_btl_tiny_blitz)
endif ()
endif (BLITZ_FOUND)
endif ()

View File

@@ -47,9 +47,9 @@ if (EIGEN3_FOUND)
# if(BUILD_btl_eigen3_adv)
# target_link_libraries(btl_eigen3_adv ${MKL_LIBRARIES})
# endif(BUILD_btl_eigen3_adv)
# endif()
endif(NOT BTL_NOVEC)
endif()
btl_add_bench(btl_tiny_eigen3 btl_tiny_eigen3.cpp OFF)
@@ -59,7 +59,7 @@ if (EIGEN3_FOUND)
if(BUILD_btl_tiny_eigen3_novec)
btl_add_target_property(btl_tiny_eigen3_novec COMPILE_FLAGS "-DEIGEN_DONT_VECTORIZE -DBTL_PREFIX=eigen3_tiny_novec")
endif(BUILD_btl_tiny_eigen3_novec)
endif(NOT BTL_NOVEC)
endif()
endif()
endif (EIGEN3_FOUND)
endif ()

View File

@@ -3,4 +3,4 @@ find_package(GMM)
if (GMM_FOUND)
include_directories(${GMM_INCLUDES})
btl_add_bench(btl_gmm main.cpp)
endif (GMM_FOUND)
endif ()

View File

@@ -3,4 +3,4 @@ find_package(MTL4)
if (MTL4_FOUND)
include_directories(${MTL4_INCLUDE_DIR})
btl_add_bench(btl_mtl4 main.cpp)
endif (MTL4_FOUND)
endif ()

View File

@@ -39,6 +39,6 @@ if (TENSOR_FOUND)
btl_add_target_property(btl_tensor_novec_vecmat COMPILE_FLAGS "-fno-exceptions -DEIGEN_DONT_VECTORIZE -DBTL_PREFIX=tensor_novec")
btl_add_target_property(btl_tensor_novec_matmat COMPILE_FLAGS "-fno-exceptions -DEIGEN_DONT_VECTORIZE -DBTL_PREFIX=tensor_novec")
endif(NOT BTL_NOVEC)
endif()
endif (TENSOR_FOUND)
endif ()

View File

@@ -3,4 +3,4 @@ find_package(Tvmet)
if (TVMET_FOUND)
include_directories(${TVMET_INCLUDE_DIR})
btl_add_bench(btl_tvmet main.cpp OFF)
endif (TVMET_FOUND)
endif ()

View File

@@ -4,4 +4,4 @@ if (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${Boost_INCLUDES})
btl_add_bench(btl_ublas main.cpp)
endif (Boost_FOUND)
endif ()

View File

@@ -11,7 +11,7 @@ set(SPARSE_LIBS "")
# if(PARDISO_LIBRARIES)
# add_definitions("-DEIGEN_PARDISO_SUPPORT")
# set(SPARSE_LIBS ${SPARSE_LIBS} ${PARDISO_LIBRARIES})
# endif(PARDISO_LIBRARIES)
# endif()
find_package(Cholmod)
if(CHOLMOD_FOUND AND BLAS_FOUND AND LAPACK_FOUND)
@@ -57,7 +57,7 @@ if(PASTIX_FOUND AND PASTIX_pastix_nompi.h_INCLUDE_DIRS AND BLAS_FOUND)
elseif(METIS_FOUND)
include_directories(${METIS_INCLUDE_DIRS})
set(PASTIX_LIBRARIES ${PASTIX_LIBRARIES} ${METIS_LIBRARIES})
endif(SCOTCH_FOUND)
endif()
set(SPARSE_LIBS ${SPARSE_LIBS} ${PASTIX_LIBRARIES_DEP} ${ORDERING_LIBRARIES})
set(PASTIX_ALL_LIBS ${PASTIX_LIBRARIES_DEP})
endif()
@@ -66,12 +66,12 @@ if(METIS_FOUND)
include_directories(${METIS_INCLUDE_DIRS})
set (SPARSE_LIBS ${SPARSE_LIBS} ${METIS_LIBRARIES})
add_definitions("-DEIGEN_METIS_SUPPORT")
endif(METIS_FOUND)
endif()
find_library(RT_LIBRARY rt)
if(RT_LIBRARY)
set(SPARSE_LIBS ${SPARSE_LIBS} ${RT_LIBRARY})
endif(RT_LIBRARY)
endif()
add_executable(spbenchsolver spbenchsolver.cpp)
target_link_libraries (spbenchsolver ${SPARSE_LIBS})