CMakeLists.txt 1.01 KB
Newer Older
1
2
#cmake_minimum_required(VERSION 2.8)
#Do we really need of 3.0.2 version ?
3
cmake_minimum_required(VERSION 3.0.2)
Olivier Richard's avatar
Olivier Richard committed
4

5
6
project("Batsim")

Olivier Richard's avatar
Olivier Richard committed
7
8
set(CMAKE_BUILD_TYPE Debug)

9
# Enable C11 or at least C99
10
11
12
13
14
15
16
17
18
19
20
#include(CheckCCompilerFlag)
#CHECK_C_COMPILER_FLAG("-std=c11" COMPILER_SUPPORTS_C11)
#CHECK_C_COMPILER_FLAG("-std=c99" COMPILER_SUPPORTS_C99)
#if(COMPILER_SUPPORTS_C11)
#    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
#elseif(COMPILER_SUPPORTS_C99)
#    message(STATUS "The compiler ${CMAKE_C_COMPILER} has no C11 support. Using C99 instead.")
#    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
#else()
#    message(STATUS "The compiler ${CMAKE_C_COMPILER} has no C11 nor C99 support. Please update your C compiler.")
#endif()
21

Millian Poquet's avatar
Millian Poquet committed
22
23
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")

24
add_executable(batsim batsim.c job.c utils.c export.c machines.c)
25
add_executable(batexec batexec.c job.c utils.c export.c)
Olivier Richard's avatar
Olivier Richard committed
26
27

### Add definitions for compile
28
29
target_link_libraries(batsim simgrid jansson m)
target_link_libraries(batexec simgrid jansson m)