picrin/contrib/10.regexp/CMakeLists.txt

19 lines
671 B
CMake
Raw Normal View History

2014-03-31 07:43:36 -04:00
# regex
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/contrib/10.regexp/cmake/")
2014-03-31 07:43:36 -04:00
find_package(REGEX)
if (REGEX_FOUND)
add_definitions(${REGEX_DEFINITIONS})
include_directories(${REGEX_INCLUDE_DIR})
file(GLOB PICRIN_REGEX_SOURCES ${PROJECT_SOURCE_DIR}/contrib/10.regexp/src/*.c)
2014-03-31 07:43:36 -04:00
2014-07-19 20:36:18 -04:00
list(APPEND PICRIN_CONTRIB_INITS regexp)
2014-03-31 07:43:36 -04:00
list(APPEND PICRIN_CONTRIB_LIBRARIES ${REGEX_LIBRARIES})
list(APPEND PICRIN_CONTRIB_SOURCES ${PICRIN_REGEX_SOURCES})
2014-07-22 08:34:23 -04:00
add_custom_target(test-regexp for test in ${PROJECT_SOURCE_DIR}/contrib/10.regexp/t/*.scm \; do bin/picrin "$$test" \; done DEPENDS repl)
set(CONTRIB_TESTS ${CONTRIB_TESTS} test-regexp)
2014-03-31 07:43:36 -04:00
endif()