Skip to content

Commit

Permalink
Fix auto-formatting setup in cmake (#5)
Browse files Browse the repository at this point in the history
* fix: Correct target for clang_format and cmake_format

Signed-off-by: Franz R. Sattler <[email protected]>
  • Loading branch information
satfra authored Dec 31, 2024
1 parent 38309b3 commit 94a2aa5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 3 additions & 2 deletions DiFfRG/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ file(GLOB_RECURSE sources CONFIGURE_DEPENDS
file(GLOB_RECURSE cuda_sources CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/source/*.cu")

clang_format(TARGET_NAME ${headers} ${sources} ${cuda_sources})
clang_format(format ${headers} ${sources} ${cuda_sources})

file(GLOB_RECURSE CMAKE_FILES CMakeLists.txt)

cmake_format(TARGET_NAME ${CMAKE_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/setup_build_system.cmake)
cmake_format(cmake-format ${CMAKE_FILES}
${CMAKE_CURRENT_SOURCE_DIR}/cmake/setup_build_system.cmake)
5 changes: 0 additions & 5 deletions DiFfRG/cmake/setup_build_system.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@ check_language(CUDA)
if(USE_CUDA AND CMAKE_CUDA_COMPILER)
enable_language(CUDA)

#if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
# set(CMAKE_CUDA_ARCHITECTURES native)
# message(WARNING "CMAKE_CUDA_ARCHITECTURES not set. Using native.")
#endif()

set(CUDA_NVCC_FLAGS
-Xcudafe
"--diag_suppress=20208 --diag_suppress=20012"
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ if [[ ${install_dir} != "n" ]] && [[ ${install_dir} != "N" ]]; then
rm -f ${idir}/_permission_test
echo
echo "Installing dependencies..."
bash -i ./install.sh -i ${idir}/bundled -j ${threads} ${cuda_flag} # &>${LOGPATH}/DiFfRG_dependencies_install.log
bash -i ./install.sh -i ${idir}/bundled -j ${threads} ${cuda_flag} 2>&1 | tee ${LOGPATH}/DiFfRG_dependencies_install.log
else
echo "Elevated permissions required for install path ${idir}."
sudo mkdir -p ${idir}
echo
echo "Installing dependencies..."
sudo -E bash -i ./install.sh -i ${idir}/bundled -j ${threads} ${cuda_flag} # &>${LOGPATH}/DiFfRG_dependencies_install.log
sudo -E bash -i ./install.sh -i ${idir}/bundled -j ${threads} ${cuda_flag} 2>&1 | tee ${LOGPATH}/DiFfRG_dependencies_install.log
fi
end=$(date +%s)
runtime=$((end - start))
Expand Down

0 comments on commit 94a2aa5

Please sign in to comment.