#!/usr/bin/python
# -*- coding: UTF-8 -*-

import compiler_prompt
from basic.ap_log import *

_820a_compiler = """
SET(CMAKE_SYSTEM_NAME "820a")
SET(CMAKE_C_COMPILER /opt/820a/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-gcc)
SET(CMAKE_CXX_COMPILER /opt/820a/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-g++)
SET(CMAKE_AR /opt/820a/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-ar)
SET(CMAKE_LINK /opt/820a/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-g++)
SET(CMAKE_STRIP /opt/820a/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -O2 -feliminate-unused-debug-types --sysroot=/opt/820a/sysroots/aarch64-agl-linux -I/opt/820a/sysroots/x86_64-aglsdk-linux/usr/share/aclocal")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -O2 -feliminate-unused-debug-types --sysroot=/opt/820a/sysroots/aarch64-agl-linux -I/opt/820a/sysroots/x86_64-aglsdk-linux/usr/share/aclocal")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -I/opt/820a/sysroots/x86_64-aglsdk-linux/usr/include -L/opt/820a/sysroots/x86_64-aglsdk-linux/usr/lib64")
"""
android_compiler = """
SET(CMAKE_SYSTEM_NAME "Android")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fno-exceptions -ffunction-sections -fdata-sections")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fno-exceptions -ffunction-sections -fdata-sections")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -Wl,--no-wchar-size-warning")
"""
android_arm64_v8a_compiler = """
SET(CMAKE_SYSTEM_NAME "Android")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -ffunction-sections -fdata-sections")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -ffunction-sections -fdata-sections")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -Wl,--no-wchar-size-warning")
"""
android_asan_compiler = """
SET(CMAKE_SYSTEM_NAME "Android")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fno-exceptions -fsanitize=address")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fno-exceptions -fsanitize=address")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -fsanitize=address")
"""
android_trace_compiler = """
SET(CMAKE_SYSTEM_NAME "Android")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fno-exceptions -ffunction-sections -fdata-sections")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fno-exceptions -ffunction-sections -fdata-sections")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -Wl,--no-wchar-size-warning")
"""
android_arm64_v8a_asan_compiler = """
SET(CMAKE_SYSTEM_NAME "Android")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fsanitize=address")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fsanitize=address")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -fsanitize=address")
"""
android_x86_asan_compiler = """
SET(CMAKE_SYSTEM_NAME "Android")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fsanitize=address")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fsanitize=address")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -fsanitize=address")
"""
android_x64_asan_compiler = """
SET(CMAKE_SYSTEM_NAME "Android")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fsanitize=address")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fsanitize=address")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--gc-sections -fsanitize=address")
"""
mac_compiler = """
SET(CMAKE_SYSTEM_NAME "mac")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -v -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fno-exceptions -Werror=return-type")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -v -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fno-exceptions -Werror=return-type")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl")
SET(CMAKE_STRIP "${CMAKE_STRIP} -x")
"""
ios_compiler = """
SET(CMAKE_SYSTEM_NAME "ios")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fno-exceptions")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -fpermissive -fno-exceptions")
"""
ubuntu_32bit_compiler = """
SET(CMAKE_SYSTEM_NAME "ubuntu")
SET(CMAKE_C_COMPILER gcc)
SET(CMAKE_CXX_COMPILER g++)
SET(CMAKE_AR ar)
SET(CMAKE_LINK g++)
SET(CMAKE_STRIP strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m32 -L. -Wl,-rpath,/opt/Qt5.0.2/5.0.2/gcc -Wl,-rpath,/opt/Qt5.0.2/5.0.2/gcc/lib -Wl,-no-undefined")
LINK_DIRECTORIES("/opt/Qt5.0.2/5.0.2/gcc/lib")
LINK_DIRECTORIES(".")
"""
ubuntu_64bit_compiler = """
SET(CMAKE_SYSTEM_NAME "ubuntu")
SET(CMAKE_C_COMPILER gcc)
SET(CMAKE_CXX_COMPILER g++)
SET(CMAKE_AR ar)
SET(CMAKE_LINK g++)
SET(CMAKE_STRIP strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64 -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m64 -L. -Wl,-rpath,/opt/Qt5.0.2/5.0.2/gcc -Wl,-rpath,/opt/Qt5.0.2/5.0.2/gcc/lib -Wl,-no-undefined")
"""
ubuntu_32bit_asan_compiler = """
SET(CMAKE_SYSTEM_NAME "ubuntu")
SET(CMAKE_C_COMPILER gcc)
SET(CMAKE_CXX_COMPILER g++)
SET(CMAKE_AR ar)
SET(CMAKE_LINK g++)
SET(CMAKE_STRIP strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -pipe -O2 -Wall -W -fshort-wchar -fsanitize=address")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -pipe -O2 -Wall -W -fshort-wchar -fsanitize=address")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -m32 -L. -Wl,-rpath,/opt/Qt5.0.2/5.0.2/gcc -Wl,-rpath,/opt/Qt5.0.2/5.0.2/gcc/lib -Wl,-no-undefined -fsanitize=address")
"""
honda_compiler = """
SET(CMAKE_SYSTEM_NAME "honda")
SET(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc-4.8)
SET(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++-4.8)
SET(CMAKE_AR /usr/bin/arm-linux-gnueabihf-ar)
SET(CMAKE_LINK /usr/bin/arm-linux-gnueabihf-g++-4.8)
SET(CMAKE_STRIP /usr/bin/arm-linux-gnueabihf-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -L. -Wl,-rpath,/opt/Qt5.0.2/5.0.2/gcc/lib_arm")
"""
v1_delphi_compiler = """
SET(CMAKE_SYSTEM_NAME "v1_delphi")
SET(CMAKE_C_COMPILER /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-none-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-none-linux-gnueabi-g++)
SET(CMAKE_AR /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-none-linux-gnueabi-ar)
SET(CMAKE_LINK /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-none-linux-gnueabi-g++)
SET(CMAKE_STRIP /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-none-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
"""
venucia331_compiler = """
SET(CMAKE_SYSTEM_NAME "venucia331")
SET(CMAKE_C_COMPILER /home/visteon/host/usr/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /home/visteon/host/usr/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_AR /home/visteon/host/usr/bin/arm-linux-gnueabihf-ar)
SET(CMAKE_LINK /home/visteon/host/usr/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_STRIP /home/visteon/host/usr/bin/arm-linux-gnueabihf-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/home/visteon/host/usr/arm-buildroot-linux-gnueabihf/sysroot/")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/home/visteon/host/usr/arm-buildroot-linux-gnueabihf/sysroot/")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -L. --sysroot=/home/visteon/host/usr/arm-buildroot-linux-gnueabihf/sysroot/")
"""
win32_compiler = r"""
SET(CMAKE_SYSTEM_NAME "vs2008_vs2012_vs2015")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /GF /Zc:wchar_t- /Od /wd4251 /wd4819 /wd4996 /wd4018 /wd4091 /wd4305 /wd4800 /Zi /MP")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GF /Zc:wchar_t- /Od /wd4251 /wd4819 /wd4996 /wd4018 /wd4091 /wd4305 /wd4800 /Zi /MP")
"""
desay_g6_compiler = """
SET(CMAKE_SYSTEM_NAME "desay_g6")
SET(CMAKE_C_COMPILER /work/sdk/sv-g6s-system-sdk/sysroots/x86_64-oesdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc)
SET(CMAKE_CXX_COMPILER /work/sdk/sv-g6s-system-sdk/sysroots/x86_64-oesdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++)
SET(CMAKE_AR /work/sdk/sv-g6s-system-sdk/sysroots/x86_64-oesdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ar)
SET(CMAKE_LINK /work/sdk/sv-g6s-system-sdk/sysroots/x86_64-oesdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ld)
SET(CMAKE_STRIP /work/sdk/sv-g6s-system-sdk/sysroots/x86_64-oesdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-strip)
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -L.")
"""
nxp_imx6_compiler = """
SET(CMAKE_SYSTEM_NAME "nxp_imx6")
SET(CMAKE_C_COMPILER /opt/alios/nxp_imx6/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /opt/alios/nxp_imx6/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_AR /opt/alios/nxp_imx6/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-ar)
SET(CMAKE_LINK /opt/alios/nxp_imx6/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_STRIP /opt/alios/nxp_imx6/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/opt/alios/nxp_imx6/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/sysroot")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/opt/alios/nxp_imx6/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/sysroot")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
LINK_DIRECTORIES("/opt/alios/nxp_imx6/rootfs/armhf/lib")
INCLUDE_DIRECTORIES("/opt/alios/nxp_imx6/rootfs/armhf/include")
INCLUDE_DIRECTORIES("/opt/alios/nxp_imx6/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/sysroot/usr/include")
LINK_DIRECTORIES("/opt/alios/nxp_imx6/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/sysroot/usr/lib")
"""
nxp_imx8_compiler = """
SET(CMAKE_SYSTEM_NAME "nxp_imx8")
SET(CMAKE_C_COMPILER /opt/alios/nxp_imx8/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc)
SET(CMAKE_CXX_COMPILER /opt/alios/nxp_imx8/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++)
SET(CMAKE_AR /opt/alios/nxp_imx8/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc-ar)
SET(CMAKE_LINK /opt/alios/nxp_imx8/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++)
SET(CMAKE_STRIP /opt/alios/nxp_imx8/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -pipe -g -fshort-wchar -feliminate-unused-debug-types --sysroot=/opt/alios/nxp_imx8/sysroots/aarch64-poky-linux")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pipe -g -fshort-wchar -feliminate-unused-debug-types --sysroot=/opt/alios/nxp_imx8/sysroots/aarch64-poky-linux")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
LINK_DIRECTORIES("/opt/alios/nxp_imx8/rootfs/usr/lib64")
INCLUDE_DIRECTORIES("/opt/alios/nxp_imx8/rootfs/usr/include")
"""

nxp_imx8_v220_compiler = """
SET(CMAKE_SYSTEM_NAME "nxp_imx8_v220")
SET(CMAKE_C_COMPILER /opt/nxp_imx8_v220/aarch64-linux-gnueabi-4.9-glibc-2.20/bin/aarch64-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /opt/nxp_imx8_v220/aarch64-linux-gnueabi-4.9-glibc-2.20/bin/aarch64-linux-gnueabi-g++)
SET(CMAKE_AR /opt/nxp_imx8_v220/aarch64-linux-gnueabi-4.9-glibc-2.20/bin/aarch64-linux-gnueabi-gcc-ar)
SET(CMAKE_LINK /opt/nxp_imx8_v220/aarch64-linux-gnueabi-4.9-glibc-2.20/bin/aarch64-linux-gnueabi-g++)
SET(CMAKE_STRIP /opt/nxp_imx8_v220/aarch64-linux-gnueabi-4.9-glibc-2.20/bin/aarch64-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -pipe -g -fshort-wchar -feliminate-unused-debug-types --sysroot=/opt/nxp_imx8_v220/aarch64-linux-gnueabi-4.9-glibc-2.20/sysroot")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pipe -g -fshort-wchar -feliminate-unused-debug-types --sysroot=/opt/nxp_imx8_v220/aarch64-linux-gnueabi-4.9-glibc-2.20/sysroot")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
LINK_DIRECTORIES("/opt/nxp_imx8_v220/rootfs/arm64/lib" "/opt/nxp_imx8_v220/aarch64-linux-gnueabi-4.9-glibc-2.20/sysroot/usr/lib64")
INCLUDE_DIRECTORIES("/opt/nxp_imx8_v220/rootfs/arm64/include")
"""

