
set(TOOLCHAIN_DIR ${SOS_SDK_PATH})
set(TOOLCHAIN_LIB_DIR "${TOOLCHAIN_DIR}/lib" CACHE INTERNAL "GCC TOOLCHAIN LIBRARY DIR")
set(SOS_SDK_LIB_DIR "${TOOLCHAIN_DIR}/lib")

set(CMAKE_INSTALL_PREFIX ${TOOLCHAIN_DIR} CACHE INTERNAL "CLANG INSTALL PREFIX")
include_directories(SYSTEM ${TOOLCHAIN_DIR}/include)

set(SOS_SDK_IS_MACOS TRUE CACHE INTERNAL "MACOS BUILD")
set(TOOLCHAIN_C_FLAGS "-m64 -arch x86_64 -mmacosx-version-min=10.10 -D__macosx -D__processor_${CMAKE_HOST_SYSTEM_PROCESSOR}" CACHE INTERNAL "CLANG C FLAGS")
set(TOOLCHAIN_CXX_FLAGS "${TOOLCHAIN_C_FLAGS}" CACHE INTERNAL "CLANG CXX FLAGS")

set(CMAKE_INSTALL_PREFIX ${TOOLCHAIN_DIR} CACHE INTERNAL "CLANG TOOLCHAIN INSTALL PREFIX")

set(CMAKE_C_FLAGS "${TOOLCHAIN_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${TOOLCHAIN_CXX_FLAGS}")
message(STATUS "Use Clang flags ${CMAKE_CXX_FLAGS}")
message(STATUS "Use Install prefix ${CMAKE_INSTALL_PREFIX}")


set(CMAKE_C_COMPILER clang CACHE INTERNAL "CLANG TOOLCHAIN C COMPILER")
set(CMAKE_CXX_COMPILER clang++ CACHE INTERNAL "CLANG TOOLCHAIN C++ COMPILER")
