code from CMakeFiles.txt what's the reason of setting the propetties of OUTPUT_NAME
SET_TARGET_PROPERTIES(hello_static PROPERTIES OUTPUT_NAME "hello")
That controls the name of the actual file that's generated, independent from the target's name.
In this case, the file will be named hello.a
or hello.lib
instead of hello_static.a
or hello_static.lib
See the documentation for the property: https://cmake.org/cmake/help/latest/prop_tgt/OUTPUT_NAME.html