Skip to content

Commit

Permalink
Add provision to use pre-built decomp2d library using cmake .. -Ddeco…
Browse files Browse the repository at this point in the history
…mp2d_INCLUDE_DIRS=/path-to-2decomp-fft/build
  • Loading branch information
Jacques Xing committed Oct 22, 2024
1 parent 151eea7 commit c0649d2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/Finddecomp2d.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# - Find the 2decomp-fft library
find_package(decomp2d
PATHS ${CMAKE_SOURCE_DIR}/decomp2d/build)
PATHS ${CMAKE_SOURCE_DIR}/decomp2d/build ${decomp2d_INCLUDE_DIRS})
if (decomp2d_FOUND)
message(STATUS "2decomp-fft FOUND")
else(decomp2d_FOUND)
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ if (${POISSON_SOLVER} STREQUAL "FFT" AND ${BACKEND} STREQUAL "OMP")
message(STATUS "Using the FFT poisson solver with 2decomp&fft")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
find_package(decomp2d REQUIRED)
include_directories(${decomp2d_INCLUDE_DIRS})
target_link_libraries(decomp2d)
target_link_libraries(x3d2 PRIVATE decomp2d)
endif()
Expand Down

0 comments on commit c0649d2

Please sign in to comment.