CMakeLists.txt 847 Bytes
Newer Older
berenger-bramas's avatar
berenger-bramas committed
1
2
3
cmake_minimum_required (VERSION 2.6)

# Project Infos
berenger-bramas's avatar
berenger-bramas committed
4
5
6
7
8
9
10
project(scalfmm CXX)

# check if compiling into source directories
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource)
IF(insource)
    MESSAGE(FATAL_ERROR "${PROJECT_NAME} requires an out of source build. Goto ./Build and tapes cmake ../")
ENDIF(insource)
berenger-bramas's avatar
berenger-bramas committed
11
12
13
14
15

# Options
OPTION( BUILD_TESTS "Set to ON to build fonctionnalities Tests" ON )
OPTION( BUILD_UTESTS "Set to ON to build UTests" ON )

berenger-bramas's avatar
berenger-bramas committed
16
ADD_DEFINITIONS(-O2 -Wall -Wshadow -Wpointer-arith -Wcast-qual)
berenger-bramas's avatar
berenger-bramas committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

# Build - lib
add_subdirectory(Sources)

# Build - Tests
MESSAGE( STATUS "BUILD_TESTS = ${BUILD_TESTS}" )
if( ${BUILD_TESTS} STREQUAL "ON" )
	add_subdirectory(Tests)
endif()

# Build - UTests
MESSAGE( STATUS "BUILD_UTESTS = ${BUILD_UTESTS}" )
if( ${BUILD_UTESTS} STREQUAL "ON" )
	add_subdirectory(UTests)
endif()