Skip to content

Commit

Permalink
chore: compile tinycbor from source if using ci
Browse files Browse the repository at this point in the history
  • Loading branch information
postables committed Jul 24, 2020
1 parent 23e9231 commit 27cdcb4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "thirdparty/tinycbor"]
path = thirdparty/tinycbor
url = https://github.com/intel/tinycbor.git
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ before_install:
- sudo apt install valgrind -y
- make install-cmocka
- make install-mbedtls
- make install-tinycbor
# - make install-tinycbor

script:
# Link gcc-9 and g++-9 to their standard commands
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "CI")
list(APPEND flags -std=c17 -Wall -Wextra -Werror -pedantic -I/home/travis/build/RTradeLtd/libcp2p/destdir/usr/include/ -I /home/travis/build/RTradeLtd/libcp2p/tinycbor -I/usr/local/lib/libtinycbor.so.0.5 -I/usr/local/lib)
# override the previous C compiler choice
set(CMAKE_C_COMPILER /usr/bin/gcc-9)
include(cmake/thirdparty/tinycbor.cmake)
endif()


Expand Down
12 changes: 12 additions & 0 deletions cmake/thirdparty/tinycbor.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
file(GLOB_RECURSE TINYCBOR_SOURCES
${PROJECT_SOURCE_DIR}/thirdparty/tinycbor/src/*.h
${PROJECT_SOURCE_DIR}/thirdparty/tinycbor/src/*.c
)

add_library(tinycbor
SHARED
${TINYCBOR_SOURCES}
)



1 change: 1 addition & 0 deletions thirdparty/tinycbor
Submodule tinycbor added at 085ca4

0 comments on commit 27cdcb4

Please sign in to comment.