Skip to content

Commit

Permalink
Add one more Include to have the product workable with FetchContent (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
akabalov authored Dec 1, 2023
1 parent 7cb0264 commit 5d11998
Show file tree
Hide file tree
Showing 25 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ set(ENABLE_PORTBLAS_BACKEND_INTEL_CPU OFF CACHE INTERNAL "")
set(ENABLE_PORTBLAS_BACKEND_INTEL_GPU OFF CACHE INTERNAL "")
set(ENABLE_PORTBLAS_BACKEND_AMD_GPU OFF CACHE INTERNAL "")
set(ENABLE_PORTBLAS_BACKEND_NVIDIA_GPU OFF CACHE INTERNAL "")
# store path to CMAKE_CURRENT_BINARY_DIR to use it later (makes FetchContent_Declare workable)
set(ONEMKL_GENERATED_INCLUDE_PATH ${CMAKE_CURRENT_BINARY_DIR})

# Build loader and backends for each domain
foreach(domain ${TARGET_DOMAINS})
Expand Down
1 change: 1 addition & 0 deletions src/blas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ target_include_directories(onemkl_blas
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/include
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
$<TARGET_FILE_DIR:onemkl>
)

Expand Down
1 change: 1 addition & 0 deletions src/blas/backends/cublas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src/include
${PROJECT_SOURCE_DIR}/src
${ONEMKL_GENERATED_INCLUDE_PATH}
)
target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
target_compile_options(ONEMKL::SYCL::SYCL INTERFACE
Expand Down
1 change: 1 addition & 0 deletions src/blas/backends/mklcpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ target_include_directories(${LIB_OBJ}
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/include
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
1 change: 1 addition & 0 deletions src/blas/backends/mklgpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ target_include_directories(${LIB_OBJ}
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/include
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
1 change: 1 addition & 0 deletions src/blas/backends/netlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ target_include_directories(${LIB_OBJ}
${PROJECT_SOURCE_DIR}/src/include
${CMAKE_BINARY_DIR}/bin
${NETLIB_INCLUDE}
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
1 change: 1 addition & 0 deletions src/blas/backends/portblas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ target_include_directories(${LIB_OBJ}
${PROJECT_SOURCE_DIR}/src/include
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
1 change: 1 addition & 0 deletions src/blas/backends/rocblas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${PROJECT_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)
target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
target_compile_options(ONEMKL::SYCL::SYCL INTERFACE
Expand Down
1 change: 1 addition & 0 deletions src/dft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ target_include_directories(onemkl_dft
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/include
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
$<TARGET_FILE_DIR:onemkl>
)

Expand Down
1 change: 1 addition & 0 deletions src/dft/backends/cufft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
1 change: 1 addition & 0 deletions src/dft/backends/mklcpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
1 change: 1 addition & 0 deletions src/dft/backends/mklgpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
1 change: 1 addition & 0 deletions src/dft/backends/rocfft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
1 change: 1 addition & 0 deletions src/lapack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ target_include_directories(onemkl_lapack
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/include
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
$<TARGET_FILE_DIR:onemkl>
)

Expand Down
1 change: 1 addition & 0 deletions src/lapack/backends/cusolver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ target_include_directories(${LIB_OBJ}
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/blas/backends/cublas
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)
target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
target_link_libraries(${LIB_OBJ}
Expand Down
1 change: 1 addition & 0 deletions src/lapack/backends/mklcpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
1 change: 1 addition & 0 deletions src/lapack/backends/mklgpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
1 change: 1 addition & 0 deletions src/lapack/backends/rocsolver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ target_include_directories(${LIB_OBJ}
${PROJECT_SOURCE_DIR}/src/include
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)
target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
target_link_libraries(${LIB_OBJ} PUBLIC ONEMKL::SYCL::SYCL ONEMKL::rocSOLVER::rocSOLVER)
Expand Down
1 change: 1 addition & 0 deletions src/rng/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ target_include_directories(onemkl_rng
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/include
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
$<TARGET_FILE_DIR:onemkl>
)

Expand Down
1 change: 1 addition & 0 deletions src/rng/backends/curand/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ target_include_directories(${LIB_OBJ}
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${MKL_INCLUDE}
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_link_libraries(${LIB_OBJ} PUBLIC ONEMKL::SYCL::SYCL ONEMKL::cuRAND::cuRAND)
Expand Down
1 change: 1 addition & 0 deletions src/rng/backends/mklcpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
1 change: 1 addition & 0 deletions src/rng/backends/mklgpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down
2 changes: 1 addition & 1 deletion src/rng/backends/rocrand/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ add_library(${LIB_OBJ} OBJECT ${SOURCES})

target_include_directories(
${LIB_OBJ} PRIVATE ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin ${MKL_INCLUDE})
${CMAKE_BINARY_DIR}/bin ${MKL_INCLUDE} ${ONEMKL_GENERATED_INCLUDE_PATH})

target_link_libraries(${LIB_OBJ} PUBLIC ONEMKL::SYCL::SYCL
ONEMKL::rocRAND::rocRAND)
Expand Down
1 change: 1 addition & 0 deletions src/sparse_blas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if(BUILD_SHARED_LIBS)
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/include
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
$<TARGET_FILE_DIR:onemkl>
)

Expand Down
1 change: 1 addition & 0 deletions src/sparse_blas/backends/mklcpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ target_include_directories(${LIB_OBJ}
PRIVATE ${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/bin
${ONEMKL_GENERATED_INCLUDE_PATH}
)

target_compile_options(${LIB_OBJ} PRIVATE ${ONEMKL_BUILD_COPT})
Expand Down

0 comments on commit 5d11998

Please sign in to comment.