Commit 956958b6 authored by Alberto Miranda's avatar Alberto Miranda ♨️
Browse files

Merge branch 'amiranda/110-refactor-api-rpc_types-c-h' into 'main'

Resolve "Refactor api/rpc_types.[c|h]"

Closes #110

See merge request !80
parents c6506535 98a7bcac
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -83,6 +83,8 @@ set(CMAKE_SHARED_LINKER_FLAGS_ASAN
set_property(GLOBAL APPEND PROPERTY DEBUG_CONFIGURATIONS Debug)
set_property(GLOBAL APPEND PROPERTY DEBUG_CONFIGURATIONS ASan)

set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ list(APPEND examples_c

add_library(c_examples_common STATIC)
target_sources(c_examples_common PUBLIC common.h PRIVATE common.c)
target_link_libraries(c_examples_common common::api::types)
target_link_libraries(c_examples_common libscord_c_types)

foreach(example IN LISTS examples_c)
  add_executable(${example}_c)
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ list(APPEND examples_cxx

add_library(cxx_examples_common STATIC)
target_sources(cxx_examples_common PUBLIC common.hpp PRIVATE common.cpp)
target_link_libraries(cxx_examples_common common::api::types)
target_link_libraries(cxx_examples_common libscord_cxx_types)

foreach(example IN LISTS examples_cxx)
  add_executable(${example}_cxx)
+0 −9
Original line number Diff line number Diff line
@@ -45,15 +45,6 @@ target_include_directories(_rpc_client INTERFACE
  ${CMAKE_CURRENT_SOURCE_DIR})
add_library(common::network::rpc_client ALIAS _rpc_client)

target_include_directories(_rpc_types INTERFACE
  ${CMAKE_CURRENT_SOURCE_DIR})
add_library(common::network::rpc_types ALIAS _rpc_types)

add_subdirectory(api)
target_include_directories(_api_types INTERFACE
  ${CMAKE_CURRENT_SOURCE_DIR})
add_library(common::api::types ALIAS _api_types)

add_subdirectory(abt_cxx)
target_include_directories(_abt_cxx INTERFACE
  ${CMAKE_CURRENT_SOURCE_DIR})

src/common/api/CMakeLists.txt

deleted100644 → 0
+0 −35
Original line number Diff line number Diff line
################################################################################
# Copyright 2021-2022, Barcelona Supercomputing Center (BSC), Spain            #
#                                                                              #
# This software was partially supported by the EuroHPC-funded project ADMIRE   #
#   (Project ID: 956748, https://www.admire-eurohpc.eu).                       #
#                                                                              #
# This file is part of scord.                                                  #
#                                                                              #
# scord is free software: you can redistribute it and/or modify                #
# it under the terms of the GNU General Public License as published by         #
# the Free Software Foundation, either version 3 of the License, or            #
# (at your option) any later version.                                          #
#                                                                              #
# scord is distributed in the hope that it will be useful,                     #
# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
# GNU General Public License for more details.                                 #
#                                                                              #
# You should have received a copy of the GNU General Public License            #
# along with scord.  If not, see <https://www.gnu.org/licenses/>.              #
#                                                                              #
# SPDX-License-Identifier: GPL-3.0-or-later                                    #
################################################################################

add_library(_api_types STATIC)

target_sources(_api_types PUBLIC scord/types.h scord/types.hpp PRIVATE
  types.cpp convert.hpp convert.cpp scord/internal_types.hpp errors.c)

target_include_directories(_api_types PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

target_link_libraries(_api_types PRIVATE
  Margo::Margo common::logger PUBLIC fmt::fmt common::abt_cxx)

set_property(TARGET _api_types PROPERTY POSITION_INDEPENDENT_CODE ON)
Loading