aboutsummaryrefslogtreecommitdiff
path: root/release_it.sh
blob: b83772a51b818d3d40d3065b6fa706cf972245c0 (plain)
  1. #!/bin/sh
  2. HOST_SYSTEM=`uname -s`
  3. HOST_ARCH=`uname -m`
  4. STARTDIR=`pwd`
  5. CMAKE_BUILDDIR=build/$HOST_ARCH-$HOST_SYSTEM
  6. mkdir -p $CMAKE_BUILDDIR
  7. cd $CMAKE_BUILDDIR
  8. if test $HOST_SYSTEM = "Darwin" ; then
  9. cmake -DChronolog_WITH_DOCS:bool=ON \
  10. -DChronolog_WITH_TESTS:bool=ON \
  11. -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk \
  12. $STARTDIR;
  13. cd $STARTDIR
  14. mkdir -p build/Xcode
  15. cd build/Xcode
  16. cmake -DChronolog_WITH_DOCS:bool=ON \
  17. -DChronolog_WITH_TESTS:bool=ON \
  18. -DCXXTEST_INCLUDE_DIR=3rdparty/cxxtest \
  19. -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk \
  20. -G Xcode $STARTDIR;
  21. cd $STARTDIR
  22. elif test $HOST_SYSTEM = "Linux" ; then
  23. cmake -DChronolog_WITH_DOCS:bool=ON \
  24. -DChronolog_WITH_TESTS:bool=ON \
  25. $STARTDIR;
  26. else
  27. echo "not supported";
  28. fi
  29. cd $CMAKE_BUILDDIR
  30. cpack --config CPackSourceConfig.cmake
  31. cmake --build . --target all --target test --target package
  32. cmake --build . --target package_source
  33. cd $STARTDIR