###The project's name
PROJECT(psg CXX)

###Some basic settings
SET( CMAKE_COLOR_MAKEFILE ON )
SET( CMAKE_VERBOSE_MAKEFILE OFF )


###Set the MPI compiler
SET(CMAKE_CXX_COMPILER mpiCC)


###Some parameters for the build
SET( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin ) # Where the final executable will be placed.

#SET( CMAKE_BUILD_TYPE RelWithDebInfo ) # Switches on optimizations and such, but keeps assertions.
SET( CMAKE_BUILD_TYPE Release ) # Release build with all the bells and whistles.

ADD_DEFINITIONS( -Wall -Wunused -Wextra -pedantic -Wno-long-long ) # We like warnings.
ADD_DEFINITIONS( -march=opteron ) # star is an Opteron system

SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s" ) # strip the executable. We're not debugging.


###Libraries
FIND_PACKAGE(Boost REQUIRED)
MESSAGE("Boost was found in ${Boost_INCLUDE_DIRS}")
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})


###Include the tools source directory.
###The CMakeLists.txt in src/tools/ defines the actual executable.
ADD_SUBDIRECTORY( src/tools build )

###Include the unit test source directory.
###The CMakeLists.txt in src/unit_test/ defines the actual executable.
ADD_SUBDIRECTORY( src/unit_test build )

###Include the project's source directory.
###The CMakeLists.txt in src/ defines the actual executable.
ADD_SUBDIRECTORY( src build )
