As you extend your class, it’s almost guaranteed that at some point you’ll call some unexported method or something like that.
In any case this has already nothing to do with CMake and everything to do with C/C++, shared objects, and symbol visibility. If you want to know more, google something along those terms.