diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-09-30 18:09:11 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-09-30 18:09:11 (GMT) |
commit | 36fc437467630d59894deca7aff15b282cb938fb (patch) | |
tree | aed19a2397338f70990672658bb3510290de7dbd /config/toolchain | |
parent | 8d0196a0228129d1a0a9af27c604ab4cc5cee163 (diff) | |
download | hdf5-36fc437467630d59894deca7aff15b282cb938fb.zip hdf5-36fc437467630d59894deca7aff15b282cb938fb.tar.gz hdf5-36fc437467630d59894deca7aff15b282cb938fb.tar.bz2 |
Add clang toolchain
Diffstat (limited to 'config/toolchain')
-rw-r--r-- | config/toolchain/clang.cmake | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/config/toolchain/clang.cmake b/config/toolchain/clang.cmake new file mode 100644 index 0000000..7dac587 --- /dev/null +++ b/config/toolchain/clang.cmake @@ -0,0 +1,29 @@ +# Uncomment the following to use cross-compiling +#set(CMAKE_SYSTEM_NAME Linux) + +set(CMAKE_COMPILER_VENDOR "clang") + +set(CMAKE_C_COMPILER clang) +set(CMAKE_CXX_COMPILER clang++) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +find_program( + CLANG_TIDY_EXE + NAMES "clang-tidy" + DOC "Path to clang-tidy executable" +) + +set(CMAKE_C_CLANG_TIDY "${CLANG_TIDY_EXE}" -checks=*,clang-analyzer-*) +set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXE}" -checks=*,clang-analyzer-*) + +#find_program( +# CLANG_FORMAT_EXE +# NAMES "clang-format" +# DOC "Path to clang-format executable" +#) +# +#set(CMAKE_C_CLANG_FORMAT "${CLANG_FORMAT_EXE}") +#set(CMAKE_CXX_CLANG_FORMAT "${CLANG_FORMAT_EXE}") + +# the following is used if cross-compiling +set(CMAKE_CROSSCOMPILING_EMULATOR "") |