Skip to content

Commit

Permalink
Added Travis file for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
amallia authored and amallia committed Jun 30, 2017
1 parent b6189bf commit c5822f1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sudo: false
dist: trusty

language: cpp

cache:
apt: true

addons:
apt:
packages:
- g++
compiler:
- g++

script: mkdir build && cd build && cmake .. && make && ctest --verbose && cd ..

3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -- Project Setup ------------------------------------------------------------

project(libbf CXX)
project(libbf CXX C)

include(CTest)

Expand Down Expand Up @@ -47,6 +47,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
set(CMAKE_EXE_LINKER_FLAGS "-pthread")

if (ENABLE_DEBUG)
set(CMAKE_BUILD_TYPE Debug)
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ add_subdirectory(bf)
enable_testing()
add_executable(bf-test tests.cpp)
target_link_libraries(bf-test libbf ${CMAKE_THREAD_LIBS_INIT})
add_test(unit ${CMAKE_CURRENT_BINARY_DIR}/bf-test)
add_test(NAME unit COMMAND bf-test)

0 comments on commit c5822f1

Please sign in to comment.