What does --strip do?

In the cmake docs for installing there is a –strip flag:

--strip

    Strip before installing.

What does this do?

It removes debuginfo and things like internal symbol names from the libraries once installed. Basically, it can make the install tree size smaller (though how much depends on the libraries in question).

From what I can tell this doesn’t do anything with MSVC though. It seems to be for GCC and maybe clang?

Yes, MSVC tends to have separate debuginfo anyways (the .pdb files). CMake does what it can (nothing) rather than erroring and making scripts have to know the environment before passing it. However, maybe it can do something in the future even there (if there’s anything meaningful to do that is).

1 Like

For other windows programmers (Like me) here is a useful wikipedia entry after looking into it: