Retain old CMAKE_CXX_FLAGS while adding visibility stuff.
Add -Wl,-no-undefined -Wall flags to ensure correctness.