build.sh 825 B

12345678910111213141516171819202122232425262728293031
  1. #-------------------------------------------------------------------------------------------------------
  2. # Copyright (C) Microsoft. All rights reserved.
  3. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. #-------------------------------------------------------------------------------------------------------
  5. if [ ! -d "BuildLinux" ]; then
  6. mkdir BuildLinux;
  7. fi
  8. pushd BuildLinux > /dev/null
  9. DEBUG_BUILD=0
  10. while getopts ":d" opt; do
  11. case $opt in
  12. d)
  13. DEBUG_BUILD=1
  14. ;;
  15. esac
  16. done
  17. if [ $DEBUG_BUILD -eq 1 ]; then
  18. echo Generating Debug makefiles
  19. cmake -DCMAKE_BUILD_TYPE=Debug ..
  20. else
  21. echo Generating Retail makefiles
  22. echo Building Retail;
  23. cmake -DCMAKE_BUILD_TYPE=Release ..
  24. fi
  25. make |& tee build.log
  26. popd > /dev/null