diff --git a/CMakeLists.txt b/CMakeLists.txt index ebedc18bf..ab66b6197 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,11 +70,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)