42 lines
1.6 KiB
CMake
42 lines
1.6 KiB
CMake
cmake_minimum_required(VERSION 2.6)
|
|
project(Traitement-signal-plantes C)
|
|
|
|
include(CTest)
|
|
enable_testing()
|
|
set(CMAKE_C_FLAGS "-std=c99 -g -Wall") #what are the flag for ?
|
|
|
|
file(MAKE_DIRECTORY RawDataFiles) #why do we make this folder each time ?
|
|
file(MAKE_DIRECTORY Executable)
|
|
|
|
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY Executable) #Set Executable directory as default exectutable file location
|
|
|
|
add_executable(exect fileGestion.c getArray.c average.c growthRate.c power.c queue.c simulateFlux.c main.c)
|
|
# add_executable(exect main.c simulateFlux.c queue.c power.c growthRate.c average.c getArray.c fileGestion.c)
|
|
|
|
find_package(Threads)
|
|
target_link_libraries(exect ${CMAKE_THREAD_LIBS_INIT} m)
|
|
|
|
set(CTEST_MEMORYCHECK_TYPE "AddressSanitizer")
|
|
set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS "verbosity=1:symbolize=1:abort_on_error=1:detect_leaks=1")
|
|
|
|
add_executable(ctest fileGestion.c getArray.c average.c growthRate.c queue.c simulateFlux.c ctest.c)
|
|
target_link_libraries(ctest ${CMAKE_THREAD_LIBS_INIT} m)
|
|
|
|
add_test(test_queueCreateEmpty ./ctest queueCreateEmpty)
|
|
add_test(test_queueCreateE ./ctest queueCreateE)
|
|
|
|
add_test(test_queueSetCharLen ./ctest queueSetCharLen)
|
|
add_test(test_queueGetCharLen ./ctest queueGetCharLen)
|
|
|
|
add_test(test_queueSetTabChar ./ctest queueSetTabChar)
|
|
add_test(test_queueGetTabChar ./ctest queueGetTabChar)
|
|
|
|
add_test(test_queueSetNextE ./ctest queueSetNextE)
|
|
add_test(test_queueGetNextE ./ctest queueGetNextE)
|
|
|
|
add_test(test_queueAddLastQ ./ctest queueAddLastQ)
|
|
add_test(test_queueRmLastE ./ctest queueRmLastE)
|
|
add_test(test_queueRmFrstE ./ctest queueRmFrstE)
|
|
add_test(test_queueNextDelFrst ./ctest queueNextDelFrst)
|
|
|