Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add debug to flexml.
[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 exec_program("${PWD_EXE}" ARGS "| ${SED_EXE} 's/\\/Cmake//g'" OUTPUT_VARIABLE PROJECT_DIRECTORY)
18
19 ### SET THE PROJECT_DIRECTORY
20 #SET(PROJECT_DIRECTORY "/home/navarrop/Bureau/simgrid-trunk")
21
22 ### Set some variables for Cmake
23 SET(PROJECT_SOURCE_DIRECTORY "${PROJECT_DIRECTORY}/src")
24 set(EXECUTABLE_OUTPUT_PATH "${PROJECT_DIRECTORY}/bin")
25 set(LIBRARY_OUTPUT_PATH "${PROJECT_DIRECTORY}/src/.libs")
26 set(INCLUDES "-I${PROJECT_DIRECTORY}/include -I${PROJECT_DIRECTORY}/src/include -I${PROJECT_DIRECTORY}/src -I/usr/include/ -L${gtnets_path}/lib")
27 set(CMAKE_SOURCE_DIR ${PROJECT_SOURCE_DIRECTORY})
28
29 add_definitions (${INCLUDES})
30 if(enable_coverage)
31         add_definitions (-fprofile-arcs -ftest-coverage)
32 endif(enable_coverage)
33
34 ### Setup Options
35 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeOption.txt)
36
37 ### Make the *.h files with *.h.in files
38 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeCompleteInFiles.txt)
39
40 ### Define source packages for Libs 
41 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeDefinePackages.txt)
42
43 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeFLEXml.txt)
44
45 ### Setup gcc flags
46 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeFlags.txt)
47
48 ### Make Libs and Exes
49 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeMakeExeLib.txt)
50
51 ### Make tests
52 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeTest.txt)
53 if(enable_memcheck)
54         include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/memcheck_tests.txt)
55 endif(enable_memcheck)
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 ### Make Docs
65 if(enable_maintainer_mode)
66         #include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeDocs.txt)
67 endif(enable_maintainer_mode)
68
69 INCLUDE(Dart)