emulator_ivi_compiler = """
SET(CMAKE_SYSTEM_NAME "emulator_ivi")
SET(CMAKE_C_COMPILER /opt/alios/emulator_ivi/toolchain/i686-linux-gnu-4.9-glibc-2.20/bin/i686-linux-gnu-gcc)
SET(CMAKE_CXX_COMPILER /opt/alios/emulator_ivi/toolchain/i686-linux-gnu-4.9-glibc-2.20/bin/i686-linux-gnu-g++)
SET(CMAKE_AR /opt/alios/emulator_ivi/toolchain/i686-linux-gnu-4.9-glibc-2.20/bin/i686-linux-gnu-ar)
SET(CMAKE_LINK /opt/alios/emulator_ivi/toolchain/i686-linux-gnu-4.9-glibc-2.20/bin/i686-linux-gnu-g++)
SET(CMAKE_STRIP /opt/alios/emulator_ivi/toolchain/i686-linux-gnu-4.9-glibc-2.20/bin/i686-linux-gnu-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
LINK_DIRECTORIES("/opt/alios/emulator_ivi/rootfs/x86/openssl/lib")
INCLUDE_DIRECTORIES("/opt/alios/emulator_ivi/rootfs/x86/openssl/include")
"""
ti_ip31_compiler = """
SET(CMAKE_SYSTEM_NAME "ti_ip31")
SET(CMAKE_C_COMPILER /opt/alios/ti_ip31/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /opt/alios/ti_ip31/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_AR /opt/alios/ti_ip31/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-ar)
SET(CMAKE_LINK /opt/alios/ti_ip31/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_STRIP /opt/alios/ti_ip31/toolchain/arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
"""
tiho_j6_compiler = """
SET(CMAKE_SYSTEM_NAME "tiho_j6")
SET(CMAKE_C_COMPILER /opt/tiho_j6/arm-linux-gnueabihf-5.3-glibc-2.21/bin/arm-linux-gnueabihf-gcc-5.3.1)
SET(CMAKE_CXX_COMPILER /opt/tiho_j6/arm-linux-gnueabihf-5.3-glibc-2.21/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_AR /opt/tiho_j6/arm-linux-gnueabihf-5.3-glibc-2.21/bin/arm-linux-gnueabihf-ar)
SET(CMAKE_LINK /opt/tiho_j6/arm-linux-gnueabihf-5.3-glibc-2.21/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_STRIP /opt/tiho_j6/arm-linux-gnueabihf-5.3-glibc-2.21/bin/arm-linux-gnueabihf-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -pipe -O2 -Wall -W -fshort-wchar -fpermissive -funwind-tables -fexceptions --sysroot=/opt/tiho_j6/arm-linux-gnueabihf-5.3-glibc-2.21/sysroot/")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpic -pipe -O2 -Wall -W -fshort-wchar -fpermissive -funwind-tables -fexceptions --sysroot=/opt/tiho_j6/arm-linux-gnueabihf-5.3-glibc-2.21/sysroot/")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -fpic -pipe -O2 -Wall -W -fshort-wchar -fpermissive -funwind-tables -fexceptions --sysroot=/opt/tiho_j6/arm-linux-gnueabihf-5.3-glibc-2.21/sysroot/ -Wl,--no-whole-archive")
"""
nxp_aplus_compiler = """
SET(CMAKE_SYSTEM_NAME "nxp_aplus")
SET(CMAKE_C_COMPILER /opt/alios/nxp_aplus/toolchain/arm-linux-gnueabihf-4.9-glibc-2.21/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /opt/alios/nxp_aplus/toolchain/arm-linux-gnueabihf-4.9-glibc-2.21/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_AR /opt/alios/nxp_aplus/toolchain/arm-linux-gnueabihf-4.9-glibc-2.21/bin/arm-linux-gnueabihf-ar)
SET(CMAKE_LINK /opt/alios/nxp_aplus/toolchain/arm-linux-gnueabihf-4.9-glibc-2.21/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_STRIP /opt/alios/nxp_aplus/toolchain/arm-linux-gnueabihf-4.9-glibc-2.21/bin/arm-linux-gnueabihf-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions --sysroot=/opt/alios/nxp_aplus/toolchain/arm-linux-gnueabihf-4.9-glibc-2.21/sysroot/")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions --sysroot=/opt/alios/nxp_aplus/toolchain/arm-linux-gnueabihf-4.9-glibc-2.21/sysroot/")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
SET(CMAKE_STRIP "/opt/alios/nxp_aplus/toolchain/arm-linux-gnueabihf-4.9-glibc-2.21/bin/arm-linux-gnueabihf-strip")
"""
gtmc_281_compiler = """
SET(CMAKE_SYSTEM_NAME "GTMC_281")
SET(CMAKE_C_COMPILER /home/281/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /home/281/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
SET(CMAKE_ASM_COMPILER /home/281/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
SET(CMAKE_AR /home/281/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ar)
SET(CMAKE_LINK /home/281/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
SET(CMAKE_STRIP /home/281/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/home/281/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/home/281/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi")
SET(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/home/281/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -Wl,-no-undefined")
"""
fujitsuten_compiler = """
SET(CMAKE_SYSTEM_NAME "Fujitsuten")
SET(CMAKE_C_COMPILER /home/plusplusc/toolchains/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /home/plusplusc/toolchains/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++)
SET(CMAKE_AR /home/plusplusc/toolchains/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-ar)
SET(CMAKE_LINK /home/plusplusc/toolchains/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++)
SET(CMAKE_STRIP /home/plusplusc/toolchains/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
"""
greatwall_121v_compiler = """
SET(CMAKE_SYSTEM_NAME "121v")
SET(CMAKE_C_COMPILER /home/plusplusc/conti/ps-111011-fsl-mvatp2-imx6er5-M11-7-3.10_160628_1600388/tools/bin/arm-none-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /home/plusplusc/conti/ps-111011-fsl-mvatp2-imx6er5-M11-7-3.10_160628_1600388/tools/bin/arm-none-linux-gnueabi-g++)
SET(CMAKE_AR /home/plusplusc/conti/ps-111011-fsl-mvatp2-imx6er5-M11-7-3.10_160628_1600388/tools/bin/arm-none-linux-gnueabi-ar)
SET(CMAKE_LINK "/home/plusplusc/conti/ps-111011-fsl-mvatp2-imx6er5-M11-7-3.10_160628_1600388/tools/bin/arm-none-linux-gnueabi-g++")
SET(CMAKE_STRIP /home/plusplusc/conti/ps-111011-fsl-mvatp2-imx6er5-M11-7-3.10_160628_1600388/tools/bin/arm-none-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -L/home/plusplusc/montavista/imx6x-std-adk/armv7a-mv-linux/usr/lib -Wl,-rpath-link,/home/plusplusc/montavista/imx6x-std-adk/armv7a-mv-linux/usr/lib -Wl,-O2")
"""
pivi_compiler = """
SET(CMAKE_SYSTEM_NAME "pivi")
SET(CMAKE_C_COMPILER /opt/prebuilt_QNX700/host/linux/x86_64/usr/bin/qcc)
SET(CMAKE_CXX_COMPILER /opt/prebuilt_QNX700/host/linux/x86_64/usr/bin/qcc)
SET(CMAKE_AR /opt/prebuilt_QNX700/host/linux/x86_64/usr/bin/ntoaarch64-ar)
SET(CMAKE_LINKER /opt/prebuilt_QNX700/host/linux/x86_64/usr/bin/qcc)
SET(CMAKE_STRIP /opt/prebuilt_QNX700/host/linux/x86_64/usr/bin/ntoaarch64-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall -W -fshort-wchar -fpermissive -Vgcc_ntoaarch64le")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall -W -fshort-wchar -fpermissive -Vgcc_ntoaarch64le -lang-c++")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -Wl,-no-undefined -Wl,-rpath-link,. -Wl,-rpath-link,../lib -Vgcc_ntoaarch64le -lang-c++")
"""
qnx650_compiler = """
SET(CMAKE_SYSTEM_NAME "qnx650")
SET(CMAKE_C_COMPILER /home/plusplusc/qnx650/host/linux/x86/usr/bin/qcc)
SET(CMAKE_CXX_COMPILER /home/plusplusc/qnx650/host/linux/x86/usr/bin/qcc)
SET(CMAKE_AR /home/plusplusc/qnx650/host/linux/x86/usr/bin/ntoarmv7-ar)
SET(CMAKE_LINK /home/plusplusc/qnx650/host/linux/x86/usr/bin/qcc)
SET(CMAKE_STRIP /home/plusplusc/qnx650/host/linux/x86/usr/bin/strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -O2 -Wall -W -fshort-wchar -fpermissive -Vgcc_ntoarmv7le")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -O2 -Wall -W -fshort-wchar -fpermissive -Vgcc_ntoarmv7le -lang-c++")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -Wl,-no-undefined -Wl,-rpath-link,. -Wl,-rpath-link,../lib -Vgcc_ntoarmv7le -lang-c++")
"""
qnx660_compiler = """
SET(CMAKE_SYSTEM_NAME "qnx660")
SET(CMAKE_C_COMPILER /home/alibaba/qnx660/host/linux/x86/usr/bin/qcc)
SET(CMAKE_CXX_COMPILER /home/alibaba/qnx660/host/linux/x86/usr/bin/qcc)
SET(CMAKE_AR /home/alibaba/qnx660/host/linux/x86/usr/bin/ntoarmv7-ar)
SET(CMAKE_LINKER /home/alibaba/qnx660/host/linux/x86/usr/bin/qcc)
SET(CMAKE_STRIP /home/alibaba/qnx660/host/linux/x86/usr/bin/arm-unknown-nto-qnx6.6.0eabi-strip-2.24)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -Wall -W -fshort-wchar -fpermissive -Vgcc_ntoarmv7le")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall -W -fshort-wchar -fpermissive -Vgcc_ntoarmv7le -lang-c++")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-no-undefined")
"""
renesas_h3_compiler = """
SET(CMAKE_SYSTEM_NAME "renesas_h3")
SET(CMAKE_C_COMPILER /opt/toolchains/H3Tools/aarch64-poky-linux-5.2-glibc-2.22/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc)
SET(CMAKE_CXX_COMPILER /opt/toolchains/H3Tools/aarch64-poky-linux-5.2-glibc-2.22/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++)
SET(CMAKE_AR /opt/toolchains/H3Tools/aarch64-poky-linux-5.2-glibc-2.22/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ar)
SET(CMAKE_LINK /opt/toolchains/H3Tools/aarch64-poky-linux-5.2-glibc-2.22/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++)
SET(CMAKE_STRIP /opt/toolchains/H3Tools/aarch64-poky-linux-5.2-glibc-2.22/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -fpermissive -fpic -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions --sysroot=/opt/toolchains/H3Tools/aarch64-poky-linux-5.2-glibc-2.22/aarch64-poky-linux -I/opt/rootfs/usr/include")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -fpic -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions --sysroot=/opt/toolchains/H3Tools/aarch64-poky-linux-5.2-glibc-2.22/aarch64-poky-linux -I/opt/rootfs/usr/include")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -L/opt/rootfs/usr/lib64")
LINK_DIRECTORIES("/opt/rootfs/usr/lib64")
"""
sgm_jbuc_compiler = """
SET(CMAKE_SYSTEM_NAME "sgm-jbuc")
SET(CMAKE_C_COMPILER /opt/fsl-imx-fb/4.1.15-2.0.0/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /opt/fsl-imx-fb/4.1.15-2.0.0/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
SET(CMAKE_AR /opt/fsl-imx-fb/4.1.15-2.0.0/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ar)
SET(CMAKE_LINK /opt/fsl-imx-fb/4.1.15-2.0.0/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
SET(CMAKE_STRIP /opt/fsl-imx-fb/4.1.15-2.0.0/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/fsl-imx-fb/4.1.15-2.0.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/fsl-imx-fb/4.1.15-2.0.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
"""
aplus_compiler = """
SET(CMAKE_SYSTEM_NAME "aplus")
SET(CMAKE_C_COMPILER /opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
SET(CMAKE_AR /opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ar)
SET(CMAKE_LINK "/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ -march=armv7-a -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a9")
SET(CMAKE_STRIP /opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --sysroot=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi -pipe -O2 -Wall -W -fshort-wchar -march=armv7-a -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a9 -feliminate-unused-debug-types -fdebug-prefix-map=/bsp/fsl-yocto-L4.1.15_2.1.0-ga/build-fb/tmp/work/x86_64-nativesdk-pokysdk-linux/meta-environment-imx6qsabresd/1.0-r8=/usr/src/debug/meta-environment-imx6qsabresd/1.0-r8 -fdebug-prefix-map=/bsp/fsl-yocto-L4.1.15_2.1.0-ga/build-fb/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/bsp/fsl-yocto-L4.1.15_2.1.0-ga/build-fb/tmp/sysroots/x86_64-nativesdk-pokysdk-linux=")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --sysroot=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi -pipe -O2 -Wall -W -fshort-wchar -march=armv7-a -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a9 -feliminate-unused-debug-types -fdebug-prefix-map=/bsp/fsl-yocto-L4.1.15_2.1.0-ga/build-fb/tmp/work/x86_64-nativesdk-pokysdk-linux/meta-environment-imx6qsabresd/1.0-r8=/usr/src/debug/meta-environment-imx6qsabresd/1.0-r8 -fdebug-prefix-map=/bsp/fsl-yocto-L4.1.15_2.1.0-ga/build-fb/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/bsp/fsl-yocto-L4.1.15_2.1.0-ga/build-fb/tmp/sysroots/x86_64-nativesdk-pokysdk-linux=")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed")
"""
aplk_gp_64_cmake = """
SET(CMAKE_SYSTEM_NAME "aplk_gp_64")
SET(CMAKE_C_COMPILER "/opt/x86_64-linux-gnu-4.9-glibc-2.20/bin/x86_64-linux-gnu-gcc")
SET(CMAKE_CXX_COMPILER "/opt/x86_64-linux-gnu-4.9-glibc-2.20/bin/x86_64-linux-gnu-g++")
SET(CMAKE_AR "/opt/x86_64-linux-gnu-4.9-glibc-2.20/bin/x86_64-linux-gnu-ar")
SET(CMAKE_LINK "/opt/x86_64-linux-gnu-4.9-glibc-2.20/bin/x86_64-linux-gnu-g++")
SET(CMAKE_STRIP "/opt/x86_64-linux-gnu-4.9-glibc-2.20/bin/x86_64-linux-gnu-strip")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions -fpermissive --sysroot=/opt/x86_64-linux-gnu-4.9-glibc-2.20/sysroot  -I/opt/rootfs/usr/include")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpic -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions -fpermissive --sysroot=/opt/x86_64-linux-gnu-4.9-glibc-2.20/sysroot  -I/opt/rootfs/usr/include")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
LINK_DIRECTORIES("/opt/aplk_gp_64/rootfs/openssl/lib")
INCLUDE_DIRECTORIES("/opt/aplk_gp_64/rootfs/openssl/include")
"""
aplus3_compiler = """
SET(CMAKE_SYSTEM_NAME "aplus3")
SET(CMAKE_C_COMPILER /opt/aplus3/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /opt/aplus3/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-g++)
SET(CMAKE_AR /opt/aplus3/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-ar)
SET(CMAKE_LINK /opt/aplus3/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-g++)
SET(CMAKE_STRIP /opt/aplus3/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions --sysroot=/opt/aplus3/arm-linux-gnueabi-4.9-glibc-2.20/sysroot")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions --sysroot=/opt/aplus3/arm-linux-gnueabi-4.9-glibc-2.20/sysroot")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions --sysroot=/opt/aplus3/arm-linux-gnueabi-4.9-glibc-2.20/sysroot -Wl,--no-whole-archive")
"""
banma_compiler = """
SET(CMAKE_SYSTEM_NAME "banma")
SET(CMAKE_C_COMPILER /opt/toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /opt/toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_AR /opt/toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-ar)
SET(CMAKE_LINK /opt/toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_STRIP /opt/toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-glibc-2.20/bin/arm-linux-gnueabihf-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/opt/toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-glibc-2.20/sysroot")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/opt/toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-glibc-2.20/sysroot")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
LINK_DIRECTORIES("/opt/rootfs/usr/lib")
INCLUDE_DIRECTORIES("/opt/rootfs/usr/include")
"""
banma_j6p_compiler = """
SET(CMAKE_SYSTEM_NAME "banma_j6p")
SET(CMAKE_C_COMPILER   /opt/banma_j6p/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /opt/banma_j6p/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_AR           /opt/banma_j6p/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-ar)
SET(CMAKE_LINK         /opt/banma_j6p/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++)
SET(CMAKE_STRIP        /opt/banma_j6p/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/opt/banma_j6p/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/sysroot")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/opt/banma_j6p/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/sysroot")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
LINK_DIRECTORIES("/opt/banma_j6p/rootfs_ep21/yunos6.0/rootfs4map/usr/lib")
INCLUDE_DIRECTORIES("/opt/banma_j6p/rootfs_ep21/yunos6.0/rootfs4map/usr/include")
"""
banma_x86_pc_compiler = """
SET(CMAKE_SYSTEM_NAME "banma_x86_pc")
SET(CMAKE_C_COMPILER   /opt/banma_x86_pc/toolschain/bin/i686-linux-gnu-gcc)
SET(CMAKE_CXX_COMPILER /opt/banma_x86_pc/toolschain/bin/i686-linux-gnu-g++)
SET(CMAKE_AR           /opt/banma_x86_pc/toolschain/bin/i686-linux-gnu-ar)
SET(CMAKE_LINK         /opt/banma_x86_pc/toolschain/bin/i686-linux-gnu-g++)
SET(CMAKE_STRIP        /opt/banma_x86_pc/toolschain/bin/i686-linux-gnu-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/opt/banma_x86_pc/toolschain/sysroot")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/opt/banma_x86_pc/toolschain/sysroot")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
LINK_DIRECTORIES("/opt/banma_x86_pc/rootfs/usr/lib")
INCLUDE_DIRECTORIES("/opt/banma_x86_pc/rootfs/usr/include")
"""

banma_qc8150_compiler = """
SET(CMAKE_SYSTEM_NAME "banma_qc8150")
SET(CMAKE_C_COMPILER   /opt/banma_qc8150/toolschain/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-gcc)
SET(CMAKE_CXX_COMPILER /opt/banma_qc8150/toolschain/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-g++)
SET(CMAKE_AR           /opt/banma_qc8150/toolschain/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-ar)
SET(CMAKE_LINK         /opt/banma_qc8150/toolschain/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-g++)
SET(CMAKE_STRIP        /opt/banma_qc8150/toolschain/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --sysroot=/opt/banma_qc8150/toolschain/sysroots/aarch64-agl-linux -O2 -fomit-frame-pointer    -Wa,--noexecstack -fexpensive-optimizations   -frename-registers -ftree-vectorize   -finline-functions -finline-limit=64   -Wno-error=maybe-uninitialized -Wno-error=unused-result ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --sysroot=/opt/banma_qc8150/toolschain/sysroots/aarch64-agl-linux -O2 -fomit-frame-pointer    -Wa,--noexecstack -fexpensive-optimizations   -frename-registers -ftree-vectorize   -finline-functions -finline-limit=64   -Wno-error=maybe-uninitialized -Wno-error=unused-result ")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed ")
LINK_DIRECTORIES("/opt/banma_qc8150/rootfs/usr/lib64")
INCLUDE_DIRECTORIES("/opt/banma_qc8150/rootfs/usr/include")
"""

geely_cma_compiler = """
SET(CMAKE_SYSTEM_NAME "geely_cma")
SET(CMAKE_C_COMPILER /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
SET(CMAKE_AR /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ar)
SET(CMAKE_LINK /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
SET(CMAKE_STRIP /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
SET(CMAKE_AUTOMOC ON)"""
a_ivi_compiler = """
SET(CMAKE_SYSTEM_NAME "A-IVI")
SET(CMAKE_C_COMPILER /home/plusplusc/tool/AIVI/bin/arm-none-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /home/plusplusc/tool/AIVI/bin/arm-none-linux-gnueabi-g++)
SET(CMAKE_AR /home/plusplusc/tool/AIVI/bin/arm-none-linux-gnueabi-ar)
SET(CMAKE_LINK /home/plusplusc/tool/AIVI/bin/arm-none-linux-gnueabi-g++)
SET(CMAKE_STRIP /home/plusplusc/tool/AIVI/bin/arm-none-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -Wl,--gc-sections -Wl,--hash-style=gnu --sysroot=/home/plusplusc/tool/AIVI/sysroots/mx6q -rdynamic -Wl,-R,--enable-new-dtags")
"""
ngi_compiler = """
SET(CMAKE_SYSTEM_NAME "ngi")
SET(CMAKE_C_COMPILER gcc)
SET(CMAKE_CXX_COMPILER g++)
SET(CMAKE_AR ar)
SET(CMAKE_LINK g++)
SET(CMAKE_STRIP strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/opt/ngi -I/opt/ngi/usr/include")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar --sysroot=/opt/ngi -I/opt/ngi/usr/include")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
"""

ngi_r8_compiler = """
SET(CMAKE_SYSTEM_NAME "ngi")
SET(CMAKE_C_COMPILER gcc)
SET(CMAKE_CXX_COMPILER g++)
SET(CMAKE_AR ar)
SET(CMAKE_LINK g++)
SET(CMAKE_STRIP strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -I/opt/ngi/usr/include")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -I/opt/ngi/usr/include")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
"""

