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

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

cmake_minimum_required(VERSION 2.6)


include_directories (${Matrices_SOURCE_DIR})
link_directories(${Matrices_BINARY_DIR})
include_directories (${Comparator_SOURCE_DIR})
link_directories(${Comparator_BINARY_DIR})

FIND_PACKAGE(Boost COMPONENTS program_options)

add_library(WBST SHARED parallelWBST.cpp)

add_executable(parallelWBST main.cpp old_wbst/question.cpp old_wbst/singletest.cpp old_wbst/options.cpp)

include_directories(${MPI_INCLUDE_PATH})
SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${MPI_COMPILE_FLAGS})
set_target_properties(parallelWBST PROPERTIES
	COMPILE_FLAGS "${MPI_COMPILE_FLAGS}"
	LINK_FLAGS "${MPI_LINK_FLAGS}")

include_directories(${Boost_INCLUDE_DIR})

target_link_libraries(parallelWBST WBST mpi_handler matrices comparator ${Boost_LIBRARIES}  ${MPI_LIBRARIES})

