Set default for WITH_EXAMPLES to YES, disabled tests.

This commit is contained in:
tastytea 2019-03-28 13:29:21 +01:00
parent 0b35fa0828
commit 552c92a1ef
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 8 deletions

View File

@ -73,6 +73,7 @@ else()
endif()
# Compile examples
set(WITH_EXAMPLES "YES" CACHE STRING "WITH_EXAMPLES defaults to \"YES\"")
if(WITH_EXAMPLES)
file(GLOB sources_examples examples/*.cpp)
foreach(src ${sources_examples})
@ -84,14 +85,7 @@ endif()
# Compile tests
if(WITH_TESTS)
include(CTest)
file(GLOB sources_tests tests/test_*.cpp)
foreach(src ${sources_tests})
get_filename_component(bin ${src} NAME_WE)
add_executable(${bin} ${src})
target_link_libraries(${bin} mastodon-cpp)
add_test(${bin} ${bin})
endforeach()
# Disabled for now.
endif()
# Install library and header files