Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Correct tesh files after patch time commit.
[simgrid.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2 SET(CMAKE_LANGUAGE "Cxx")
3 SET(PROJECT_NAME "Simgrid")
4
5 ### Find programs and paths
6 find_program(SH_EXE NAMES sh)
7 find_program(SED_EXE NAMES sed)
8 find_program(PWD_EXE NAMES pwd)
9 find_program(UNAME NAMES uname)
10 find_program(HOSTNAME_CMD NAMES hostname)
11 find_program(CAT NAMES cat)
12 find_path(GCC_PATH NAMES gcc PATHS NO_DEFAULT_PATHS)
13 find_path(GCOV_PATH NAMES gcov PATHS NO_DEFAULT_PATHS)
14 find_path(VALGRIND_PATH NAMES valgrind  PATHS NO_DEFAULT_PATHS)
15
16 ### AUTO DETECT THE PROJECT_DIRECTORY
17 message("Project_BINARY_DIR   : ${Project_BINARY_DIR}")
18 message("CMAKE_HOME_DIRECTORY : ${CMAKE_HOME_DIRECTORY}")
19
20 ### SET THE PROJECT_DIRECTORY
21 SET(PROJECT_DIRECTORY "${CMAKE_HOME_DIRECTORY}")
22
23 ### Set some variables for Cmake
24 SET(PROJECT_SOURCE_DIRECTORY "${PROJECT_DIRECTORY}/src")
25 set(EXECUTABLE_OUTPUT_PATH "${PROJECT_DIRECTORY}/bin")
26 set(LIBRARY_OUTPUT_PATH "${PROJECT_DIRECTORY}/src/.libs")
27 set(INCLUDES "-I${PROJECT_DIRECTORY}/include -I${PROJECT_DIRECTORY}/src/include -I${PROJECT_DIRECTORY}/src -I/usr/include/ -L${gtnets_path}/lib")
28 set(CMAKE_SOURCE_DIR ${PROJECT_SOURCE_DIRECTORY})
29
30
31 if(enable_coverage)
32         add_definitions (${INCLUDES} -fprofile-arcs -ftest-coverage)
33 else(enable_coverage)
34         add_definitions (${INCLUDES})
35 endif(enable_coverage)
36
37 ### Setup Options
38 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeOption.txt)
39
40 ### Make the *.h files with *.h.in files
41 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeCompleteInFiles.txt)
42
43 ### Define source packages for Libs 
44 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeDefinePackages.txt)
45
46 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeMaintainerMode.txt)
47
48 ### Setup gcc flags
49 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeFlags.txt)
50
51 ### Make Libs and Exes
52 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeMakeExeLib.txt)
53
54 ### Make tests
55 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeTest.txt)
56 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CTestConfig.cmake)
57
58 ### Setup the distrib
59 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeDistrib.txt)
60
61 ### Print ARGS
62 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakePrintArgs.txt)
63
64 set_property(GLOBAL PROPERTY LABELS "${SVN_VERSION}${GIT_VERSION}")
65 set_property(GLOBAL PROPERTY PROJECT_LABEL "${SVN_VERSION}${GIT_VERSION}")
66 set(PROJECT_LABEL "${SVN_VERSION}${GIT_VERSION}")
67
68 INCLUDE(Dart)
69
70