From a7c28ddc586309f4ca51e6e9adf0210a3c043ba5 Mon Sep 17 00:00:00 2001 From: Lijun Zhu Date: Tue, 9 Feb 2021 09:40:35 -0800 Subject: [PATCH] GPU modules: add GPU_ACC_ENABLED flag to cmake --- components/zerodop/GPUampcor/CMakeLists.txt | 5 ++++- components/zerodop/GPUgeo2rdr/CMakeLists.txt | 5 ++++- components/zerodop/GPUresampslc/CMakeLists.txt | 3 +++ components/zerodop/GPUtopozero/CMakeLists.txt | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/components/zerodop/GPUampcor/CMakeLists.txt b/components/zerodop/GPUampcor/CMakeLists.txt index 6c6b95a..c9b30a8 100644 --- a/components/zerodop/GPUampcor/CMakeLists.txt +++ b/components/zerodop/GPUampcor/CMakeLists.txt @@ -11,9 +11,12 @@ cython_add_module(GPUampcor src/AmpcorFFT.cpp src/AmpcorMethods.cpp ) -target_include_directories(GPUampcor PUBLIC +target_include_directories(GPUampcor PRIVATE include ) +target_compile_definitions(GPUampcor PRIVATE + GPU_ACC_ENABLED + ) target_link_libraries(GPUampcor PRIVATE CUDA::cublas isce2::DataAccessorLib diff --git a/components/zerodop/GPUgeo2rdr/CMakeLists.txt b/components/zerodop/GPUgeo2rdr/CMakeLists.txt index 531fb8a..07afdef 100644 --- a/components/zerodop/GPUgeo2rdr/CMakeLists.txt +++ b/components/zerodop/GPUgeo2rdr/CMakeLists.txt @@ -8,9 +8,12 @@ cython_add_module(GPUgeo2rdr src/Orbit.cpp src/Poly1d.cpp ) -target_include_directories(GPUgeo2rdr PUBLIC +target_include_directories(GPUgeo2rdr PRIVATE include ) +target_compile_definitions(GPUgeo2rdr PRIVATE + GPU_ACC_ENABLED + ) target_link_libraries(GPUgeo2rdr PRIVATE isce2::DataAccessorLib ) diff --git a/components/zerodop/GPUresampslc/CMakeLists.txt b/components/zerodop/GPUresampslc/CMakeLists.txt index 4dbb1bf..c1749d0 100644 --- a/components/zerodop/GPUresampslc/CMakeLists.txt +++ b/components/zerodop/GPUresampslc/CMakeLists.txt @@ -9,6 +9,9 @@ cython_add_module(GPUresampslc target_include_directories(GPUresampslc PRIVATE include ) +target_compile_definitions(GPUresampslc PRIVATE + GPU_ACC_ENABLED + ) target_link_libraries(GPUresampslc PRIVATE isce2::DataAccessorLib OpenMP::OpenMP_CXX diff --git a/components/zerodop/GPUtopozero/CMakeLists.txt b/components/zerodop/GPUtopozero/CMakeLists.txt index f019e20..855a08a 100644 --- a/components/zerodop/GPUtopozero/CMakeLists.txt +++ b/components/zerodop/GPUtopozero/CMakeLists.txt @@ -16,6 +16,9 @@ cython_add_module(GPUtopozero target_include_directories(GPUtopozero PRIVATE include ) +target_compile_definitions(GPUtopozero PRIVATE + GPU_ACC_ENABLED + ) target_link_libraries(GPUtopozero PRIVATE isce2::DataAccessorLib OpenMP::OpenMP_CXX