diff --git a/test/misc/lanczos/CMakeLists.txt b/test/misc/lanczos/CMakeLists.txt index 951b65c8..a7abd5f2 100644 --- a/test/misc/lanczos/CMakeLists.txt +++ b/test/misc/lanczos/CMakeLists.txt @@ -1,79 +1,6 @@ -# cmake_minimum_required(VERSION 3.14) -# project(lanczos_test) -# enable_language(CUDA) -# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") -# set(CMAKE_BUILD_TYPE Debug) -# #set( CMAKE_VERBOSE_MAKEFILE on ) -# #add_compile_definitions(PUBLIC MAXLOGLEVEL=15) -# #GoogleTest requires at least C++14 -# set(CMAKE_CXX_STANDARD 14) -# set(CMAKE_CUDA_STANDARD 14) -# set(CMAKE_CUDA_STANDARD_REQUIRED ON) -# set(CMAKE_CUDA_SEPARABLE_COMPILATION OFF) -# set(CUDA_ARCHITECTURES OFF) - -# set(UAMMD_INCLUDE ../../../src ../../../src/third_party) - - -# include(FetchContent) -# FetchContent_Declare( -# googletest -# GIT_REPOSITORY https://github.com/google/googletest.git -# GIT_TAG release-1.12.1 -# ) -# # For Windows: Prevent overriding the parent project's compiler/linker settings -# set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -# FetchContent_MakeAvailable(googletest) -# enable_testing() - -# find_package(BLAS) -# if(BLAS_FOUND) -# message("mkl environment detected") -# add_compile_definitions(PUBLIC USE_MKL) -# link_libraries( -# BLAS::BLAS -# ) -# else() -# unset(BLA_VENDOR) -# find_package(LAPACK REQUIRED) -# find_package(LAPACKE REQUIRED) -# find_package(BLAS REQUIRED) -# link_libraries(${LAPACK_LIBRARIES} ${LAPACKE_LIBRARIES}) -# endif() - -# find_path(BLAS_INCLUDE_DIRS mkl.h -# $ENV{CONDA_PREFIX}/include -# /usr/include -# /usr/local/include -# $ENV{MKLROOT}/include -# $ENV{BLAS_HOME}/include -# ) - -# include_directories(${UAMMD_INCLUDE} ${BLAS_INCLUDE_DIRS}) -# add_compile_definitions(PUBLIC DOUBLE_PRECISION) -# link_libraries(${CUDA_LIBRARY} cufft cublas cusolver) - -# add_executable( -# lanczos_test -# lanczos_test.cu -# ) - -# target_link_libraries( -# lanczos_test -# GTest::gtest_main -# GTest::gmock_main -# ) - -# include(GoogleTest) -# gtest_discover_tests(lanczos_test) - -# IF (CMAKE_BUILD_TYPE MATCHES "Debug") -# set(CMAKE_CUDA_FLAGS "-g -G -lineinfo -src-in-ptx") -# set(CMAKE_CXX_FLAGS "-g -Wall -Wextra -pedantic") -# ENDIF() - add_executable(lanczos test_lanczos.cu) target_include_directories(lanczos PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(lanczos cufft cublas) set_target_properties(lanczos PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") target_link_libraries( lanczos