FreeRDP/cmake/ClangToolchain.cmake
2018-04-06 08:27:52 +02:00

17 lines
845 B
CMake

if ($ENV{CLANG_VERSION})
SET (CLANG_VERSION "-$ENV{CLANG_VERSION}")
endif()
SET (CMAKE_C_COMPILER "/usr/bin/clang${CLANG_VERSION}" CACHE PATH "")
SET (CMAKE_C_FLAGS "-pedantic -Wall -std=gnu99" CACHE STRING "")
SET (CMAKE_C_FLAGS_DEBUG "-g" CACHE STRING "")
SET (CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG" CACHE STRING "")
SET (CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG" CACHE STRING "")
SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "")
SET (CMAKE_AR "/usr/bin/llvm-ar${CLANG_VERSION}" CACHE PATH "")
SET (CMAKE_LINKER "/usr/bin/llvm-link${CLANG_VERSION}" CACHE PATH "")
SET (CMAKE_NM "/usr/bin/llvm-nm${CLANG_VERSION}" CACHE PATH "")
SET (CMAKE_OBJDUMP "/usr/bin/llvm-objdump${CLANG_VERSION}" CACHE PATH "")
SET (CMAKE_RANLIB "/usr/bin/llvm-ranlib${CLANG_VERSION}" CACHE PATH "")