Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • asapo/asapo
  • joao.alvim/asapo
  • philipp.middendorf/asapo
  • stefan.dietrich/asapo
4 results
Show changes
Showing
with 879 additions and 2250 deletions
function(cleanup varname)
string(REPLACE "-" "_" out ${${varname}})
SET(${varname} ${out} PARENT_SCOPE)
endfunction()
if (DEFINED ENV{CI_COMMIT_REF_NAME})
# this is gitlab CI
if (DEFINED ENV{CI_COMMIT_TAG})
# both refname and tag are defined - this is a tagged build
SET(ASAPO_VERSION $ENV{CI_COMMIT_TAG})
SET(PYTHON_ASAPO_VERSION ${ASAPO_VERSION})
SET(ASAPO_VERSION_COMMIT "")
SET(ASAPO_VERSION_DOCKER_TAG $ENV{CI_COMMIT_TAG})
SET(ASAPO_VERSION_DOCKER_SUFFIX "")
else ()
# tag is not defined, this is the developer build
SET(ASAPO_VERSION $ENV{CI_COMMIT_REF_NAME})
string(REPLACE "_" "-" ASAPO_VERSION ${ASAPO_VERSION})
SET(ASAPO_VERSION 100.0.${ASAPO_VERSION})
SET(PYTHON_ASAPO_VERSION 100.0.dev2)
SET(ASAPO_VERSION_COMMIT ", build $ENV{CI_COMMIT_SHORT_SHA}")
SET(ASAPO_VERSION_DOCKER_TAG $ENV{CI_COMMIT_SHORT_SHA})
SET(ASAPO_VERSION_DOCKER_SUFFIX "-dev")
endif ()
SET(ASAPO_VERSION_DOCKER_REPOSITORY $ENV{CI_REGISTRY_IMAGE})
SET(ASAPO_VERSION_DOCKER_REPOSITORY_USERNAME $ENV{CI_REGISTRY_IMAGE_USERNAME})
SET(ASAPO_VERSION_DOCKER_REPOSITORY_PASSWORD $ENV{CI_REGISTRY_IMAGE_PASSWORD})
message("Asapo Version: " ${ASAPO_VERSION})
message("Python Asapo Version: " ${PYTHON_ASAPO_VERSION})
message("Asapo commit: " ${ASAPO_VERSION_COMMIT})
return ()
endif ()
# Enable running CMake from a directory which is not a subdirectory of
# ${CMAKE_SOURCE_DIR}. See https://git-scm.com/docs/git#Documentation/git.txt--Cltpathgt
# for more information on `git -C <path>`.
set(GIT_CMD git -C "${CMAKE_SOURCE_DIR}")
execute_process(COMMAND ${GIT_CMD} describe --tags --abbrev=0
OUTPUT_VARIABLE ASAPO_TAG
WORKING_DIRECTORY ..)
string(STRIP ${ASAPO_TAG} ASAPO_TAG)
execute_process(COMMAND ${GIT_CMD} rev-parse --abbrev-ref HEAD
OUTPUT_VARIABLE BRANCH
WORKING_DIRECTORY ..)
string(STRIP ${BRANCH} BRANCH)
cleanup(BRANCH)
execute_process(COMMAND ${GIT_CMD} rev-parse --short=10 HEAD
OUTPUT_VARIABLE ASAPO_VERSION_COMMIT
WORKING_DIRECTORY ..)
string(STRIP ${ASAPO_VERSION_COMMIT} ASAPO_VERSION_COMMIT)
if (${BRANCH} STREQUAL "master")
SET(ASAPO_VERSION ${ASAPO_TAG})
SET(ASAPO_VERSION_COMMIT "")
SET(ASAPO_VERSION_DOCKER_SUFFIX "")
SET(PYTHON_ASAPO_VERSION ${ASAPO_VERSION})
string(REGEX REPLACE "\\.0([0-9]+)\\."
".\\1." ASAPO_WHEEL_VERSION
${ASAPO_VERSION})
else ()
SET(ASAPO_VERSION ${BRANCH})
SET(ASAPO_VERSION_COMMIT ", build ${ASAPO_VERSION_COMMIT}")
SET(ASAPO_VERSION_DOCKER_SUFFIX "-dev")
string(REPLACE "_" "-" ASAPO_VERSION ${ASAPO_VERSION})
SET(ASAPO_VERSION 100.0.${ASAPO_VERSION})
if (${BRANCH} STREQUAL "develop")
SET(PYTHON_ASAPO_VERSION 100.0.dev0)
else ()
string(FIND ${BRANCH} feature_ASAPO pos)
if( ${pos} EQUAL 0)
string(SUBSTRING ${ASAPO_VERSION} 20 -1 TMP)
string(REGEX MATCH "^([0-9]+)|.+$" ISSUE_NUM "${TMP}")
if (ISSUE_NUM STREQUAL "")
SET(PYTHON_ASAPO_VERSION 100.0.dev2)
else ()
SET(PYTHON_ASAPO_VERSION 100.0.dev${ISSUE_NUM})
endif ()
else ()
SET(PYTHON_ASAPO_VERSION 100.0.dev2)
endif ()
endif ()
SET(ASAPO_WHEEL_VERSION ${ASAPO_VERSION})
endif ()
SET(ASAPO_VERSION_DOCKER_REPOSITORY yakser)
SET(ASAPO_VERSION_DOCKER_REPOSITORY_USERNAME "")
SET(ASAPO_VERSION_DOCKER_REPOSITORY_PASSWORD "")
SET(ASAPO_VERSION_DOCKER_TAG ${ASAPO_VERSION})
message("Asapo Version: " ${ASAPO_VERSION})
message("Python Asapo Version: " ${PYTHON_ASAPO_VERSION})
message("Asapo commit: " ${ASAPO_VERSION_COMMIT})
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.7)
project(ASAPO)
set(CMAKE_CXX_STANDARD 11)
IF(WIN32)
set(CMAKE_CXX_FLAGS_DEBUG "/MTd")
set(CMAKE_CXX_FLAGS_RELEASE "/MT")
add_definitions(-DWIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
ELSEIF(CMAKE_C_COMPILER_ID STREQUAL "GNU")
SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
#todo: added fPIC to be able to create shared libs for Python - check it does not change performance
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC")
SET(BUILD_SHARED_LIBS OFF)
ENDIF(WIN32)
#TODO: Better way then GLOBAL PROPERTY
IF(WIN32)
find_package(Threads REQUIRED)
SET_PROPERTY(GLOBAL PROPERTY ASAPO_COMMON_IO_LIBRARIES ${CMAKE_THREAD_LIBS_INIT} wsock32 ws2_32)
ELSEIF(UNIX)
SET_PROPERTY(GLOBAL PROPERTY ASAPO_COMMON_IO_LIBRARIES Threads::Threads)
ENDIF(WIN32)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DUNIT_TESTS)
endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
option(BUILD_TESTS "Uses googletest to build tests" OFF)
option(BUILD_INTEGRATION_TESTS "Include integration tests (CMAKE >3.7 is needed)" OFF)
option(BUILD_DOCS "Uses doxygen to build the documentaion" OFF)
option(BUILD_BROKER "Build broker" OFF)
option(BUILD_PYTHON_DOCS "Uses sphinx to build the Python documentaion" OFF)
option(BUILD_CONSUMER_TOOLS "Build consumer tools" OFF)
option(BUILD_EXAMPLES "Build examples" OFF)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules/ ${PROJECT_SOURCE_DIR}/CMakeIncludes/)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules/)
#protocol version changes if one of the microservice API's change
set (ASAPO_CONSUMER_PROTOCOL "v0.7")
set (ASAPO_PRODUCER_PROTOCOL "v0.7")
set (ASAPO_DISCOVERY_API_VER "v0.1")
set (ASAPO_AUTHORIZER_API_VER "v0.2")
set (ASAPO_BROKER_API_VER "v0.7")
set (ASAPO_FILE_TRANSFER_SERVICE_API_VER "v0.2")
set (ASAPO_RECEIVER_API_VER "v0.7")
set (ASAPO_RDS_API_VER "v0.1")
set (DB_SCHEMA_VER "v0.1") # TODO: Remove later.
set (ASAPO_CXX_COMMON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/common/cpp/include)
#global settings
find_package (Threads)
set(ConfigPackageLocation lib/cmake/Asapo)
set (CMAKE_PREFIX_PATH "${LIBCURL_DIR}")
find_package (CURL REQUIRED)
message (STATUS "Found cURL libraries: ${CURL_LIBRARIES}")
message (STATUS "cURL include: ${CURL_INCLUDE_DIRS}")
# options
# format sources
include(astyle)
option(BUILD_PYTHON "Build python libs" ON)
include(prepare_version_tag)
option(BUILD_CLIENTS_ONLY "Build clients only" OFF)
include(testing_cpp)
option(BUILD_CONSUMER_TOOLS "Build consumer tools" OFF)
option(BUILD_EVENT_MONITOR_PRODUCER "Build the event monitor producer" OFF)
include(prepare_asapo)
option(BUILD_TESTS "Build unit tests" OFF)
option(BUILD_INTEGRATION_TESTS "Include integration tests" OFF)
if(BUILD_CONSUMER_TOOLS)
set (BUILD_MONGODB_CLIENTLIB ON)
endif()
option(BUILD_EXAMPLES "Build examples" OFF)
option(INSTALL_EXAMPLES "Install examples" OFF)
add_subdirectory(common/cpp)
option(STOP_BUILD_ON_WARNINGS "Stop build if compiler has warnings" OFF)
if (BUILD_BROKER)#TODO: Somehow make it clear that this is needed by examples/consumer/getnext_broker
add_subdirectory(broker)
endif()
option(BUILD_CPP_DOCS "Build the C++ documentaion with doxygen" OFF)
option(BUILD_PYTHON_DOCS "Build the Python documentaion with sphinx" OFF)
option(BUILD_ASAPO_SITE "Build the asapo web site" OFF)
add_subdirectory(producer)
option(ENABLE_LIBFABRIC "Enables LibFabric support for RDMA transfers" OFF)
option(ENABLE_LIBFABRIC_LOCALHOST "Emulates LibFabric stack over TCP. Only for localhost and testing purposes." OFF)
add_subdirectory(consumer)
option(ENABLE_NEW_RECEIVER_MONITORING "Enables the new monitoring for the receiver, but requires gRPC" OFF)
add_subdirectory(receiver)
option(BUILD_SHARED_CLIENT_LIBS "Build shared consumer and producer libs" ON)
option(BUILD_STATIC_CLIENT_LIBS "Build static consumer and producer libs" ON)
add_subdirectory(discovery)
# includes
add_subdirectory(authorizer)
include(language_settings)
include(dependencies)
add_subdirectory(asapo_tools)
include(astyle)
add_subdirectory(deploy)
include(prepare_version_tag)
include(testing_cpp)
include(prepare_asapo)
include(prepare_version)
include(packaging)
#subdirectorties
if(BUILD_INTEGRATION_TESTS)
add_subdirectory(tests)
add_subdirectory(common/cpp)
add_subdirectory(producer)
add_subdirectory(consumer)
if (NOT BUILD_CLIENTS_ONLY)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND GO_OPTS -gcflags "all=-N -l")
endif()
add_subdirectory(broker)
add_subdirectory(receiver)
add_subdirectory(discovery)
add_subdirectory(authorizer)
add_subdirectory(asapo_tools)
add_subdirectory(file_transfer)
add_subdirectory(monitoring)
endif()
if(BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
add_subdirectory(deploy)
if(BUILD_DOCS)
include(doxygen)
if(BUILD_INTEGRATION_TESTS)
add_subdirectory(tests)
endif()
if(BUILD_PYTHON_DOCS)
add_subdirectory (sphinx)
if(BUILD_EXAMPLES OR INSTALL_EXAMPLES OR BUILD_ASAPO_SITE)
add_subdirectory(examples)
endif()
add_subdirectory(docs)
include(prepare_version)
\ No newline at end of file
add_subdirectory(install)
This diff is collapsed.
# FindLibFabric
# -------------
#
# Tries to find LibFabric on the system
#
# Available variables
# LIBFABRIC_LIBRARY - Path to the library
# LIBFABRIC_INCLUDE_DIR - Path to the include dir
find_path(LIBFABRIC_INCLUDE_DIR "rdma/fabric.h" HINT ENV LIBFABRIC_INCLUDE_DIR)
if(NOT LIBFABRIC_INCLUDE_DIR)
message(FATAL_ERROR "Could not find libfabric include directory that contains 'rdma/fabric.h'")
endif()
find_library(LIBFABRIC_LIBRARY fabric)
mark_as_advanced(LIBFABRIC_INCLUDE_DIR LIBFABRIC_LIBRARY)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -77,4 +77,4 @@ macro(select_library_configurations basename)
mark_as_advanced( ${basename}_LIBRARY_RELEASE
${basename}_LIBRARY_DEBUG
)
endmacro()
\ No newline at end of file
endmacro()
......@@ -18,9 +18,8 @@ if (( coverage < ASAPO_MINIMUM_COVERAGE )); then
echo "*****"
echo
echo ${TARGET} coverage is ${coverage}% - less than required ${ASAPO_MINIMUM_COVERAGE}%
echo
echo
echo "*****"
echo
exit 1
fi
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.