normal="$(echo -e '\033[0m')" red="$normal$(echo -e '\033[01;31m')" green="$normal$(echo -e '\033[01;32m')"
configureCVC4() {
echo "CVC4 config - $TRAVIS_CVC4_CONFIG";
- ./configure.sh --name=build --unit-testing $TRAVIS_CVC4_CONFIG
+ ./configure.sh --name=build --prefix=$(pwd)/build/install --unit-testing $TRAVIS_CVC4_CONFIG
}
error() {
echo;
make -j2 check ARGS='-LE regress[1-4]' CVC4_REGRESSION_ARGS='--no-early-exit' || error "BUILD/UNIT/SYSTEM/REGRESSION TEST FAILED"
ctest -j2 -L example || error "RUNNING EXAMPLES FAILED"
}
+ makeInstallCheck() {
+ cd build
+ make install -j2
+ echo -e "#include <cvc4/cvc4.h>\nint main() { CVC4::ExprManager em; return 0; }" > /tmp/test.cpp
+ $CXX -std=c++11 /tmp/test.cpp -I install/include -L install/lib -lcvc4 -lcln || exit 1
+ }
run() {
echo "travis_fold:start:$1"
echo "Running $1"
}
[ -n "$TRAVIS_CVC4" ] && [ -n "$TRAVIS_WITH_LFSC" ] && run contrib/get-lfsc-checker
[ -n "$TRAVIS_CVC4" ] && run configureCVC4
- [ -n "$TRAVIS_CVC4" ] && run makeCheck
+ [ -n "$TRAVIS_CVC4" ] && run makeCheck && run makeInstallCheck
[ -z "$TRAVIS_CVC4" ] && error "Unknown Travis-CI configuration"
echo "travis_fold:end:load_script"
- echo; echo "${green}EVERYTHING SEEMED TO PASS!${normal}"
api/cvc4cpp.h
api/cvc4cppkind.h
DESTINATION
- include/api)
+ include/cvc4/api)
install(FILES
base/configuration.h
base/exception.h
base/listener.h
base/modal_exception.h
DESTINATION
- include/base)
+ include/cvc4/base)
install(FILES
context/cdhashmap_forward.h
context/cdhashset_forward.h
context/cdinsert_hashmap_forward.h
context/cdlist_forward.h
DESTINATION
- include/context)
+ include/cvc4/context)
install(FILES
include/cvc4.h
include/cvc4_public.h
include/cvc4parser_public.h
DESTINATION
- include)
+ include/cvc4)
install(FILES
expr/array.h
expr/array_store_all.h
${CMAKE_CURRENT_BINARY_DIR}/expr/kind.h
${CMAKE_CURRENT_BINARY_DIR}/expr/expr_manager.h
DESTINATION
- include/expr)
+ include/cvc4/expr)
install(FILES
options/argument_extender.h
options/arith_heuristic_pivot_rule.h
options/sygus_out_mode.h
options/theoryof_mode.h
DESTINATION
- include/options)
+ include/cvc4/options)
install(FILES
parser/input.h
parser/parser.h
parser/parser_builder.h
parser/parser_exception.h
DESTINATION
- include/parser)
+ include/cvc4/parser)
install(FILES
printer/sygus_print_callback.h
DESTINATION
- include/printer)
+ include/cvc4/printer)
install(FILES
proof/unsat_core.h
DESTINATION
- include/proof)
+ include/cvc4/proof)
install(FILES
smt/command.h
smt/logic_exception.h
smt/smt_engine.h
DESTINATION
- include/smt)
+ include/cvc4/smt)
install(FILES
smt_util/lemma_channels.h
smt_util/lemma_input_channel.h
smt_util/lemma_output_channel.h
DESTINATION
- include/smt_util)
+ include/cvc4/smt_util)
install(FILES
theory/logic_info.h
DESTINATION
- include/theory)
+ include/cvc4/theory)
install(FILES
util/abstract_value.h
util/bitvector.h
${CMAKE_CURRENT_BINARY_DIR}/util/integer.h
${CMAKE_CURRENT_BINARY_DIR}/util/rational.h
DESTINATION
- include/util)
+ include/cvc4/util)
+
+# Fix include paths for all public headers.
+# Note: This is a temporary fix until the new C++ API is in place.
+install(CODE "execute_process(COMMAND
+ ${CMAKE_CURRENT_LIST_DIR}/fix-install-headers.sh
+ ${CMAKE_INSTALL_PREFIX})")