Logo AND Algorithmique Numérique Distribuée

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