How to get the default suffix of executables?

After modifying CMAKE_SHARED_LIBRARY_PREFIX in CMakeLists.txt, how can I retrieve the default suffix of executables?

I’m not sure what CMAKE_SHARED_LIBRARY_PREFIX has to do with it, but CMAKE_EXECUTABLE_SUFFIX is the variable you’re looking for. Note that these are “platform” variables and not (generally) meant to be edited by projects. You should consider using the PREFIX and SUFFIX properties instead.