From a0377dba5e36c67e2c01c7925012113d79210436 Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Tue, 25 Feb 2025 11:01:51 +0100
Subject: [PATCH] cmake_morse: update to ast revision

---
 CMakeLists.txt                | 28 ++++++++++++++--------------
 cmake_modules/morse_cmake     |  2 +-
 runtime/openmp/CMakeLists.txt |  2 +-
 runtime/parsec/CMakeLists.txt |  2 +-
 runtime/quark/CMakeLists.txt  |  2 +-
 runtime/starpu/CMakeLists.txt |  2 +-
 6 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 40961d134..74a0584a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -349,7 +349,7 @@ endif()
 # Add math library (libm), searched with MORSE module FindM.cmake
 # it normally exists on all common systems provided with a C compiler
 find_package(M REQUIRED)
-morse_export_imported_target(MORSE M m chameleon)
+morse_export_imported_target(MORSE::M m chameleon)
 
 # If simulation we don't enter in kernel functions so that we don't need to link
 # with concerned libraries
@@ -366,12 +366,12 @@ if(NOT CHAMELEON_SIMULATION)
     # CHAMELEON depends on CBLAS
     #---------------------------
     find_package(CBLAS REQUIRED)
-    morse_export_imported_target(MORSE CBLAS cblas chameleon)
+    morse_export_imported_target(MORSE::CBLAS cblas chameleon)
 
     # CHAMELEON depends on LAPACKE
     #-----------------------------
     find_package(LAPACKE REQUIRED)
-    morse_export_imported_target(MORSE LAPACKE lapacke chameleon)
+    morse_export_imported_target(MORSE::LAPACKE lapacke chameleon)
 
     # CHAMELEON depends on CUDA/CUBLAS
     #----------------------------------
@@ -418,8 +418,8 @@ if(NOT CHAMELEON_SIMULATION)
                 "\n   CUDA_LIBRARIES to be found. Be sure you have"
                 "\n   libcuda with your distribution of CUDA.")
             endif()
-            morse_export_imported_target(CUDA CUDA cuda chameleon)
-            morse_export_imported_target(CUDA CUBLAS cublas chameleon)
+            morse_export_imported_target(CUDA::CUDA cuda chameleon)
+            morse_export_imported_target(CUDA::CUBLAS cublas chameleon)
         endif (CUDA_FOUND)
 
     endif(CHAMELEON_USE_CUDA)
@@ -531,13 +531,13 @@ if(NOT CHAMELEON_SIMULATION)
             message("-- HIPBLAS include path:  ${HIPBLAS_INCLUDE_DIRS}")
             message("-- HIPBLAS libraries:     ${HIPBLAS_LIBRARIES}")
 
-            morse_export_imported_target(HIP HIP hip chameleon)
-            morse_export_imported_target(HIP HIPBLAS hipblas chameleon)
+            morse_export_imported_target(HIP::HIP hip chameleon)
+            morse_export_imported_target(HIP::HIPBLAS hipblas chameleon)
             if (CHAMELEON_USE_HIP_ROC)
-                morse_export_imported_target(roc hipblas rochipblas chameleon)
-                morse_export_imported_target(hip host hiphost chameleon)
-                morse_export_imported_target(hip device hipdevice chameleon)
-                morse_export_imported_target(hip amdhip64 hipamdhip64 chameleon)
+                morse_export_imported_target(roc::hipblas rochipblas chameleon)
+                morse_export_imported_target(hip::host hiphost chameleon)
+                morse_export_imported_target(hip::device hipdevice chameleon)
+                morse_export_imported_target(hip::amdhip64 hipamdhip64 chameleon)
             endif()
         else(HIP_FOUND)
             message(FATAL_ERROR "CHAMELEON_USE_HIP requires HIP to be found")
@@ -562,7 +562,7 @@ if(NOT CHAMELEON_SIMULATION)
             " - Activate MPI in Chameleon${ColourReset}")
         endif (MPI_C_FOUND)
 
