diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-09-30 18:35:29 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-09-30 18:35:29 (GMT) |
commit | d23453e329a4b64f75077ee7a840f9ed59b53aab (patch) | |
tree | a6db4b3b965345e19a01393a0f14a2e011200362 | |
parent | 4de1fa88c258223fdb031e1bb1179785ecfcc166 (diff) | |
parent | f6d4ce609b16601f3f4733266bb413a2bd765bc1 (diff) | |
download | hdf5-d23453e329a4b64f75077ee7a840f9ed59b53aab.zip hdf5-d23453e329a4b64f75077ee7a840f9ed59b53aab.tar.gz hdf5-d23453e329a4b64f75077ee7a840f9ed59b53aab.tar.bz2 |
Merge pull request #1960 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'f6d4ce609b16601f3f4733266bb413a2bd765bc1':
Add clang 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 "") |