adding cmake for MPI, cannot pass the build
This commit is contained in:
Родитель
3eaaa7e733
Коммит
6aaa7cf102
|
@ -1,12 +1,13 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
PROJECT(MULTIVERSO)
|
||||
#FIND_PACKAGE(Threads REQUIRED)
|
||||
|
||||
find_package(MPI REQUIRED)
|
||||
if(UNIX)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
|
||||
endif()
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
|
||||
SET(THIRD_PARTY ${PROJECT_SOURCE_DIR}/third_party)
|
||||
SET(THIRD_PARTY_INC ${THIRD_PARTY}/include)
|
||||
SET(THIRD_PARTY_LIB ${THIRD_PARTY}/lib)
|
||||
|
@ -14,6 +15,7 @@ SET(MULTIVERSO_HEADER_DIR ${PROJECT_SOURCE_DIR}/include)
|
|||
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
SET(MULTIVERSO_LIBRARY_DIR ${PROJECT_BINARY_DIR}/lib)
|
||||
|
||||
Message(MPI_CXX_COMPILER)
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
# ADD_SUBDIRECTORY(Test)
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
include_directories(${MULTIVERSO_HEADER_DIR})
|
||||
include_directories(${THIRD_PARTY_INC})
|
||||
include_directories(${MPI_CXX_INCLUDE_PATH})
|
||||
|
||||
set(MULTIVERSO_SRC actor.cpp communicator.cpp controller.cpp multiverso.cpp node.cpp server.cpp table.cpp util/log.cpp worker.cpp zoo.cpp)
|
||||
set(MULTIVERSO_SRC net.cpp actor.cpp communicator.cpp controller.cpp multiverso.cpp node.cpp server.cpp table.cpp util/log.cpp worker.cpp zoo.cpp )
|
||||
|
||||
link_directories(${THIRD_PARTY_LIB})
|
||||
|
||||
#target_link_libraries(multiverso ${MPI_CXX_LIBARIES})
|
||||
#target_link_libraries(mpi)
|
||||
|
||||
add_library(multiverso ${MULTIVERSO_SRC})
|
||||
|
||||
#target_link_libraries(mpich)
|
||||
#set_property(TARGET multiverso PROPERTY CXX_STANDARD 11)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче