asmaloney/libE57Format

Use clang-format

bigeyesung opened this issue · 2 comments

Hi,
Just one quick question, not sure if I am doing clang-format correctly.
So in the root dir:

mkdir build && cd build
cmake ../
cmake --build . --target ../.clang-format

After that, no error message pops up,

(base) cFX504GD:~/Projects/mine/libE57Format/build$ cmake --build . --target ../.clang-format
(base) cFX504GD:~/Projects/mine/libE57Format/build$ 

Could you let me know if it is the proper way please?

I don't know why cmake isn't giving you an error since ../.clang-format isn't a target.

I get this error (cmake version 3.19.1):

noir$ cd /Users/maloney/dev/build-libE57Format-clang_64bit-Debug
noir$ cmake --build . --target ../.clang-format
make: *** No rule to make target `../.clang-format'.  Stop.

The proper command is what's in the README:

cmake --build . --target format

If you don't have clang-format installed, you should get a cmake error:

make: *** No rule to make target `format'.  Stop.

Otherwise, you should see this:

noir$ cmake --build . --target format
Scanning dependencies of target format
[100%] Running clang-format...
[100%] Built target format

@asmaloney 👍
Thanks for the reply, I think my problem solved.