Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package for mac&&linux | add travis #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down