brilliance_m82_compiler = """
SET(CMAKE_SYSTEM_NAME "brilliance_m82")
SET(CMAKE_C_COMPILER /home/alibaba/hc/arm-imx6x-linux-gcc/bin/arm-linux-gcc)
SET(CMAKE_CXX_COMPILER /home/alibaba/hc/arm-imx6x-linux-gcc/bin/arm-linux-g++)
SET(CMAKE_AR /home/alibaba/hc/arm-imx6x-linux-gcc/bin/arm-linux-ar)
SET(CMAKE_LINK /home/alibaba/hc/arm-imx6x-linux-gcc/bin/arm-linux-g++)
SET(CMAKE_STRIP /home/alibaba/hc/arm-imx6x-linux-gcc/bin/arm-linux-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --sysroot=/home/alibaba/M82/ -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --sysroot=/home/alibaba/M82/ -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
"""

k215_compiler = """
SET(CMAKE_SYSTEM_NAME "k215")
SET(CMAKE_C_COMPILER arm-fsl-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER arm-fsl-linux-gnueabi-g++)
SET(CMAKE_AR arm-fsl-linux-gnueabi-ar)
SET(CMAKE_LINK arm-fsl-linux-gnueabi-g++)
SET(CMAKE_STRIP arm-fsl-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
"""

kc1b_compiler = """
SET(CMAKE_SYSTEM_NAME "kc1b")
SET(CMAKE_C_COMPILER /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
SET(CMAKE_ASM_COMPILER /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
SET(CMAKE_AR /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ar)
SET(CMAKE_LINK /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
SET(CMAKE_STRIP /opt/poky/1.7.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
SET(CMAKE_AUTOMOC ON)"""

gac_desay_a35_compiler = """
SET(CMAKE_SYSTEM_NAME "gac_desay_a35")
SET(CMAKE_C_COMPILER /opt/sv-g5r2-system-sdk/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-gcc )
SET(CMAKE_CXX_COMPILER /opt/sv-g5r2-system-sdk/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-g++ )
SET(CMAKE_AR /opt/sv-g5r2-system-sdk/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-ar)
SET(CMAKE_STRIP /opt/sv-g5r2-system-sdk/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --sysroot=/opt/sv-g5r2-system-sdk/sysroots/armv7ahf-neon-linux-gnueabi -I/opt/sv-g5r2-system-sdk/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/c++/5.3.1 -I/opt/sv-g5r2-system-sdk/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/c++/5.3.1/arm-linux-gnueabihf -O2 -pipe -feliminate-unused-debug-types -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -Wall -W -fshort-wchar --sysroot=/opt/sv-g5r2-system-sdk/sysroots/armv7ahf-neon-linux-gnueabi ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --sysroot=/opt/sv-g5r2-system-sdk/sysroots/armv7ahf-neon-linux-gnueabi -I/opt/sv-g5r2-system-sdk/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/c++/5.3.1 -I/opt/sv-g5r2-system-sdk/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/c++/5.3.1/arm-linux-gnueabihf -O2 -pipe -feliminate-unused-debug-types -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -Wall -W -fshort-wchar --sysroot=/opt/sv-g5r2-system-sdk/sysroots/armv7ahf-neon-linux-gnueabi -v")
"""
psa_harman_2020_compiler = """
SET(CMAKE_SYSTEM_NAME "psa_harman_2020")
SET(CMAKE_C_COMPILER "/opt/psa_harman_2020/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-gcc")
SET(CMAKE_CXX_COMPILER "/opt/psa_harman_2020/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-g++")
SET(CMAKE_AR "/opt/psa_harman_2020/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-ar")
SET(CMAKE_LINK "/opt/psa_harman_2020/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-g++")
SET(CMAKE_STRIP "/opt/psa_harman_2020/sysroots/x86_64-aglsdk-linux/usr/bin/aarch64-agl-linux/aarch64-agl-linux-strip")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -pipe -g -std=c++11 -fwide-exec-charset=UTF-16LE -feliminate-unused-debug-types --sysroot=/opt/psa_harman_2020/sysroots/aarch64-agl-linux")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pipe -g -std=c++11 -fwide-exec-charset=UTF-16LE -feliminate-unused-debug-types --sysroot=/opt/psa_harman_2020/sysroots/aarch64-agl-linux")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed")
LINK_DIRECTORIES("/opt/psa_harman_2020/sysroots/aarch64-agl-linux/usr/lib")
INCLUDE_DIRECTORIES("/opt/psa_harman_2020/sysroots/aarch64-agl-linux/usr/include")
"""

yqhqivi20_compiler = """
SET(CMAKE_SYSTEM_NAME "yqhqivi20")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -pipe -Wall -W -fshort-wchar -fpermissive -feliminate-unused-debug-types --sysroot=/opt/yqhqivi20/sysroots/corei7-64-poky-linux")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pipe -Wall -W -fshort-wchar -fpermissive -feliminate-unused-debug-types --sysroot=/opt/yqhqivi20/sysroots/corei7-64-poky-linux")
SET(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -O2 -pipe -Wall -W -fshort-wchar -fpermissive -feliminate-unused-debug-types --sysroot=/opt/yqhqivi20/sysroots/corei7-64-poky-linux")
SET(CMAKE_C_COMPILER "/opt/yqhqivi20/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc")
SET(CMAKE_CXX_COMPILER "/opt/yqhqivi20/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++")
SET(CMAKE_ASM_COMPILER "/opt/yqhqivi20/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++")
SET(CMAKE_AR "/opt/yqhqivi20/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-ar")
SET(CMAKE_LINK "/opt/yqhqivi20/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++")
SET(CMAKE_STRIP "/opt/yqhqivi20/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-strip")
LINK_DIRECTORIES("/opt/yqhqivi20/sysroots/corei7-64-poky-linux/usr/lib")
INCLUDE_DIRECTORIES("/opt/yqhqivi20/sysroots/corei7-64-poky-linux/usr/include")
"""
yqhqivi20hs5_compiler = """
SET(CMAKE_SYSTEM_NAME "yqhqivi20hs5")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -pipe -Wall -W -fshort-wchar -fpermissive -feliminate-unused-debug-types --sysroot=/opt/oecore-x86_64/sysroots/corei7-64-poky-linux")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pipe -Wall -W -fshort-wchar -fpermissive -feliminate-unused-debug-types --sysroot=/opt/oecore-x86_64/sysroots/corei7-64-poky-linux")
SET(CMAKE_C_COMPILER "/opt/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc")
SET(CMAKE_CXX_COMPILER "/opt/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++")
SET(CMAKE_STRIP "/opt/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-strip")
SET(CMAKE_AR "/opt/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-ar")
SET(CMAKE_LINK "/opt/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++")
"""
yqhqivi20hs7_compiler = """
SET(CMAKE_SYSTEM_NAME "yqhqivi20hs7")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -pipe -Wall -W -fshort-wchar -fpermissive -feliminate-unused-debug-types --sysroot=/opt/oecore-x86_64/sysroots/corei7-64-poky-linux")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pipe -Wall -W -fshort-wchar -fpermissive -feliminate-unused-debug-types --sysroot=/opt/oecore-x86_64/sysroots/corei7-64-poky-linux")
SET(CMAKE_C_COMPILER "/opt/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-gcc")
SET(CMAKE_CXX_COMPILER "/opt/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++")
SET(CMAKE_STRIP "/opt/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-strip")
SET(CMAKE_AR "/opt/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-ar")
SET(CMAKE_LINK "/opt/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++")
"""

yqhqhd_compiler = """
SET(CMAKE_SYSTEM_NAME "yqhqhd")
SET(CMAKE_C_COMPILER /opt/fsl-auto/2.4.1/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-gcc)
SET(CMAKE_CXX_COMPILER /opt/fsl-auto/2.4.1/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-g++)
SET(CMAKE_LINK /opt/fsl-auto/2.4.1/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-g++)
SET(CMAKE_STRIP /opt/fsl-auto/2.4.1/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-strip)
SET(CMAKE_AR /opt/fsl-auto/2.4.1/sysroots/x86_64-fslbsp-linux/usr/bin/aarch64-fsl-linux/aarch64-fsl-linux-ar)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -pipe -g -feliminate-unused-debug-types ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pipe -g -feliminate-unused-debug-types ")
SET(CMAKE_LD_FLAGS "-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed")
LINK_DIRECTORIES("/opt/fsl-auto/2.4.1/sysroots/aarch64-fsl-linux/usr/lib")
INCLUDE_DIRECTORIES("/opt/fsl-auto/2.4.1/sysroots/aarch64-fsl-linux/usr/include")
"""

