Did you know ... | Search Documentation: |
Pack swiplite -- CMakeLists.txt |
cmake_minimum_required(VERSION 3.14)
project(swipl-pack-swiplite)
list(INSERT CMAKE_MODULE_PATH 0 $ENV{SWIPL_HOME_DIR}/cmake)
include(swipl)
add_library(swiplite MODULE c/swiplite.c)
lib
prefix
target_link_swipl(swiplite)
find_package(SQLite3 REQUIRED) target_link_libraries(swiplite PRIVATE ${SQLite3_LIBRARIES}) target_include_directories(swiplite PRIVATE ${SQLite3_INCLUDE_DIRS})
install(TARGETS swiplite DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/${swipl_module_dir})
swipl_test(name)
runs Prolog with the command line below.
#
# swipl -p foreign=${CMAKE_CURRENT_SOURCE_DIR}/${swipl_module_dir} \
# -p library=${CMAKE_CURRENT_SOURCE_DIR}/prolog \
# --on-error=status \
# -g test_${name} \
# -t halt \
# ${CMAKE_CURRENT_SOURCE_DIR}/test/test_${name}.pl
#
# This implies that a test name
must be defined in a file
# `test/test_${name}.pl`, which exports a predicate `test_${name}`. The
# test succeeds if this predicate succeeds and no error messages are
# printed.
enable_testing()
swipl_add_test(sqlite)