-        morse_export_imported_target(MPI MPI_C mpi chameleon)
+        morse_export_imported_target(MPI::MPI_C mpi chameleon)
 
         if (CHAMELEON_SCHED STREQUAL "PARSEC")
           message(FATAL_ERROR "CHAMELEON does not support PARSEC with MPI."
@@ -656,7 +656,7 @@ else (NOT CHAMELEON_SIMULATION)
             " - Activate MPI in Chameleon${ColourReset}")
         endif (MPI_C_FOUND)
 
-        morse_export_imported_target(MPI MPI_C mpi chameleon)
+        morse_export_imported_target(MPI::MPI_C mpi chameleon)
 
     endif (CHAMELEON_USE_MPI)
 
@@ -791,7 +791,7 @@ endif()
 # Threads::Threads may be a dependency of BLAS/LAPACK and CUDA
 # the target may be required for cmake users linking with CHAMELEONconfig.cmake
 if (TARGET Threads::Threads)
-    morse_export_imported_target(Threads Threads threads chameleon)
+    morse_export_imported_target(Threads::Threads threads chameleon)
 endif()
 
 # see https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html
diff --git a/cmake_modules/morse_cmake b/cmake_modules/morse_cmake
index c265c5576..bc34cfd2c 160000
--- a/cmake_modules/morse_cmake
+++ b/cmake_modules/morse_cmake
@@ -1 +1 @@
-Subproject commit c265c55769a590190c18664c034d68d446036a13
+Subproject commit bc34cfd2ce19d525e2e6a82b7ec6c8bca45e2c97
diff --git a/runtime/openmp/CMakeLists.txt b/runtime/openmp/CMakeLists.txt
index e311d7dbe..2c38e04ed 100644
--- a/runtime/openmp/CMakeLists.txt
+++ b/runtime/openmp/CMakeLists.txt
@@ -29,7 +29,7 @@
 cmake_minimum_required(VERSION 3.5)
 
 find_package(OpenMP REQUIRED)
-morse_export_imported_target(OpenMP OpenMP_C openmp chameleon)
+morse_export_imported_target(OpenMP::OpenMP_C openmp chameleon)
 
 if ( OPENMP_FOUND )
   message("-- ${Blue}Add definition CHAMELEON_SCHED_OPENMP"
diff --git a/runtime/parsec/CMakeLists.txt b/runtime/parsec/CMakeLists.txt
index 9868806d6..6eb87893f 100644
--- a/runtime/parsec/CMakeLists.txt
+++ b/runtime/parsec/CMakeLists.txt
@@ -29,7 +29,7 @@
 cmake_minimum_required(VERSION 3.5)
 
 find_package( PARSEC REQUIRED )
-morse_export_imported_target(MORSE PARSEC parsec chameleon)
+morse_export_imported_target(MORSE::PARSEC parsec chameleon)
 
 if(PARSEC_FOUND)
   message("-- ${Blue}Add definition CHAMELEON_SCHED_PARSEC"
diff --git a/runtime/quark/CMakeLists.txt b/runtime/quark/CMakeLists.txt
index 6c4b27817..309fdd2f7 100644
--- a/runtime/quark/CMakeLists.txt
+++ b/runtime/quark/CMakeLists.txt
@@ -29,7 +29,7 @@
 cmake_minimum_required(VERSION 3.5)
 
 find_package( QUARK REQUIRED COMPONENTS HWLOC )
-morse_export_imported_target(MORSE QUARK quark chameleon)
+morse_export_imported_target(MORSE::QUARK quark chameleon)
 
 # Add definition and include_dir if found
 if(QUARK_FOUND)
diff --git a/runtime/starpu/CMakeLists.txt b/runtime/starpu/CMakeLists.txt
index b7313a36f..2fe6b9666 100644
--- a/runtime/starpu/CMakeLists.txt
+++ b/runtime/starpu/CMakeLists.txt
@@ -50,7 +50,7 @@ if (_DEFS)
 endif()
 # -------------------------------------------------------------
 
-morse_export_imported_target(MORSE STARPU starpu chameleon)
+morse_export_imported_target(MORSE::STARPU starpu chameleon)
 
 # check available functions
 # note: recall STARPU_VERSION provides the version
-- 
GitLab