build_linux.sh 794 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. CPU_ARCHITECTURE=$(lscpu | grep Architecture | awk '{print $2}')
  7. if [ "$CPU_ARCHITECTURE" = "x86_64" ]
  8. then
  9. # Note: on x86/x64 platforms, O3DE requires a minimum of SSE 4.1, so we do request this.
  10. cmake -S temp/src -B temp/build -G "Unix Makefiles" \
  11. -DCMAKE_BUILD_TYPE=Release \
  12. -DISA_SSE41=ON \
  13. || exit $?
  14. elif [ "$CPU_ARCHITECTURE" = "aarch64" ]
  15. then
  16. cmake -S temp/src -B temp/build -G "Unix Makefiles" \
  17. -DCMAKE_BUILD_TYPE=Release \
  18. -DISA_NATIVE=ON \
  19. || exit $?
  20. fi
  21. cmake --build temp/build -j 8 || exit $?