when I use cmake in Release mode I have the following binary:
64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=485ac09b0a3aa879f88b7f5db6c00ea8d8e1eaf6, not stripped
I want the binary to be stripped. How can I say to cmake in a clean way to add the -s option to my compiler to make it stripped?
Why did the Default Release mode not strip my binary?
cmake --install
, you can provide the--strip
argument that will strip everything upon installation. Doing things this way is typically much cleaner. You shouldn't deploy from the build folder, anyway, since the RPATHs will be messed up. – Nicolettenicoli--strip
is the standard way to do it. – Computerize