btop icon indicating copy to clipboard operation
btop copied to clipboard

[REQUEST] Clang support

Open ivan-volnov opened this issue 2 years ago • 1 comments

Hello,

A great step to portability would be a support of modern clang.

For instance, I have a system without gcc at all and want to build the app.

May be add some temporary workarounds for clang 14 to build it. It has some of Ranges library.

Yep, I've read #28. Waiting for cmake support too.

ivan-volnov avatar Apr 25 '22 17:04 ivan-volnov

@ivan-volnov

A great step to portability would be a support of modern clang.

I don't know about that. You have automatic builds for 42 platforms with gcc/musl in: https://github.com/aristocratos/btop/actions/runs/2160351640 you don't need to have any gcc related libraries whatsoever to run them.

May be add some temporary workarounds for clang 14 to build it. It has some of Ranges library.

Writing workarounds because clang is not keeping up with the C++20 standard doesn't sound like a very productive use of my time. If you really want to compile from source with clang before it has officially included the ranges library, you could try downloading range-v3. Probably have to mess around with the naming of the includes but might work.

Yep, I've read https://github.com/aristocratos/btop/issues/28. Waiting for cmake support too.

If you read #28 you'll know there is a fork with a CMakeLists.txt you can use if you really want to use CMake.

Btop++ does not have any external dependencies except for the standard C and C++ libraries, there is no complicated build chain requiring tools like CMake. The current Makefile will test if any build flags are not supported on your specific platform and disregard them if so. When clang has full support for ranges I will simply add the needed flags to the Makefile. Typing make and make install is and should be the only thing you have to do to build and install btop++. If you wanna read the full discussion on the subject of CMake read: #82.

aristocratos avatar Apr 25 '22 18:04 aristocratos