build.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env bash
  2. #------------------------------------------------------------------------------
  3. # Bash script to build cpp-ethereum within TravisCI.
  4. #
  5. # The documentation for cpp-ethereum is hosted at http://cpp-ethereum.org
  6. #
  7. # ------------------------------------------------------------------------------
  8. # This file is part of cpp-ethereum.
  9. #
  10. # cpp-ethereum is free software: you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation, either version 3 of the License, or
  13. # (at your option) any later version.
  14. #
  15. # cpp-ethereum is distributed in the hope that it will be useful,
  16. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. # GNU General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU General Public License
  21. # along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>
  22. #
  23. # (c) 2016 cpp-ethereum contributors.
  24. #------------------------------------------------------------------------------
  25. set -e -x
  26. # There is an implicit assumption here that we HAVE to run from repo root
  27. mkdir -p build
  28. cd build
  29. if [ $(uname -s) == "Linux" ]; then
  30. cmake .. -DCMAKE_BUILD_TYPE=$1 -DTESTS=$2 -DEVMJIT=On -DLLVM_DIR=/usr/lib/llvm-3.9/lib/cmake/llvm
  31. else
  32. cmake .. -DCMAKE_BUILD_TYPE=$1 -DTESTS=$2
  33. fi
  34. make -j2