ac8225_compiler = """
SET(CMAKE_SYSTEM_NAME "ac8225")
SET(CMAKE_C_COMPILER "/opt/poky/1.7.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc")
SET(CMAKE_CXX_COMPILER "/opt/poky/1.7.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++")
SET(CMAKE_LINK "/opt/poky/1.7.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon --sysroot=/opt/poky/1.7.2/sysroots/armv7a-vfp-neon-poky-linux-gnueabi")
SET(CMAKE_STRIP /opt/poky/1.7.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-strip)
SET(CMAKE_AR /opt/poky/1.7.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ar)
SET(CMAKE_C_FLAGS "  -fPIC  -funwind-tables -O2 -pipe -g -feliminate-unused-debug-types  -funwind-tables -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon --sysroot=/opt/poky/1.7.2/sysroots/armv7a-vfp-neon-poky-linux-gnueabi")
SET(CMAKE_CXX_FLAGS "  -fPIC  -funwind-tables -O2 -pipe -g -feliminate-unused-debug-types  -funwind-tables -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon --sysroot=/opt/poky/1.7.2/sysroots/armv7a-vfp-neon-poky-linux-gnueabi")
SET(CMAKE_LD_FLAGS "-Wl,-O1 -Wl,--hash-style=gnu  -rdynamic -Wl,--as-needed")
SET(CMAKE_AR_FLAGS "cr")
LINK_DIRECTORIES("/opt/rootfs/usr/lib")
INCLUDE_DIRECTORIES("/opt/rootfs/usr/include")
"""

wave4_compiler = """
SET(CMAKE_SYSTEM_NAME "wave4")
SET(CMAKE_C_COMPILER /home/plusplusc/conti/ps-111011-fsl-mvatp2-imx6er5-M11-7-3.10_160628_1600388/tools/bin/arm-none-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /home/plusplusc/conti/ps-111011-fsl-mvatp2-imx6er5-M11-7-3.10_160628_1600388/tools/bin/arm-none-linux-gnueabi-g++)
SET(CMAKE_AR /home/plusplusc/conti/ps-111011-fsl-mvatp2-imx6er5-M11-7-3.10_160628_1600388/tools/bin/arm-none-linux-gnueabi-ar)
SET(CMAKE_LINK /home/plusplusc/conti/ps-111011-fsl-mvatp2-imx6er5-M11-7-3.10_160628_1600388/tools/bin/arm-none-linux-gnueabi-g++ )
SET(CMAKE_STRIP /home/plusplusc/conti/ps-111011-fsl-mvatp2-imx6er5-M11-7-3.10_160628_1600388/tools/bin/arm-none-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -march=armv7-a -mfloat-abi=hard -mfpu=neon -mthumb-interwork -mno-unaligned-access")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -march=armv7-a -mfloat-abi=hard -mfpu=neon -mthumb-interwork -mno-unaligned-access")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -L/home/plusplusc/montavista/imx6x-std-adk/armv7a-mv-linux/usr/lib -Wl,-rpath-link,/home/plusplusc/montavista/imx6x-std-adk/armv7a-mv-linux/usr/lib -Wl,-O2 -march=armv7-a -mfloat-abi=hard -mfpu=neon -mthumb-interwork -mno-unaligned-access")
LINK_DIRECTORIES("/home/plusplusc/montavista/imx6x-std-adk/armv7a-mv-linux/usr/lib")
"""

cns30_compiler = """
SET(CMAKE_SYSTEM_NAME "cns30")
SET(CMAKE_C_COMPILER /opt/pcc-zr3-sdk/toolchain/bin/aarch64-linux-gnu-gcc)
SET(CMAKE_CXX_COMPILER /opt/pcc-zr3-sdk/toolchain/bin/aarch64-linux-gnu-g++)
SET(CMAKE_AR /opt/pcc-zr3-sdk/toolchain/bin/aarch64-linux-gnu-ar)
SET(CMAKE_LINK /opt/pcc-zr3-sdk/toolchain/bin/aarch64-linux-gnu-g++ )
SET(CMAKE_STRIP /opt/pcc-zr3-sdk/toolchain/bin/aarch64-linux-gnu-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -pipe -feliminate-unused-debug-types -march=armv8-a -mtune=cortex-a57.cortex-a53 -ffunction-sections -fdata-sections")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pipe -feliminate-unused-debug-types -march=armv8-a -mtune=cortex-a57.cortex-a53 -ffunction-sections -fdata-sections -std=c++11")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -Wl,-O1 -Wl,--hash-style=gnu -Wl,--gc-sections")
LINK_DIRECTORIES("/opt/pcc-zr3-sdk/aarch64-linux-gnu")
"""

xpqchd_compiler = """
SET(CMAKE_SYSTEM_NAME "xpqchd")
SET(QNX_BASE "/opt/xpqchd/prebuilt_QNX700")
SET(QNX_HOST "/opt/xpqchd/prebuilt_QNX700/host/linux/x86_64")
SET(QNX_TARGET "${QNX_BASE}/target/qnx7")
SET(arch gcc_ntoaarch64le)
SET(CMAKE_C_COMPILER /opt/xpqchd/prebuilt_QNX700/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.0.0-gcc)
SET(CMAKE_C_COMPILER_TARGET ${arch})
SET(CMAKE_CXX_COMPILER /opt/xpqchd/prebuilt_QNX700/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.0.0-g++)
SET(CMAKE_CXX_COMPILER_TARGET ${arch})
SET(CMAKE_AR /opt/xpqchd/prebuilt_QNX700/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.0.0-ar)
SET(CMAKE_LINK /opt/xpqchd/prebuilt_QNX700/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.0.0-g++)
SET(CMAKE_STRIP /opt/xpqchd/prebuilt_QNX700/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.0.0-strip)
SET(QNX_MAKEFLAGS "-I${QNX_BASE}/target/qnx7/usr/include -DPLATFORM_QNX -DPLATFORM_PIVI")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpermissive -Os -fno-builtin-memcpy -finline-limit=300 -g -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -finline-functions -fpic -ftree-vectorize -Wall -Wcast-align ${QNX_MAKEFLAGS} ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -Os -fno-builtin-memcpy -finline-limit=300 -g -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -finline-functions -fpic -ftree-vectorize -Wall -Wcast-align ${QNX_MAKEFLAGS}")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -Wl,-no-undefined -Wl,-nostdlib -Wl,-rpath-link,. -Wl,-rpath-link,../lib")
SET(QNX_CONFIGURATION "/opt/xpqchd/.qnx")
SET(ENV{QNX_HOST} "${QNX_HOST}")
SET(ENV{QNX_TARGET} "${QNX_TARGET}")
"""

centos64_compiler = """
SET(CMAKE_SYSTEM_NAME "centos64")
SET(CMAKE_C_COMPILER /usr/bin/gcc)
SET(CMAKE_CXX_COMPILER /usr/bin/g++)
SET(CMAKE_AR /usr/bin/ar)
SET(CMAKE_STRIP /usr/bin/strip)
LINK_DIRECTORIES("/usr/lib")
INCLUDE_DIRECTORIES("/usr/include")
INCLUDE_DIRECTORIES("/usr/local/include")
"""

aplus3auto_compiler = """
SET(CMAKE_SYSTEM_NAME "aplus3auto")
SET(CMAKE_C_COMPILER /opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-g++)
SET(CMAKE_AR /opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-ar)
SET(CMAKE_LINK /opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-g++)
SET(CMAKE_STRIP /opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions --sysroot=/opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/sysroot")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions --sysroot=/opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/sysroot")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions --sysroot=/opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/sysroot -Wl,--no-whole-archive")
LINK_DIRECTORIES("/opt/aplus3auto/rootfs/usr/lib")
INCLUDE_DIRECTORIES("/opt/aplus3auto/rootfs/usr/include")
"""

aplus3auto_asan_compiler = """
SET(CMAKE_SYSTEM_NAME "aplus3auto")
SET(CMAKE_C_COMPILER /opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-gcc)
SET(CMAKE_CXX_COMPILER /opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-g++)
SET(CMAKE_AR /opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-ar)
SET(CMAKE_LINK /opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-g++)
SET(CMAKE_STRIP /opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/bin/arm-linux-gnueabi-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -pipe -O2 -Wall -W -fshort-wchar -fsanitize=address -funwind-tables -fexceptions --sysroot=/opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/sysroot")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pipe -O2 -Wall -W -fshort-wchar -fsanitize=address -funwind-tables -fexceptions --sysroot=/opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/sysroot")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -funwind-tables -fexceptions --sysroot=/opt/aplus3auto/toolschain/arm-linux-gnueabi-4.9-glibc-2.20/sysroot -Wl,--no-whole-archive")
LINK_DIRECTORIES("/opt/aplus3auto/rootfs/usr/lib")
INCLUDE_DIRECTORIES("/opt/aplus3auto/rootfs/usr/include")
"""

