From 49001f34762ba687703c42fdd715a2fb94cedf1f Mon Sep 17 00:00:00 2001 From: Clara Levante Date: Thu, 11 Jan 2024 20:19:06 +0100 Subject: [PATCH] each lib include libs path is relative to its own dir --- libs/cartesiandomain/CMakeLists.txt | 2 +- libs/coupldyn_cvode/CMakeLists.txt | 2 +- libs/coupldyn_fromfile/CMakeLists.txt | 2 +- libs/gridboxes/CMakeLists.txt | 2 +- libs/initialise/CMakeLists.txt | 2 +- libs/observers/CMakeLists.txt | 2 +- libs/runcleo/CMakeLists.txt | 2 +- libs/zarr/CMakeLists.txt | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/cartesiandomain/CMakeLists.txt b/libs/cartesiandomain/CMakeLists.txt index d01285b20..4e19077dd 100644 --- a/libs/cartesiandomain/CMakeLists.txt +++ b/libs/cartesiandomain/CMakeLists.txt @@ -39,7 +39,7 @@ add_library("${LIBNAME}" SHARED ${SOURCES}) # add directories to include for target target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") -target_include_directories(${LIBNAME} PRIVATE "${CMAKE_SOURCE_DIR}/libs") +target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../libs") # link libraries in libs to this target set(LINKLIBS initialise superdrops gridboxes) diff --git a/libs/coupldyn_cvode/CMakeLists.txt b/libs/coupldyn_cvode/CMakeLists.txt index 49171e506..576cce220 100644 --- a/libs/coupldyn_cvode/CMakeLists.txt +++ b/libs/coupldyn_cvode/CMakeLists.txt @@ -49,7 +49,7 @@ add_library("${LIBNAME}" SHARED ${SOURCES}) # add directories to include for target target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") -target_include_directories(${LIBNAME} PRIVATE "${CMAKE_SOURCE_DIR}/libs") +target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../libs") # link libraries in libs to this target set(LINKLIBS initialise superdrops gridboxes) diff --git a/libs/coupldyn_fromfile/CMakeLists.txt b/libs/coupldyn_fromfile/CMakeLists.txt index 907a6062c..8bbff0c10 100644 --- a/libs/coupldyn_fromfile/CMakeLists.txt +++ b/libs/coupldyn_fromfile/CMakeLists.txt @@ -22,7 +22,7 @@ add_library("${LIBNAME}" SHARED ${SOURCES}) # add directories to include for target target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") -target_include_directories(${LIBNAME} PRIVATE "${CMAKE_SOURCE_DIR}/libs") +target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../libs") # link libraries in libs to this target set(LINKLIBS initialise gridboxes superdrops) diff --git a/libs/gridboxes/CMakeLists.txt b/libs/gridboxes/CMakeLists.txt index 8f7fdffea..9fac7ad37 100644 --- a/libs/gridboxes/CMakeLists.txt +++ b/libs/gridboxes/CMakeLists.txt @@ -42,7 +42,7 @@ add_library("${LIBNAME}" SHARED ${SOURCES}) # add directories to include for target target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") -target_include_directories(${LIBNAME} PRIVATE "${CMAKE_SOURCE_DIR}/libs") +target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../libs") # link libraries in libs to this target set(LINKLIBS superdrops) diff --git a/libs/initialise/CMakeLists.txt b/libs/initialise/CMakeLists.txt index 30079d52a..7696e1b1b 100644 --- a/libs/initialise/CMakeLists.txt +++ b/libs/initialise/CMakeLists.txt @@ -42,7 +42,7 @@ add_library("${LIBNAME}" SHARED ${SOURCES}) # add directories to include for targets target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") -target_include_directories(${LIBNAME} PRIVATE "${CMAKE_SOURCE_DIR}/libs") +target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../libs") # link libraries in libs to this target target_link_libraries(${LIBNAME} PUBLIC Kokkos::kokkos) diff --git a/libs/observers/CMakeLists.txt b/libs/observers/CMakeLists.txt index e3c37b075..db66da9fa 100644 --- a/libs/observers/CMakeLists.txt +++ b/libs/observers/CMakeLists.txt @@ -40,7 +40,7 @@ add_library(${LIBNAME} SHARED ${SOURCES}) # add directories to include for target target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") -target_include_directories(${LIBNAME} PRIVATE "${CMAKE_SOURCE_DIR}/libs") +target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../libs") # link libraries in libs to this target set(LINKLIBS gridboxes superdrops zarr) diff --git a/libs/runcleo/CMakeLists.txt b/libs/runcleo/CMakeLists.txt index cdfd7fa68..443473728 100644 --- a/libs/runcleo/CMakeLists.txt +++ b/libs/runcleo/CMakeLists.txt @@ -38,7 +38,7 @@ add_library("${LIBNAME}" SHARED ${SOURCES}) # add directories to include for target target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") -target_include_directories(${LIBNAME} PRIVATE "${CMAKE_SOURCE_DIR}/libs") +target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../libs") # link libraries in libs to this target # Set libraries and compiler warnings to use diff --git a/libs/zarr/CMakeLists.txt b/libs/zarr/CMakeLists.txt index 74ea40cb1..4dcc401c7 100644 --- a/libs/zarr/CMakeLists.txt +++ b/libs/zarr/CMakeLists.txt @@ -21,7 +21,7 @@ add_library(${LIBNAME} SHARED ${SOURCES}) # add directories to include for target target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") -target_include_directories(${LIBNAME} PRIVATE "${CMAKE_SOURCE_DIR}/libs") +target_include_directories(${LIBNAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../libs") # some compilation properties set_target_properties(${LIBNAME} PROPERTIES