diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-09-30 18:08:57 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-09-30 18:08:57 (GMT) |
commit | cd30b3b13a560643d0534b1d7e0557696e026574 (patch) | |
tree | a25e14fa768b8379b476b8391ffc9875f0bf2f1c /config | |
parent | d6d7ac084b949d8c9e95e18f6b662d3cf786cbe8 (diff) | |
download | hdf5-cd30b3b13a560643d0534b1d7e0557696e026574.zip hdf5-cd30b3b13a560643d0534b1d7e0557696e026574.tar.gz hdf5-cd30b3b13a560643d0534b1d7e0557696e026574.tar.bz2 |
Add clang toolchain
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/HDF5_Examples.cmake.in | 2 | ||||
-rw-r--r-- | config/toolchain/clang.cmake | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index bac174a..016bec5 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -74,7 +74,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDN #TAR_SOURCE - name of tarfile #if(NOT DEFINED TAR_SOURCE) -# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.12.4-Source") +# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.12.5-Source") #endif() ############################################################################################################### 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 "") |