#set(CMAKE_CXX_COMPILER "mpic++")
project (Architect_ME_kolumny)

#set(MPI_COMPILER ${MPI_ROOT}/bin/mpicxx)

find_package(MPI REQUIRED)
#INCLUDE(CMakeForceCompiler)
#CMAKE_FORCE_CXX_COMPILER(mpicxx "MPI C++ Compiler")



cmake_minimum_required(VERSION 2.6)



FIND_PACKAGE(Boost COMPONENTS date_time filesystem thread program_options system)

include_directories (${Matrices_SOURCE_DIR})
link_directories(${Matrices_BINARY_DIR})
include_directories (${LexicalUnits_SOURCE_DIR})
link_directories(${LexicalUnits_BINARY_DIR})

include_directories(${Boost_INCLUDE_DIR})
include_directories(${MPI_INCLUDE_DIR})
include_directories(${MPI_INCLUDE_PATH})
link_directories(${MPI_INCLUDE_DIR})


add_executable(me_architect_parallel me_architect.cpp parallelArchitect.cpp Config.cpp Architect.cpp
        Options.cpp Dictionary.cpp)


SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${MPI_COMPILE_FLAGS})
set_target_properties(me_architect_parallel PROPERTIES
			COMPILE_FLAGS "${MPI_COMPILE_FLAGS}"
			LINK_FLAGS "${MPI_LINK_FLAGS}")

target_link_libraries(me_architect_parallel ${Boost_LIBRARIES} ${MPI_LIBRARIES})


target_link_libraries(me_architect_parallel corpus joskipi antlr matrices lexicalunits
	poliqarp_reader)

install(TARGETS me_architect_parallel
	RUNTIME DESTINATION bin
	)