patacpoc_compiler = """
SET(CMAKE_SYSTEM_NAME "patacpoc")
SET(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc)
SET(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++)
SET(CMAKE_AR /usr/bin/aarch64-linux-gnu-ar)
SET(CMAKE_LINK /usr/bin/aarch64-linux-gnu-g++)
SET(CMAKE_STRIP /usr/bin/aarch64-linux-gnu-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -L. -Wl, -Wl, -Wl,-no-undefined")
"""

hcp3_compiler = """
SET(CMAKE_SYSTEM_NAME "hcp3")
SET(CMAKE_C_COMPILER /opt/hcp3/toolschain/sysroots/x86_64-hcp3-linux/usr/bin/x86_64-hcp3-linux-musl/x86_64-hcp3-linux-musl-clang)
SET(CMAKE_CXX_COMPILER /opt/hcp3/toolschain/sysroots/x86_64-hcp3-linux/usr/bin/x86_64-hcp3-linux-musl/x86_64-hcp3-linux-musl-clang++)
SET(CMAKE_AR /opt/hcp3/toolschain/sysroots/x86_64-hcp3-linux/usr/bin/x86_64-hcp3-linux-musl/x86_64-hcp3-linux-musl-ar)
SET(CMAKE_LINK /opt/hcp3/toolschain/sysroots/x86_64-hcp3-linux/usr/bin/x86_64-hcp3-linux-musl/x86_64-hcp3-linux-musl-clang++)
SET(CMAKE_STRIP /opt/hcp3/toolschain/sysroots/x86_64-hcp3-linux/usr/bin/x86_64-hcp3-linux-musl/x86_64-hcp3-linux-musl-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse  -mlittle-endian  -O2 -pipe -g -feliminate-unused-debug-types --sysroot=/opt/hcp3/toolschain/sysroots/core2-64-hcp3-linux-musl")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse  -mlittle-endian  -O2 -pipe -g -feliminate-unused-debug-types --sysroot=/opt/hcp3/toolschain/sysroots/core2-64-hcp3-linux-musl")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/opt/hcp3/toolschain/sysroots/core2-64-hcp3-linux-musl")
LINK_DIRECTORIES("/opt/hcp3/rootfs/target/usr/lib")
INCLUDE_DIRECTORIES("/opt/hcp3/rootfs/target/usr/include")
"""

rcarm3w_1_0_compiler = """
SET(CMAKE_SYSTEM_NAME "rcarm3w_1_0")
SET(CMAKE_C_COMPILER /opt/rcarm3w_1_0/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc)
SET(CMAKE_CXX_COMPILER /opt/rcarm3w_1_0/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++)
SET(CMAKE_AR /opt/rcarm3w_1_0/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ar)
SET(CMAKE_LINK /opt/rcarm3w_1_0/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++)
SET(CMAKE_STRIP /opt/rcarm3w_1_0/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -feliminate-unused-debug-types -march=armv8-a -mtune=cortex-a57.cortex-a53 --sysroot=/opt/rcarm3w_1_0/sysroots/aarch64-poky-linux -I/opt/rcarm3w_1_0/sysroots/x86_64-pokysdk-linux/usr/share/aclocal")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -feliminate-unused-debug-types -march=armv8-a -mtune=cortex-a57.cortex-a53 --sysroot=/opt/rcarm3w_1_0/sysroots/aarch64-poky-linux -I/opt/rcarm3w_1_0/sysroots/x86_64-pokysdk-linux/usr/share/aclocal")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
LINK_DIRECTORIES("/opt/rcarm3w_1_0/rootfs/usr/lib")
INCLUDE_DIRECTORIES("/opt/rcarm3w_1_0/rootfs/usr/include")
"""

rcarm3w_1_1_compiler = """
SET(CMAKE_SYSTEM_NAME "rcarm3w_1_1")
SET(CMAKE_C_COMPILER /opt/rcarm3w_1_1/toolschain/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc)
SET(CMAKE_CXX_COMPILER /opt/rcarm3w_1_1/toolschain/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++)
SET(CMAKE_AR /opt/rcarm3w_1_1/toolschain/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-ar)
SET(CMAKE_LINK /opt/rcarm3w_1_1/toolschain/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-g++)
SET(CMAKE_STRIP /opt/rcarm3w_1_1/toolschain/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -feliminate-unused-debug-types -march=armv8-a -mtune=cortex-a57.cortex-a53 --sysroot=/opt/rcarm3w_1_1/toolschain/aarch64-poky-linux -I/opt/rcarm3w_1_1/toolschain/x86_64-pokysdk-linux/usr/share/aclocal")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -O2 -Wall -W -fshort-wchar -feliminate-unused-debug-types -march=armv8-a -mtune=cortex-a57.cortex-a53 --sysroot=/opt/rcarm3w_1_1/toolschain/aarch64-poky-linux -I/opt/rcarm3w_1_1/toolschain/x86_64-pokysdk-linux/usr/share/aclocal")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS}")
LINK_DIRECTORIES("/opt/rcarm3w_1_1/rootfs/usr/lib")
INCLUDE_DIRECTORIES("/opt/rcarm3w_1_1/rootfs/usr/include")
"""

hcp3_ifu_compiler = """
SET(CMAKE_SYSTEM_NAME "hcp3_ifu")
SET(CMAKE_C_COMPILER /opt/hcp3_ifu/toolschain/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux-musl/aarch64-poky-linux-musl-clang)
SET(CMAKE_CXX_COMPILER /opt/hcp3_ifu/toolschain/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux-musl/aarch64-poky-linux-musl-clang++)
SET(CMAKE_AR /opt/hcp3_ifu/toolschain/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux-musl/aarch64-poky-linux-musl-ar)
SET(CMAKE_LINK /opt/hcp3_ifu/toolschain/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux-musl/aarch64-poky-linux-musl-clang++)
SET(CMAKE_STRIP /opt/hcp3_ifu/toolschain/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux-musl/aarch64-poky-linux-musl-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -mlittle-endian --sysroot=/opt/hcp3_ifu/toolschain/sysroots/aarch64-poky-linux-musl -m64 -O2 -fno-omit-frame-pointer -g -feliminate-unused-debug-types  -pipe -fuse-ld=lld -flto ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlittle-endian --sysroot=/opt/hcp3_ifu/toolschain/sysroots/aarch64-poky-linux-musl -m64 -O2 -fno-omit-frame-pointer -g -feliminate-unused-debug-types  -pipe -fuse-ld=lld -flto")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS " -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -mlittle-endian --sysroot=/opt/hcp3_ifu/toolschain/sysroots/aarch64-poky-linux-musl")
LINK_DIRECTORIES("/opt/hcp3_ifu/rootfs/usr/lib")
INCLUDE_DIRECTORIES("/opt/hcp3_ifu/rootfs/usr/include")
"""

ab_compiler = """
SET(CMAKE_SYSTEM_NAME "ab")
SET(CMAKE_C_COMPILER /opt/ab/toolschain/sysroots/x86_64-oesdk-linux/usr/bin/aarch64-gnu-linux/aarch64-gnu-linux-gcc)
SET(CMAKE_CXX_COMPILER /opt/ab/toolschain/sysroots/x86_64-oesdk-linux/usr/bin/aarch64-gnu-linux/aarch64-gnu-linux-g++)
SET(CMAKE_AR /opt/ab/toolschain/sysroots/x86_64-oesdk-linux/usr/bin/aarch64-gnu-linux/aarch64-gnu-linux-ar)
SET(CMAKE_LINK /opt/ab/toolschain/sysroots/x86_64-oesdk-linux/usr/bin/aarch64-gnu-linux/aarch64-gnu-linux-g++)
SET(CMAKE_STRIP /opt/ab/toolschain/sysroots/x86_64-oesdk-linux/usr/bin/aarch64-gnu-linux/aarch64-gnu-linux-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -fshort-wchar -fno-omit-frame-pointer -march=armv8-a+crypto -mtune=cortex-a57 -funwind-tables --sysroot=/opt/ab/toolschain/sysroots/aarch64-gnu-linux -O2 -pipe -g -std=c++11 -feliminate-unused-debug-types -DNTG_DEVEL -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -W -fshort-wchar -fno-omit-frame-pointer -march=armv8-a+crypto -mtune=cortex-a57 -funwind-tables --sysroot=/opt/ab/toolschain/sysroots/aarch64-gnu-linux -O2 -pipe -g -std=c++11 -feliminate-unused-debug-types -DNTG_DEVEL -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 ")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS " --sysroot=/opt/ab/toolschain/sysroots/aarch64-gnu-linux -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now -Wl,--gc-sections ")
LINK_DIRECTORIES("/opt/ab/rootfs/usr/lib")
LINK_DIRECTORIES("/opt/ab/toolschain/sysroots/aarch64-gnu-linux/usr/lib")
INCLUDE_DIRECTORIES("/opt/ab/rootfs/usr/include")
INCLUDE_DIRECTORIES("/opt/ab/toolschain/sysroots/aarch64-gnu-linux/usr/include")
INCLUDE_DIRECTORIES("/opt/ab/toolschain/sysroots/aarch64-gnu-linux/usr/include/qt5")
"""

