Skip to content

Commit 5b3a3d2

Browse files
committed
Init
1 parent 13b55c5 commit 5b3a3d2

17 files changed

+820
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
tmp/*
2+
wsjcpp-core
3+
14
# Prerequisites
25
*.d
36

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: cpp
2+
3+
branches:
4+
only:
5+
- master
6+
7+
dist: bionic
8+
9+
addons:
10+
apt:
11+
packages:
12+
- cmake
13+
- make
14+
- g++
15+
- pkg-config
16+
17+
# Build steps
18+
script:
19+
- ./build_simple.sh
20+
- cd unit-tests
21+
- ./build_simple.sh
22+
- ./unit-tests

CMakeLists.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
cmake_minimum_required(VERSION 3.0)
2+
3+
project(wsjcpp-core)
4+
5+
include(${CMAKE_CURRENT_SOURCE_DIR}/src.wsjcpp/CMakeLists.txt)
6+
7+
set(CMAKE_CXX_STANDARD 11)
8+
set(EXECUTABLE_OUTPUT_PATH ${wsjcpp-core_SOURCE_DIR})
9+
10+
# Sources
11+
12+
# include header dirs
13+
list (APPEND WSJCPP_INCLUDE_DIRS "src")
14+
15+
list (APPEND WSJCPP_SOURCES "src/wsjcpp_core.h")
16+
list (APPEND WSJCPP_SOURCES "src/wsjcpp_core.cpp")
17+
list (APPEND WSJCPP_SOURCES "src/main.cpp")
18+
19+
include_directories(${WSJCPP_INCLUDE_DIRS})
20+
21+
add_executable ("wsjcpp-core" ${WSJCPP_SOURCES})
22+
23+
target_link_libraries("wsjcpp-core" -lpthread ${WSJCPP_LIBRARIES} )
24+
25+
install(
26+
TARGETS
27+
"wsjcpp-core"
28+
RUNTIME DESTINATION
29+
/usr/bin
30+
)

build_simple.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
if [ ! -d tmp ]; then
4+
mkdir -p tmp
5+
fi
6+
7+
cd tmp
8+
cmake ..
9+
make

clean.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
rm -rf tmp
4+
rm -rf Makefile
5+
rm -f wsjcpp-core
6+

src.wsjcpp/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

src.wsjcpp/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Automaticly generated by [email protected]
2+
3+
add_definitions(-DWSJCPP_VERSION="0.0.1")
4+
add_definitions(-DWSJCPP_NAME="wsjcpp-core")
5+
6+
# set(CMAKE_AUTOMOC ON)
7+
set(CMAKE_CXX_STANDARD 11)
8+
9+
set (WSJCPP_LIBRARIES "")
10+
set (WSJCPP_INCLUDE_DIRS "")
11+
set (WSJCPP_SOURCES "")

src/main.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <string.h>
2+
#include <iostream>
3+
#include <algorithm>
4+
#include "wsjcpp_core.h"
5+
6+
int main(int argc, char* argv[]) {
7+
std::string TAG = "MAIN";
8+
std::string appName = std::string(WSJCPP_NAME);
9+
std::string appVersion = std::string(WSJCPP_VERSION);
10+
11+
// TODO
12+
13+
return 0;
14+
}

0 commit comments

Comments
 (0)