From 1bf6700fd3a4ecc856576e760029281a8b668bda Mon Sep 17 00:00:00 2001 From: doyle Date: Tue, 19 Jul 2022 18:01:26 +1000 Subject: [PATCH] linux stuff --- Installer/unix_build_template.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 Installer/unix_build_template.sh diff --git a/Installer/unix_build_template.sh b/Installer/unix_build_template.sh new file mode 100755 index 0000000..d9da95d --- /dev/null +++ b/Installer/unix_build_template.sh @@ -0,0 +1,30 @@ +script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +compiler_list=(gcc clang) + +for compiler in "${compiler_list[@]}" +do + version_list=() + if [[ "${compiler}" == "gcc" ]]; then + version_list+=(12.1.0) + version_list+=(11.3.0) + version_list+=(9.5.0) + cxx_compiler=g++ + c_compiler=gcc + elif [[ "${compiler}" == "clang" ]]; then + version_list+=(14.0.0) + cxx_compiler=clang++ + c_compiler=clang + fi + + for version in "${version_list[@]}" + do + if [[ "${compiler}" == "gcc" ]];then + cmake_flags="-D CMAKE_BUILD_RPATH='/home/doyle/Developer/Tools/gcc-mostlyportable/gcc-mostlyportable-${version}/usr/lib64/'" + fi + + build_dir=${script_dir}/build/${compiler}-${version} + + done + cp --force ${build_dir}/compile_commands.json . +done +