mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Add cmake toggle to disable tests (#219)
* disable testing * add cmake option for building tests * switch default behaviour for tests to ON
This commit is contained in:
parent
3c2a53c79b
commit
fed85fe14d
@ -10,6 +10,8 @@ else()
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(PEGLIB_BUILD_TESTS "Build cpp-peglib tests" ON)
|
||||||
|
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads)
|
find_package(Threads)
|
||||||
|
|
||||||
@ -19,8 +21,10 @@ endif()
|
|||||||
|
|
||||||
add_subdirectory(example)
|
add_subdirectory(example)
|
||||||
add_subdirectory(lint)
|
add_subdirectory(lint)
|
||||||
add_subdirectory(test)
|
|
||||||
|
|
||||||
enable_testing()
|
if (${PEGLIB_BUILD_TESTS})
|
||||||
|
add_subdirectory(test)
|
||||||
|
enable_testing()
|
||||||
|
endif()
|
||||||
|
|
||||||
install(FILES peglib.h DESTINATION include)
|
install(FILES peglib.h DESTINATION include)
|
||||||
|
Loading…
Reference in New Issue
Block a user