Skip to content

Commit

Permalink
cmi to CMI upper case
Browse files Browse the repository at this point in the history
  • Loading branch information
Kooky089 committed Apr 6, 2020
1 parent 0093164 commit b8cdb20
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(MMA_VER 1.0.0)
set(MMA_SO_VER 1)
project(mma VERSION ${MMA_VER} LANGUAGES C)

set(CMI_DOWNLOAD_TAG 34e7114e7d964d224ab0227cb8dabed6cd024d4d)
set(CMI_DOWNLOAD_TAG 364b54e0200459f446190a94d177d27317d9447b)
include(cmi.cmake)

# Optional Fortran
Expand Down
24 changes: 12 additions & 12 deletions cmi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

cmake_minimum_required(VERSION 3.8)

set(CMI_TAG "34e7114e7d964d224ab0227cb8dabed6cd024d4d")
set(CMI_TAG "364b54e0200459f446190a94d177d27317d9447b")

get_property(CMI_LOADER_FILE GLOBAL PROPERTY CMI_LOADER_FILE)
# First include
Expand Down Expand Up @@ -838,17 +838,17 @@ function(cmi_find_mpi)

# Handle components
foreach(COMPONENT IN LISTS _COMPONENTS)
if(NOT TARGET cmi_MPI_${COMPONENT})
if(NOT TARGET CMI_MPI_${COMPONENT})
set(CMAKE_REQUIRED_INCLUDES ${MPI_INCLUDE})
set(CMAKE_REQUIRED_LIBRARIES ${MPI_LIB})
check_mpi(${COMPONENT} MPI_${COMPONENT}_COMPILES)
unset(CMAKE_REQUIRED_INCLUDES)
unset(CMAKE_REQUIRED_LIBRARIES)
if(MPI_${COMPONENT}_COMPILES)
add_library(cmi_MPI_${COMPONENT} INTERFACE)
set_property(TARGET cmi_MPI_${COMPONENT} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${MPI_INCLUDE}")
set_property(TARGET cmi_MPI_${COMPONENT} PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_LIB}")
add_library(cmi::MPI_${COMPONENT} ALIAS cmi_MPI_${COMPONENT})
add_library(CMI_MPI_${COMPONENT} INTERFACE)
set_property(TARGET CMI_MPI_${COMPONENT} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${MPI_INCLUDE}")
set_property(TARGET CMI_MPI_${COMPONENT} PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_LIB}")
add_library(CMI::MPI_${COMPONENT} ALIAS CMI_MPI_${COMPONENT})
else()
unset(MPI_${COMPONENT}_COMPILES CACHE)
list(APPEND CMI_MPI_MISSING ${COMPONENT})
Expand Down Expand Up @@ -940,13 +940,13 @@ endmacro()
function(cmi_find_omp)
cmi_Fortran_append(OMP_FLAGS_ OMP)
string(STRIP "${OMP_FLAGS_}" OMP_FLAGS_)
if(NOT TARGET cmi_OpenMP_Fortran)
add_library(cmi_OpenMP_Fortran INTERFACE)
set_property(TARGET cmi_OpenMP_Fortran PROPERTY INTERFACE_COMPILE_OPTIONS ${OMP_FLAGS_})
if(NOT TARGET CMI_OpenMP_Fortran)
add_library(CMI_OpenMP_Fortran INTERFACE)
set_property(TARGET CMI_OpenMP_Fortran PROPERTY INTERFACE_COMPILE_OPTIONS ${OMP_FLAGS_})
if(NOT MSVC)
target_link_libraries(cmi_OpenMP_Fortran INTERFACE ${OMP_FLAGS_})
target_link_libraries(CMI_OpenMP_Fortran INTERFACE ${OMP_FLAGS_})
endif()
target_compile_definitions(cmi_OpenMP_Fortran INTERFACE _OMP)
add_library(cmi::OpenMP_Fortran ALIAS cmi_OpenMP_Fortran)
target_compile_definitions(CMI_OpenMP_Fortran INTERFACE _OMP)
add_library(CMI::OpenMP_Fortran ALIAS CMI_OpenMP_Fortran)
endif()
endfunction()
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ add_library(mma SHARED

target_include_directories(mma PUBLIC "../include")
target_include_directories(mma PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
target_link_libraries(mma PUBLIC cmi::MPI_C)
target_link_libraries(mma PUBLIC CMI::MPI_C)
set_target_properties(mma PROPERTIES VERSION ${MMA_VER} SOVERSION ${MMA_SO_VER})

# Generate platform header
Expand Down

0 comments on commit b8cdb20

Please sign in to comment.