Logo AND Algorithmique Numérique Distribuée

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