text
stringlengths 0
150
|
|---|
add_executable(bug1213 bug1213.cpp bug1213_main.cpp)
|
check_cxx_compiler_flag("-ffast-math" COMPILER_SUPPORT_FASTMATH)
|
if(COMPILER_SUPPORT_FASTMATH)
|
set(EIGEN_FASTMATH_FLAGS "-ffast-math")
|
else()
|
check_cxx_compiler_flag("/fp:fast" COMPILER_SUPPORT_FPFAST)
|
if(COMPILER_SUPPORT_FPFAST)
|
set(EIGEN_FASTMATH_FLAGS "/fp:fast")
|
endif()
|
endif()
|
ei_add_test(fastmath "${EIGEN_FASTMATH_FLAGS}")
|
# # ei_add_test(denseLM)
|
if(QT4_FOUND)
|
ei_add_test(qtvector "" "${QT_QTCORE_LIBRARY}")
|
endif()
|
if(PARDISO_FOUND)
|
ei_add_test(pardiso_support "" "${PARDISO_ALL_LIBS}")
|
endif()
|
if(PASTIX_FOUND AND (SCOTCH_FOUND OR METIS_FOUND))
|
ei_add_test(pastix_support "" "${PASTIX_ALL_LIBS}")
|
endif()
|
if(SPQR_FOUND AND EIGEN_TEST_CXX11 AND CHOLMOD_FOUND AND EIGEN_BUILD_BLAS AND EIGEN_BUILD_LAPACK)
|
ei_add_test(spqr_support "" "${SPQR_ALL_LIBS}")
|
endif()
|
if(METIS_FOUND)
|
ei_add_test(metis_support "" "${METIS_LIBRARIES}")
|
endif()
|
string(TOLOWER "${CMAKE_CXX_COMPILER}" cmake_cxx_compiler_tolower)
|
if(cmake_cxx_compiler_tolower MATCHES "qcc")
|
set(CXX_IS_QCC "ON")
|
endif()
|
ei_add_property(EIGEN_TESTING_SUMMARY "CXX: ${CMAKE_CXX_COMPILER}\n")
|
if(CMAKE_COMPILER_IS_GNUCXX AND NOT CXX_IS_QCC)
|
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version COMMAND head -n 1 OUTPUT_VARIABLE EIGEN_CXX_VERSION_STRING OUTPUT_STRIP_TRAILING_WHITESPACE)
|
ei_add_property(EIGEN_TESTING_SUMMARY "CXX_VERSION: ${EIGEN_CXX_VERSION_STRING}\n")
|
endif()
|
ei_add_property(EIGEN_TESTING_SUMMARY "CXX_FLAGS: ${CMAKE_CXX_FLAGS}\n")
|
if (EIGEN_TEST_CUSTOM_CXX_FLAGS)
|
ei_add_property(EIGEN_TESTING_SUMMARY "Custom CXX flags: ${EIGEN_TEST_CUSTOM_CXX_FLAGS}\n")
|
endif()
|
ei_add_property(EIGEN_TESTING_SUMMARY "Sparse lib flags: ${SPARSE_LIBS}\n")
|
option(EIGEN_TEST_EIGEN2 "Run whole Eigen2 test suite against EIGEN2_SUPPORT" OFF)
|
mark_as_advanced(EIGEN_TEST_EIGEN2)
|
if(EIGEN_TEST_EIGEN2)
|
message(WARNING "The Eigen2 test suite has been removed")
|
endif()
|
# boost MP unit test
|
find_package(Boost 1.53.0)
|
if(Boost_FOUND AND EIGEN_TEST_CXX11)
|
include_directories(${Boost_INCLUDE_DIRS})
|
ei_add_test(boostmultiprec "" "${Boost_LIBRARIES}")
|
ei_add_property(EIGEN_TESTED_BACKENDS "Boost.Multiprecision, ")
|
else()
|
ei_add_property(EIGEN_MISSING_BACKENDS "Boost.Multiprecision, ")
|
endif()
|
# CUDA unit tests
|
option(EIGEN_TEST_CUDA "Enable CUDA support in unit tests" OFF)
|
option(EIGEN_TEST_CUDA_CLANG "Use clang instead of nvcc to compile the CUDA tests" OFF)
|
if(EIGEN_TEST_CUDA_CLANG AND NOT CMAKE_CXX_COMPILER MATCHES "clang")
|
message(WARNING "EIGEN_TEST_CUDA_CLANG is set, but CMAKE_CXX_COMPILER does not appear to be clang.")
|
endif()
|
find_package(CUDA 9.0)
|
if(CUDA_FOUND AND EIGEN_TEST_CUDA)
|
# Make sure to compile without the -pedantic, -Wundef, -Wnon-virtual-dtor
|
# and -fno-check-new flags since they trigger thousands of compilation warnings
|
# in the CUDA runtime
|
string(REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
string(REPLACE "-Wundef" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
string(REPLACE "-Wnon-virtual-dtor" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
string(REPLACE "-fno-check-new" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
if(EIGEN_TEST_CUDA_CLANG)
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
string(APPEND CMAKE_CXX_FLAGS " --cuda-path=${CUDA_TOOLKIT_ROOT_DIR}")
|
foreach(GPU IN LISTS EIGEN_CUDA_COMPUTE_ARCH)
|
string(APPEND CMAKE_CXX_FLAGS " --cuda-gpu-arch=sm_${GPU}")
|
endforeach()
|
string(APPEND CMAKE_CXX_FLAGS " ${EIGEN_CUDA_CXX_FLAGS}")
|
else()
|
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
|
set(NVCC_ARCH_FLAGS)
|
# Define an -arch=sm_<arch>, otherwise if GPU does not exactly match one of
|
# those in the arch list for -gencode, the kernels will fail to run with
|
# cudaErrorNoKernelImageForDevice
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.