Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLartians committed Apr 7, 2019
1 parent 3ac8d85 commit 152048d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ install:
- sudo cmake --build build --target install

script:
# tests
- cmake -Htests -Bbuild/test
- cmake --build build/test
- CTEST_OUTPUT_ON_FAILURE=1 cmake --build build/test --target test

# examples
- cmake -Hexamples -Bbuild/examples
- cmake --build build/examples
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ project(LarsEvent
)
# ---- Configuration variables ----

option(ENABLE_LarsEvent_TESTS "Enable tests" OFF)
option(ENABLE_LARS_EVENT_TESTS "Enable tests" OFF)
option(BUILD_LARS_EVENT_EXAMPLES "Enable examples" OFF)

# ---- Include guards ----

Expand Down Expand Up @@ -78,9 +79,15 @@ install(
DESTINATION include
)

# ---- Examples ----

IF(${BUILD_LARS_EVENT_EXAMPLES})
add_subdirectory(examples)
ENDIF()

# ---- Test ----

if(${ENABLE_LarsEvent_TESTS})
if(${ENABLE_LARS_EVENT_TESTS})
ENABLE_TESTING()
add_subdirectory(tests)
endif()
Expand Down

0 comments on commit 152048d

Please sign in to comment.