diff --git a/CMakeLists.txt b/CMakeLists.txt index c63757bc8..1a7b63e60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,11 +67,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set(OPTIMIZE "-O3" CACHE STRING "Optimization level") -if(CUDA) - set(C_CXX_FLAGS "-lcudart -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations -Woverloaded-virtual -pedantic-errors -Wno-deprecated") -else() - set(C_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations -Woverloaded-virtual -pedantic-errors -Wno-deprecated") -endif(CUDA) +set(C_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wmissing-declarations -Woverloaded-virtual -pedantic-errors -Wno-deprecated") if(OPENMP) set(C_CXX_FLAGS "-fopenmp ${C_CXX_FLAGS}") endif(OPENMP) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f68d4e4c7..7beaeb9c7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -22,7 +22,7 @@ include_directories(${TACO_SRC_DIR}) add_library(taco ${TACO_LIBRARY_TYPE} ${TACO_HEADERS} ${TACO_SOURCES}) if (CUDA) include_directories(${CUDA_INCLUDE_DIRS}) - target_link_libraries(taco INTERFACE ${CUDA_TOOLKIT_ROOT_DIR}/lib64/libcudart.so) + target_link_libraries(taco PUBLIC ${CUDA_LIBRARIES}) endif (CUDA) install(TARGETS taco DESTINATION lib)