FreeRDP/cmake/ClangToolchain.cmake

18 lines
892 B
CMake
Raw Normal View History

2016-10-11 01:17:21 +08:00
if ($ENV{CLANG_VERSION})
SET (CLANG_VERSION "-$ENV{CLANG_VERSION}")
endif()
2023-05-23 14:41:25 +08:00
SET (CLANG_WARNINGS "-pedantic -Weverything -Wno-padded -Wno-covered-switch-default -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-cast-align")
2016-10-11 01:17:21 +08:00
SET (CMAKE_C_COMPILER "/usr/bin/clang${CLANG_VERSION}" CACHE PATH "")
2023-05-23 14:41:25 +08:00
SET (CMAKE_C_FLAGS ${CLANG_WARNINGS} CACHE STRING "")
SET (CMAKE_CXX_COMPILER "/usr/bin/clang++${CLANG_VERSION}" CACHE PATH "")
SET (CMAKE_CXX_FLAGS ${CLANG_WARNINGS} CACHE STRING "")
2016-10-11 01:17:21 +08:00
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 "")