Skip to content
Permalink
Browse files

Style: Use `cmake-format` 0.6

  • Loading branch information
sanssecours committed Oct 18, 2019
1 parent ee52e0d commit 4ac987dfb893f4a280f17a6703ff3a61c3dc48b7
@@ -164,7 +164,7 @@ mac_task:
brew install python@2; brew link --overwrite python@2
brew install python || brew upgrade python
- | # Install Python packages
pip install cmake-format[yaml]==0.5.4
pip install cmake-format[yaml]==0.6
- | # Install Ruby (We use the Homebrew version of Ruby to install gems, since compiling `ronn` fails with the macOs version of Ruby.)
brew install ruby@2.6
export PATH="/usr/local/opt/ruby@2.6/bin:/usr/local/lib/ruby/gems/2.6.0/bin:$PATH"
@@ -238,7 +238,7 @@ before_install:
sudo apt-get install libzmq3-dev
sudo apt-get install libxerces-c-dev
sudo apt-get install moreutils # contains `sponge` required by `reformat-cmake`
sudo pip install cmake-format[yaml]==0.5.4
sudo pip install cmake-format[yaml]==0.6
fi
#
@@ -264,15 +264,15 @@ cmake-format CMakeLists.txt | unexpand | sponge CMakeLists.txt
Since `cmake-format` is written in [Python](https://www.python.org) you usually install it via Python’s package manager `pip`:

```sh
# Install cmake format `0.5.4` with support for YAML config files
pip install cmake-format[yaml]==0.5.4
# Install cmake format `0.6` with support for YAML config files
pip install cmake-format[yaml]==0.6
```

. Please make sure, that you install the correct version (`0.5.4`) of cmake format:
. Please make sure, that you install the correct version (`0.6.0`) of cmake format:

```sh
cmake-format --version
#> 0.5.4
#> 0.6.0
```

, since otherwise the formatted code might look quite different.
@@ -13,10 +13,10 @@ SCRIPTS_DIR=$(dirname "$0")
# before we save the output of the command.
CMAKE_FORMAT="$(which cmake-format)" && CMAKE_FORMAT_VERSION="$("$CMAKE_FORMAT" 2>&1 --version)"

if [ -z "${CMAKE_FORMAT}" ] || [ "$CMAKE_FORMAT_VERSION" != "0.5.4" ]; then
if [ -z "${CMAKE_FORMAT}" ] || [ "$CMAKE_FORMAT_VERSION" != "0.6.0" ]; then
printf >&2 'cmake-format: %s\n' "$CMAKE_FORMAT"
printf >&2 'Version: %s\n' "$CMAKE_FORMAT_VERSION"
printf >&2 'Please install `cmake-format` version 0.5.4\n'
printf >&2 'Please install `cmake-format` version 0.6.0\n'
exit 1
fi

@@ -127,7 +127,7 @@ RUN mkdir -p "${SHFMT_PATH}" \
&& chmod a+x shfmt

# cmake-format
RUN pip install cmake-format[yaml]==0.5.4
RUN pip install cmake-format[yaml]==0.6

# Coveralls
ENV COVERALLS_VIRTUALENV_PATH=/home/jenkins/coveralls
@@ -63,7 +63,7 @@ RUN apt-get update && apt-get -y install \
# Update cache for shared libraries
RUN ldconfig

RUN pip install cmake-format[yaml]==0.5.4
RUN pip install cmake-format[yaml]==0.6

# Google Test
ENV GTEST_ROOT=/opt/gtest
@@ -161,7 +161,7 @@ RUN mkdir -p "${SHFMT_PATH}" \
&& chmod a+x shfmt

# cmake-format
RUN pip install cmake-format[yaml]==0.5.4
RUN pip install cmake-format[yaml]==0.6

# Coveralls
ENV COVERALLS_VIRTUALENV_PATH=/home/jenkins/coveralls
@@ -82,7 +82,7 @@ Vagrant.configure("2") do |config|
apt-get -y upgrade
apt-get -y install curl build-essential autotools-dev automake cmake pkg-config doxygen graphviz bison ruby-dev python-dev python3-dev liblua5.2-dev tclcl-dev libaugeas-dev libyajl-dev libgit2-dev libboost-all-dev libssl-dev libcurl4-gnutls-dev libdbus-1-dev libpcre3-dev libpcre++-dev checkinstall vim valgrind clang-5.0 clang-format-5.0 htop zlib1g-dev git openjdk-8-jdk python-pip locales bison libpython3-dev liblua5.3-dev libxerces-c-dev swig
pip install cmake-format[yaml]==0.5.4
pip install cmake-format[yaml]==0.6
mkdir -p /opt/gtest \
&& cd /tmp \

0 comments on commit 4ac987d

Please sign in to comment.
You can’t perform that action at this time.