diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-04-08 02:07:31 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-04-08 02:07:31 (GMT) |
commit | 94ecd14100c226ae16ba8e6122e8a025b408f360 (patch) | |
tree | ead9be12c20e05113ec060ddfc81bac74c8162e9 /testpar | |
parent | ce39d7501c58427add05aba62956acb84a6f56da (diff) | |
download | hdf5-94ecd14100c226ae16ba8e6122e8a025b408f360.zip hdf5-94ecd14100c226ae16ba8e6122e8a025b408f360.tar.gz hdf5-94ecd14100c226ae16ba8e6122e8a025b408f360.tar.bz2 |
Brings many CMake changes from develop
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/CMakeLists.txt | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index a9f45d5..ff4446c 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -24,7 +24,7 @@ set (testphdf5_SOURCES add_executable (testphdf5 ${testphdf5_SOURCES}) target_compile_options(testphdf5 PRIVATE "${HDF5_CMAKE_C_FLAGS}") target_include_directories (testphdf5 - PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" + PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" ) if (NOT BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (testphdf5 STATIC) @@ -39,11 +39,18 @@ else () endif () set_target_properties (testphdf5 PROPERTIES FOLDER test/par) -MACRO (ADD_H5P_EXE file) +#----------------------------------------------------------------------------- +# Add Target to clang-format +#----------------------------------------------------------------------------- +if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_TEST_PAR_testphdf5_FORMAT testphdf5) +endif () + +macro (ADD_H5P_EXE file) add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) target_compile_options(${file} PRIVATE "${HDF5_CMAKE_C_FLAGS}") target_include_directories (${file} - PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" + PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>" ) if (NOT BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (${file} STATIC) @@ -59,7 +66,14 @@ MACRO (ADD_H5P_EXE file) ) endif () set_target_properties (${file} PROPERTIES FOLDER test/par) -ENDMACRO (ADD_H5P_EXE file) + + #----------------------------------------------------------------------------- + # Add Target to clang-format + #----------------------------------------------------------------------------- + if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_TEST_PAR_${file}_FORMAT ${file}) + endif () +endmacro (ADD_H5P_EXE file) set (H5P_TESTS t_mpi |