Skip to content
Snippets Groups Projects
Select Git revision
  • 9e7685acb339cddb1436b715faf821298802b164
  • main default protected
  • convert-cookiecutter
  • expand-documentation
  • enable-security-dashboard
  • fix-clang-tidy
6 results

format-cmake.sh

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    format-cmake.sh 282 B
    #!/bin/bash
    
    set -e
    
    if [ ! $(which cmake-format) ]; then
    	echo "Please install cmake-format"
    	exit 1
    fi
    
    ROOT="$(git rev-parse --show-toplevel)"
    
    find "$ROOT" -type d -name build -prune -false -o -type f \( -name 'CMakeLists.txt' -o -name '*.cmake' \) -exec cmake-format -i \{} \;