Unverified Commit 6e16acd4 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon Committed by GitHub
Browse files

Merge pull request #1084 from chuckatkins/use-upstream-evpath

Use upstream evpath
parents b1e8aa0d ffbaa05b
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -63,24 +63,6 @@ cmake_dependent_option(BUILD_SHARED_LIBS
)
mark_as_advanced(BUILD_SHARED_LIBS)

# Setup PIC defaults.  If explicitly specified somehow, then default 
# to that.  Otherwise base the default on whether or not shared libs are even
# supported.
if(DEFINED EVPATH_ENABLE_PIC)
  set(EVPATH_ENABLE_PIC_DEFAULT ${EVPATH_ENABLE_PIC})
elseif(DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
  set(EVPATH_ENABLE_PIC_DEFAULT ${CMAKE_POSITION_INDEPENDENT_CODE})
else()
  set(EVPATH_ENABLE_PIC_DEFAULT ${SHARED_LIBS_SUPPORTED})
endif()
cmake_dependent_option(EVPATH_ENABLE_PIC
  "Build with Position Independent Code" ${EVPATH_ENABLE_PIC_DEFAULT}
  "SHARED_LIBS_SUPPORTED" OFF
)
mark_as_advanced(EVPATH_ENABLE_PIC)
set(CMAKE_POSITION_INDEPENDENT_CODE ${EVPATH_ENABLE_PIC})
mark_as_advanced(CMAKE_POSITION_INDEPENDENT_CODE)

if(MSVC)
  # Force to always compile with W4
  if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+44 −28
Original line number Diff line number Diff line
@@ -4,47 +4,63 @@
#  LIBFABRIC_FOUND - System has libfabric
#  LIBFABRIC_INCLUDE_DIRS - The libfabric include directories
#  LIBFABRIC_LIBRARIES - The libraries needed to use libfabric
#  LIBFABRIC_DEFINITIONS - The extra CFLAGS needed to use libfabric

######################################################
set(LIBFABRIC_PREFIX "" CACHE STRING "Help cmake to find libfabric library (https://github.com/ofiwg/libfabric) into your system.")
mark_as_advanced(LIBFABRIC_PREFIX)
if(NOT LIBFABRIC_ROOT AND "$ENV{LIBFABRIC_ROOT}" STREQUAL "")
  set(LIBFABRIC_ROOT ${LIBFABRIC_PREFIX})

# This is a bit of a wierd pattern but it allows to bypass pkg-config and
# manually specify library information
if(NOT (PC_LIBFABRIC_FOUND STREQUAL "IGNORE"))
  find_package(PkgConfig)
  if(PKG_CONFIG_FOUND)
    set(_CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH})
    if(LIBFABRIC_ROOT)
      list(INSERT CMAKE_PREFIX_PATH 0 "${LIBFABRIC_ROOT}")
    elseif(NOT ENV{LIBFABRIC_ROOT} STREQUAL "")
      list(INSERT CMAKE_PREFIX_PATH 0 "$ENV{LIBFABRIC_ROOT}")
    endif()
    set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON)

    pkg_check_modules(PC_LIBFABRIC libfabric)

    set(CMAKE_PREFIX_PATH ${_CMAKE_PREFIX_PATH})
    unset(_CMAKE_PREFIX_PATH)
if(POLICY CMP0074)
  cmake_policy(SET CMP0074 NEW)

    if(PC_LIBFABRIC_FOUND)
      if(BUILD_SHARED_LIBS)
        set(_PC_TYPE)
      else()
  if(NOT LIBFABRIC_ROOT)
    set(LIBFABRIC_ROOT "$ENV{LIBFABRIC_ROOT}")
        set(_PF_TYPE _STATIC)
      endif()
  if(LIBFABRIC_ROOT)
    set(_CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH})
    list(INSERT CMAKE_PREFIX_PATH 0 ${LIBFABRIC_ROOT})
      set(LIBFABRIC_INCLUDE_DIRS ${PC_LIBFABRIC${_PC_TYPE}_INCLUDE_DIRS})
      set(LIBFABRIC_LIBRARIES ${PC_LIBFABRIC${_PC_TYPE}_LDFLAGS})
      set(LIBFABRIC_DEFINITIONS ${PC_LIBFABRIC${PC_TYPE}_CFLAGS_OTHER})
    endif()
  endif()

find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
  set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE)
  pkg_check_modules(LIBFABRIC IMPORTED_TARGET libfabric)
endif()

if(_CMAKE_PREFIX_PATH)
  set(CMAKE_PREFIX_PATH ${_CMAKE_PREFIX_PATH})
  unset(_CMAKE_PREFIX_PATH)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(LIBFABRIC DEFAULT_MSG LIBFABRIC_LIBRARIES)

if(LIBFABRIC_FOUND)
  if(NOT TARGET libfabric::libfabric)
    add_library(libfabric::libfabric INTERFACE IMPORTED)
    if(NOT BUILD_SHARED_LIBS AND TARGET PkgConfig::LIBFABRIC-static)
    if(LIBFABRIC_INCLUDE_DIRS)
      set_target_properties(libfabric::libfabric PROPERTIES
        INTERFACE_LINK_LIBRARIES PkgConfig::LIBFABRIC-static)
    else()
        INTERFACE_INCLUDE_DIRECTORIES "${LIBFABRIC_INCLUDE_DIRS}"
      )
    endif()
    if(LIBFABRIC_DEFINITIONS)
      set_target_properties(libfabric::libfabric PROPERTIES
        INTERFACE_COMPILE_OPTIONS     "${LIBFABRIC_DEFINITIONS}"
      )
    endif()
    if(LIBFABRIC_LIBRARIES)
      set_target_properties(libfabric::libfabric PROPERTIES
        INTERFACE_LINK_LIBRARIES PkgConfig::LIBFABRIC)
        INTERFACE_LINK_LIBRARIES      "${LIBFABRIC_LIBRARIES}"
      )
    endif()
  endif()
endif()
+0 −11
Original line number Diff line number Diff line
#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0.  See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#

# This module is already included in new versions of CMake
if(CMAKE_VERSION VERSION_LESS 3.12)
  include(${CMAKE_CURRENT_LIST_DIR}/upstream/FindPkgConfig.cmake)
else()
  include(${CMAKE_ROOT}/Modules/FindPkgConfig.cmake)
endif()
+0 −732

File deleted.

Preview size limit exceeded, changes collapsed.

+2 −4
Original line number Diff line number Diff line
@@ -7,10 +7,8 @@ shopt -s dotglob
readonly name="EVPath"
readonly ownership="EVPath Upstream <robot@adios2>"
readonly subtree="thirdparty/EVPath/EVPath"
#readonly repo="https://github.com/GTkorvo/EVPath.git"
#readonly tag="master"
readonly repo="https://github.com/chuckatkins/EVPath.git"
readonly tag="leave-rpath-alone"
readonly repo="https://github.com/GTkorvo/EVPath.git"
readonly tag="master"
readonly shortlog="true"
readonly paths="
"