Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Compact source code for Making Doc.
[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} -fprofile-arcs -ftest-coverage)
30
31 ### Setup Options
32 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeOption.txt)
33
34 ### Make the *.h files with *.h.in files
35 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeCompleteInFiles.txt)
36
37 ### Define source packages for Libs 
38 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeDefinePackages.txt)
39
40 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeFLEXml.txt)
41
42 ### Setup gcc flags
43 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeFlags.txt)
44
45 ### Make Libs and Exes
46 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeMakeExeLib.txt)
47
48 ### Make tests
49 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeTest.txt)
50 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CTestConfig.cmake)
51
52 ### Setup the distrib
53 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeDistrib.txt)
54
55 ### Print ARGS
56 include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakePrintArgs.txt)
57
58 ### Make Docs
59 if(enable_maintainer_mode)
60         include(${PROJECT_DIRECTORY}/buildtools/Cmake/src/CMakeDocs.txt)
61 endif(enable_maintainer_mode)
62
63 INCLUDE(Dart)