Skip to content

Commit

Permalink
link openmp
Browse files Browse the repository at this point in the history
  • Loading branch information
QinbinLi committed Nov 24, 2017
1 parent 258d53b commit 281b8de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ set(USE_CUDA ON CACHE BOOL "Compile with CUDA")
set(USE_EIGEN OFF CACHE BOOL "Compile with Eigen")

find_package(Threads REQUIRED)

find_package(OpenMP REQUIRED)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
#find_package(MKL REQUIRED)
#include_directories(${MKL_INCLUDE_DIRS})
#link_directories(${MKL_LIBRARIES})
Expand All @@ -23,7 +27,6 @@ if (USE_CUDA)
set(LINK_LIBRARY ${CUDA_cusparse_LIBRARY})
else ()
message("Compile without CUDA")
find_package(OpenMP REQUIRED)
endif ()

if (USE_EIGEN)
Expand Down

0 comments on commit 281b8de

Please sign in to comment.