hhthd_compiler = """
SET(CMAKE_SYSTEM_NAME "hhthd")
SET(CMAKE_C_COMPILER /opt/hhthd/toolschain/bin/aarch64-linux-gnu-gcc)
SET(CMAKE_CXX_COMPILER /opt/hhthd/toolschain/bin/aarch64-linux-gnu-g++)
SET(CMAKE_AR /opt/hhthd/toolschain/bin/aarch64-linux-gnu-ar)
SET(CMAKE_LINK /opt/hhthd/toolschain/bin/aarch64-linux-gnu-g++)
SET(CMAKE_STRIP /opt/hhthd/toolschain/bin/aarch64-linux-gnu-strip)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -fshort-wchar -march=armv8-a -mtune=cortex-a57 -funwind-tables --sysroot=/opt/hhthd/toolschain/aarch64-linux-gnu/libc -O2 -pipe -g -feliminate-unused-debug-types ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -W -fshort-wchar -march=armv8-a -mtune=cortex-a57 -funwind-tables --sysroot=/opt/hhthd/toolschain/aarch64-linux-gnu/libc -O2 -pipe -g -feliminate-unused-debug-types ")
SET(CMAKE_AR_FLAGS "${CMAKE_AR_FLAGS} cr")
SET(CMAKE_LD_FLAGS " --sysroot=/opt/hhthd/toolschain/aarch64-linux-gnu/libc -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed ")
LINK_DIRECTORIES("/opt/hhthd/toolschain/aarch64-linux-gnu/libc/usr/lib")
INCLUDE_DIRECTORIES("/opt/hhthd/toolschain/aarch64-linux-gnu/libc/usr/include")
"""

project_compiler_dict = {
    "121v": greatwall_121v_compiler,
    "820a": _820a_compiler,
    "ac8225": ac8225_compiler,
    "ac8225_lite": ac8225_compiler,
    "aivi": a_ivi_compiler,
    "ab" : ab_compiler,
    "android_arm64_v8a": android_arm64_v8a_compiler,
    "android_arm64_v8a_asan": android_arm64_v8a_asan_compiler,
    "android_armeabi_v7a": android_compiler,
    "android_armeabi_v7a_asan": android_asan_compiler,
    "android_armeabi_v7a_memory": android_compiler,
    "android_armeabi_v7a_trace": android_trace_compiler,
    "android_armeabi_v7a_sgm": android_compiler,
    "android_x86": android_compiler,
    "android_x86_asan": android_x86_asan_compiler,
    "android_x64": android_compiler,
    "android_x64_asan": android_x64_asan_compiler,
    #jni平台,BL使用,其他模块不用
    'android_arm64_v8a_bl_jni': android_compiler,
    'android_armeabi_v7a_bl_jni': android_compiler,
    'android_x86_bl_jni': android_compiler,
    'android_x64_bl_jni': android_compiler,
    #
    "aplk_gp_64": aplk_gp_64_cmake,
    "aplus": aplus_compiler,
    "aplus3": aplus3_compiler,
    "aplus3auto": aplus3auto_compiler,
    "aplus3auto_asan": aplus3auto_asan_compiler,
    "banma": banma_compiler,
    "banma_j6p": banma_j6p_compiler,
    "banma_qc8150": banma_qc8150_compiler,
    "banma_x86_pc": banma_x86_pc_compiler,
    "brilliance_m82": brilliance_m82_compiler,
    "cns30": cns30_compiler,
    "desay_g6": desay_g6_compiler,
    "emulator_ivi": emulator_ivi_compiler,
    "fca_pana_vp4r": qnx660_compiler,
    "fujitsuten": fujitsuten_compiler,
    "gac_desay_a35": gac_desay_a35_compiler,
    # 'gac_harman_a3k': qnx650_compiler,
    "geely_cma": geely_cma_compiler,
    "gtmc_281": gtmc_281_compiler,
    "gtmc_457": fujitsuten_compiler,
    "gtmc_659b": gtmc_281_compiler,
    "honda": honda_compiler,
    "ios": ios_compiler,
    "k215": k215_compiler,
    "kc1b": kc1b_compiler,
    "mac": mac_compiler,
    "ngi": ngi_compiler,
    "ngi_r8": ngi_r8_compiler,
    "nxp_aplus": nxp_aplus_compiler,
    "nxp_imx6": nxp_imx6_compiler,
    "nxp_imx8": nxp_imx8_compiler,
    "nxp_imx8_v220": nxp_imx8_v220_compiler,
    "pivi": pivi_compiler,
    "qnx660": qnx660_compiler,
    "qnx650": qnx650_compiler,
    "renesas_h3": renesas_h3_compiler,
    "s106": pivi_compiler,
    "sgm_jbuc": sgm_jbuc_compiler,
    "ti_ip31": ti_ip31_compiler,
    "tiho_j6": tiho_j6_compiler,
    "ubuntu32_asan": ubuntu_32bit_asan_compiler,
    "ubuntu_x86_gcc54": ubuntu_32bit_compiler,
    # 'ubuntu_x64_gcc48': ubuntu_64bit_compiler,
    "ubuntu_x64_gcc54": ubuntu_64bit_compiler,
    "v1_delphi": v1_delphi_compiler,
    "venucia331": venucia331_compiler,
    "volvo_mini6410": win32_compiler,
    "volvo_spa": win32_compiler,
    "vs2015_x86": win32_compiler,
    "vs2015_x64": win32_compiler,
    "wave4": wave4_compiler,
    "win32": win32_compiler,
    "psa_harman_2020": psa_harman_2020_compiler,
    "yqhqivi20": yqhqivi20_compiler,
    "yqhqivi20hs5": yqhqivi20hs5_compiler,
    "yqhqivi20hs7": yqhqivi20hs7_compiler,
    "android": android_compiler,
    "ubuntu": ubuntu_32bit_compiler,
    "vs2015": win32_compiler,
    "yqhqhd": yqhqhd_compiler,
    "xpqchd": xpqchd_compiler,
    "centos64": centos64_compiler,
    "patacpoc": patacpoc_compiler,
    "hcp3": hcp3_compiler,
    "rcarm3w_1_0": rcarm3w_1_0_compiler,
    "rcarm3w_1_1": rcarm3w_1_1_compiler,
    "hcp3_ifu": hcp3_ifu_compiler,
    "hhthd": hhthd_compiler
}

debug_compiler_option = """
SET(CMAKE_BUILD_TYPE Debug)"""
release_compiler_option = """
SET(CMAKE_BUILD_TYPE Release)"""
linux_debug_compiler_option = """
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
"""


def get_compiler(operate_system, project, version_config="release"):
    """
    获取交叉编译器。
    """
    cmake_command = project_compiler_dict.get(project)
    if cmake_command is not None:
        if version_config == "debug":
            cmake_command += debug_compiler_option
        else:
            cmake_command += release_compiler_option
        if not operate_system in ["windows", "wince"]:
            cmake_command += linux_debug_compiler_option
            cmake_command += compiler_prompt.get_compiler_prompt("linux")

    return cmake_command


if __name__ == "__main__":
    _operate_system = "android"
    _project = "android_armeabi_v7a"
    _cmake_command = get_compiler(_operate_system, _project)
    if _cmake_command is None:
        loge('"{}"  project is not yet configured.'.format(_project))
    else:
        loge(_cmake_command)
        _operate_system = "linux"
        _project = "Honda"
    _cmake_command = get_compiler(_operate_system, _project)
    if _cmake_command is None:
        loge('"{}"  project is not yet configured.'.format(_project))
    else:
        loge(_cmake_command)
 

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