Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make target testall for all.
[simgrid.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2 SET(CMAKE_LANGUAGE "Cxx")
3 SET(PROJECT_NAME "Simgrid")
4 set_property(GLOBAL PROPERTY Label "${SVN_VERSION}${GIT_VERSION}")
5
6 ### Find programs and paths
7 find_program(SH_EXE NAMES sh)
8 find_program(SED_EXE NAMES sed)
9 find_program(PWD_EXE NAMES pwd)
10 find_program(UNAME NAMES uname)
11 find_program(HOSTNAME_CMD NAMES hostname)
12 find_program(CAT NAMES cat)
13 find_path(GCC_PATH NAMES gcc PATHS NO_DEFAULT_PATHS)
14 find_path(GCOV_PATH NAMES gcov PATHS NO_DEFAULT_PATHS)
15 find_path(VALGRIND_PATH NAMES valgrind  PATHS NO_DEFAULT_PATHS)
16
17 ### AUTO DETECT THE PROJECT_DIRECTORY
18 exec_program("${PWD_EXE}" ARGS "| ${SED_EXE} 's/\\/Cmake//g'" OUTPUT_VARIABLE PROJECT_DIRECTORY)
19
20 ### SET THE PROJECT_DIRECTORY
21 #SET(PROJECT_DIRECTORY "/home/navarrop/Bureau/simgrid-trunk")
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 ### 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)