mirror of
https://github.com/muccc/WomoLIN.git
synced 2026-03-24 01:36:50 +01:00
include cmake build process
This commit is contained in:
26
Software/WomoLin/CMakeLists.txt
Normal file
26
Software/WomoLin/CMakeLists.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
cmake_minimum_required (VERSION 3.10)
|
||||
|
||||
SET(CMAKE_CXX_STANDARD 17)
|
||||
SET(CMAKE_C_COMPILER "/usr/bin/gcc-9")
|
||||
SET(CMAKE_CXX_COMPILER "/usr/bin/g++-9")
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "-DSIMULATION -Wall -Wpedantic -Werror=pedantic -Wextra -Os ")
|
||||
|
||||
#enable_testing()
|
||||
#include_directories("${CMAKE_CURRENT_SOURCE_DIR}/googletest/googletest/include")
|
||||
|
||||
project(womolin)
|
||||
|
||||
add_executable(mainunit
|
||||
womolin/enums.cpp
|
||||
womolin/signal.cpp
|
||||
womolin/unit.cpp
|
||||
womolin/protocol.cpp
|
||||
womolin/managerbase.cpp
|
||||
board/mainunit/hal/serial.cpp
|
||||
board/mainunit/hal/serial_simulation_network.cpp
|
||||
board/mainunit/hal/unit.cpp
|
||||
board/mainunit/manager.cpp
|
||||
board/mainunit/main.cpp
|
||||
)
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
rm -f simulation
|
||||
g++-9 -DSIMULATION -std=c++17 -Wall -Wpedantic -Werror=pedantic -Wextra -Os -o simulation \
|
||||
../../lib/signal.cpp \
|
||||
../../lib/protocol.cpp \
|
||||
../../lib/managerbase.cpp \
|
||||
../../lib/unit.cpp \
|
||||
../../lib/enums.cpp \
|
||||
./hal/serial.cpp \
|
||||
./hal/serial_simulation_network.cpp \
|
||||
./hal/unit.cpp \
|
||||
manager.cpp \
|
||||
main.cpp
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../../../lib/include/ihal.h"
|
||||
#include "../../../../womolin/include/ihal.h"
|
||||
|
||||
namespace womolin::board::hal
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../../../lib/include/ihal.h"
|
||||
#include "../../../../womolin/include/ihal.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../../../lib/include/ihal.h"
|
||||
#include "../../../../womolin/include/ihal.h"
|
||||
#ifdef SIMULATION
|
||||
#include <array>
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "../../lib/include/managerbase.h"
|
||||
#include "../../lib/include/unit.h"
|
||||
#include "../../womolin/include/managerbase.h"
|
||||
#include "../../womolin/include/unit.h"
|
||||
#include "./hal/include/unit.h"
|
||||
|
||||
namespace womolin::board
|
||||
|
||||
6
Software/WomoLin/build.sh
Executable file
6
Software/WomoLin/build.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p out
|
||||
cd out
|
||||
cmake ../
|
||||
make all
|
||||
3
Software/WomoLin/clean.sh
Executable file
3
Software/WomoLin/clean.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -fr out
|
||||
Reference in New Issue
Block a user