From bb2797fef3bffc61bf43a086208aa0c039cefc5c Mon Sep 17 00:00:00 2001 From: Tahmid Khan <60913202+ta7mid@users.noreply.github.com> Date: Mon, 29 Dec 2025 21:09:21 +0600 Subject: [PATCH 1/2] [CMake] fix: link `ga++` to `ga` and export it as `GlobalArrays::ga++` --- CMakeLists.txt | 2 +- ga++/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c29b4c5ab..d38998c5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -494,7 +494,7 @@ install(TARGETS ma ga_src ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -install(TARGETS ga +install(TARGETS ga ga++ EXPORT globalarrays-targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/ga++/CMakeLists.txt b/ga++/CMakeLists.txt index 28765dcac..764796cbc 100644 --- a/ga++/CMakeLists.txt +++ b/ga++/CMakeLists.txt @@ -77,7 +77,7 @@ set (_gapp_inc_dirs ${CMAKE_CURRENT_BINARY_DIR} target_include_directories(ga++ BEFORE PRIVATE ${_gapp_inc_dirs}) -target_link_libraries(ga++) +target_link_libraries(ga++ PUBLIC ga) install (TARGETS ga++ From 93233d3457c36c4382e143e500b03bd5756fec18 Mon Sep 17 00:00:00 2001 From: Tahmid Khan <60913202+ta7mid@users.noreply.github.com> Date: Mon, 29 Dec 2025 22:11:08 +0600 Subject: [PATCH 2/2] [CMake] fix: install `ga++` only if `ENABLE_CXX` --- CMakeLists.txt | 10 +++++++++- ga++/CMakeLists.txt | 5 ----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d38998c5e..02ef6212a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -494,12 +494,20 @@ install(TARGETS ma ga_src ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -install(TARGETS ga ga++ +install(TARGETS ga EXPORT globalarrays-targets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) +if(ENABLE_CXX) + install(TARGETS ga++ + EXPORT globalarrays-targets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +endif() + #Export the targets to a script install(EXPORT globalarrays-targets FILE diff --git a/ga++/CMakeLists.txt b/ga++/CMakeLists.txt index 764796cbc..b46f6cd31 100644 --- a/ga++/CMakeLists.txt +++ b/ga++/CMakeLists.txt @@ -79,11 +79,6 @@ target_include_directories(ga++ BEFORE PRIVATE ${_gapp_inc_dirs}) target_link_libraries(ga++ PUBLIC ga) -install (TARGETS - ga++ - DESTINATION lib -) - function(gapp_add_parallel_test test_name test_srcs) get_filename_component(_test_name_only "${test_name}" NAME) ga_add_parallel_test(${test_name} ${test_srcs})