Commit 514980de authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

final fixes for mac build



Signed-off-by: Mccaskey, Alex's avatarAlex Mccaskey <mccaskeyaj@ornl.gov>
parent 87aaa1af
......@@ -49,10 +49,7 @@ if(NOT CUDA_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_GPU")
endif()
#if(OpenMP_FOUND and NOT APPLE)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
#endif()
message(STATUS "MPIRUN: ${MPIEXEC_EXECUTABLE}")
include_directories(${CMAKE_BINARY_DIR}/tpls/cppmicroservices/include)
include_directories(${CMAKE_BINARY_DIR}/tpls/cppmicroservices/framework/include)
include_directories(${CMAKE_SOURCE_DIR}/tpls/cppmicroservices/framework/include)
......
......@@ -16,8 +16,11 @@ target_link_libraries(client_test PRIVATE gtest gmock gtest_main)
target_link_libraries(server_test PUBLIC exatn exatn-taprol-parser ${MPI_CXX_LIBRARIES})
add_test(NAME client_server_test COMMAND mpirun --allow-run-as-root -np 1 ./server_test : -np 1 ./client_test)
if (NOT APPLE)
get_filename_component(MPI_BIN_PATH ${MPI_CXX_COMPILER} DIRECTORY)
# FIXME if OPENMPI and WHOAMI is ROOT, add --allow-run-as-root
add_test(NAME client_server_test COMMAND ${MPI_BIN_PATH}/mpirun -np 1 ./server_test : -np 1 ./client_test)
endif()
add_dependencies(client_test exatensor-build)
add_dependencies(server_test exatensor-build)
......
......@@ -35,7 +35,7 @@ usfunctionembedresources(TARGET
target_link_libraries(${LIBRARY_NAME} PUBLIC CppMicroServices PRIVATE exatn-runtime-graph)
if(APPLE)
set_target_properties(${LIBRARY_NAME} PROPERTIES INSTALL_RPATH "@loader_path/../lib")
set_target_properties(${LIBRARY_NAME} PROPERTIES INSTALL_RPATH "@loader_path/../lib;@loader_path")
set_target_properties(${LIBRARY_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
else()
set_target_properties(${LIBRARY_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN/../lib;$ORIGIN")
......
......@@ -59,7 +59,7 @@ message(STATUS "THIS IS APPLE, BUILDING EXATENSOR ${CMAKE_Fortran_COMPILER}")
COMMAND ${CMAKE_COMMAND} -E env CPP_GNU=${CMAKE_CXX_COMPILER} CC_GNU=${CMAKE_C_COMPILER} FC_GNU=${CMAKE_Fortran_COMPILER} MPILIB=MPICH BLASLIB=NONE
PATH_MPICH_INC=${MPI_ROOT_DIR}/include EXA_NO_BUILD=${TALSHXX_EXISTS}
PATH_MPICH_LIB=${MPI_ROOT_DIR}/lib
PATH_MPICH_BIN=${MPI_BIN_PATH} EXA_OS=NO_LINUX GPU_CUDA=NOCUDA EXA_TALSH_ONLY=YES make
PATH_MPICH_BIN=${MPI_BIN_PATH} EXA_OS=NO_LINUX GPU_CUDA=NOCUDA EXA_TALSH_ONLY=YES EXATN_SERVICE=YES make
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ExaTensor)
else()
......@@ -75,7 +75,7 @@ if(CUDA_FOUND)
PATH_CUDA=${CUDA_TOOLKIT_ROOT_DIR} MPILIB=OPENMPI BLASLIB=ATLAS
PATH_OPENMPI_INC=${MPI_ROOT_DIR}/include EXA_NO_BUILD=${TALSHXX_EXISTS}
PATH_OPENMPI_LIB=${MPI_ROOT_DIR}/lib
PATH_OPENMPI_BIN=${MPI_BIN_PATH} CUDA_HOST_COMPILER=${CUDA_HOST_COMPILER}
PATH_OPENMPI_BIN=${MPI_BIN_PATH} CUDA_HOST_COMPILER=${CUDA_HOST_COMPILER} EXATN_SERVICE=YES
make
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ExaTensor)
else()
......@@ -85,7 +85,7 @@ if(CUDA_FOUND)
PATH_CUDA=${CUDA_TOOLKIT_ROOT_DIR} MPILIB=OPENMPI BLASLIB=ATLAS
PATH_OPENMPI_INC=${MPI_ROOT_DIR}/include EXA_NO_BUILD=${TALSHXX_EXISTS}
PATH_OPENMPI_LIB=${MPI_ROOT_DIR}/lib
PATH_OPENMPI_BIN=${MPI_BIN_PATH} CUDA_HOST_COMPILER=${CMAKE_CXX_COMPILER} make
PATH_OPENMPI_BIN=${MPI_BIN_PATH} CUDA_HOST_COMPILER=${CMAKE_CXX_COMPILER} EXATN_SERVICE=YES make
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ExaTensor)
endif()
else()
......@@ -94,7 +94,7 @@ else()
COMMAND ${CMAKE_COMMAND} -E env CPP_GNU=g++-8 CC_GNU=gcc-8 FC_GNU=gfortran-8 MPILIB=OPENMPI BLASLIB=ATLAS
PATH_OPENMPI_INC=${MPI_ROOT_DIR}/include EXA_NO_BUILD=${TALSHXX_EXISTS}
PATH_OPENMPI_LIB=${MPI_ROOT_DIR}/lib
PATH_OPENMPI_BIN=${MPI_BIN_PATH} make
PATH_OPENMPI_BIN=${MPI_BIN_PATH} EXATN_SERVICE=YES make
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ExaTensor)
endif()
endif()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment