FreeRDP/cmake/ClangToolchain.cmake

18 lines
892 B
CMake
Raw Normal View History

2016-10-10 20:17:21 +03:00
if ($ENV{CLANG_VERSION})
SET (CLANG_VERSION "-$ENV{CLANG_VERSION}")
endif()
2023-05-23 09:41:25 +03: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-10 20:17:21 +03:00
SET (CMAKE_C_COMPILER "/usr/bin/clang${CLANG_VERSION}" CACHE PATH "")
2023-05-23 09:41:25 +03: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-10 20:17:21 +03: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 "")