diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6691633 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,32 @@ +language: generic + +matrix: + include: + - os: linux + + dist: bionic + sudo: required + install: + - wget https://github.com/charles32110/SVF-Static-Lib/releases/download/V1.0.1/V1.0.1.tar.gz + - tar -xzvf V1.0.1.tar.gz + - export SVF=$PWD/SVF-Static-Lib + - wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz + - tar -xvf clang*.tar.xz + - export LLVM_DIR=$PWD/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04 + - os: osx + osx_image: xcode11.5 + install: + - wget https://github.com/charles32110/SVF-Static-Lib/releases/download/V1.0.1/V1.0.1.tar.gz + - tar -xzvf V1.0.1.tar.gz + - export SVF=$PWD/SVF-Static-Lib + - wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-apple-darwin.tar.xz + - tar -xzvf clang+llvm-10.0.0-x86_64-apple-darwin.tar.xz + - export LLVM_DIR=$PWD/clang+llvm-10.0.0-x86_64-apple-darwin + +before_script: + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update ; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install cmake gcc g++; fi + +script: + - cmake -DSVF_DIR=$SVF + - make \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index ff3e29f..5ecf025 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,9 +29,17 @@ Please set this to environment variable to point to the LLVM build directory\ (e.g. on linux: export LLVM_DIR=/path/to/llvm/build/dir)") endif() +if (UNIX AND NOT APPLE) + MESSAGE (STATUS "this is linux") + set(SVF_LIB "${SVF_DIR}/libsvf_ubuntu.a") + set(LLVMCudd "${SVF_DIR}/libCudd_ubuntu.a") +elseif (APPLE) + MESSAGE (STATUS "this is MAC") + set(SVF_LIB "${SVF_DIR}/libsvf_mac.a") + set(LLVMCudd "${SVF_DIR}/libCudd_mac.a") +endif() set(SVF_HEADER "${SVF_DIR}/include") -set(SVF_LIB "${SVF_DIR}/libsvf_static_lib.a") -set(LLVMCudd "${SVF_DIR}/libCudd.a") + if (EXISTS "${SVF_HEADER}" AND EXISTS "${SVF_LIB}") message(STATUS "SVF_HEADER: ${SVF_HEADER}") message(STATUS "SVF_LIB: ${SVF_LIB}")