mirror of
https://gitlab.com/klmp200/LO41.git
synced 2024-11-22 16:53:21 +00:00
Test des flags
This commit is contained in:
parent
3397d77cbe
commit
b69ce75ef6
@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.9)
|
|||||||
project(LO41 C)
|
project(LO41 C)
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 11)
|
set(CMAKE_C_STANDARD 11)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wextra -Wshadow")
|
||||||
|
|
||||||
|
if(LINUX)
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(LO41 main.c List/List.h List/List.c Objects.h List/Element.c List/Element.h Objects.c Building/Building.c Building/Building.h Elevator/Elevator.c Elevator/Elevator.h CommunicationBox/CommunicationBox.c CommunicationBox/CommunicationBox.h SharedData/SharedData.c SharedData/SharedData.h Visitor/Visitor.c Visitor/Visitor.h Resident/Resident.c Resident/Resident.h)
|
add_executable(LO41 main.c List/List.h List/List.c Objects.h List/Element.c List/Element.h Objects.c Building/Building.c Building/Building.h Elevator/Elevator.c Elevator/Elevator.h CommunicationBox/CommunicationBox.c CommunicationBox/CommunicationBox.h SharedData/SharedData.c SharedData/SharedData.h Visitor/Visitor.c Visitor/Visitor.h Resident/Resident.c Resident/Resident.h)
|
1
main.c
1
main.c
@ -9,6 +9,7 @@
|
|||||||
#include "Resident/Resident.h"
|
#include "Resident/Resident.h"
|
||||||
|
|
||||||
void clean_exit(int error_code){
|
void clean_exit(int error_code){
|
||||||
|
printf("Signal %d received, exiting app\n", error_code);
|
||||||
DELETE(GET_INSTANCE(SharedData));
|
DELETE(GET_INSTANCE(SharedData));
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user