[CMake] Fix bug in add_weak_symbols() function.
Previously the the weak_symbols.txt files could be modified and the
build system wouldn't update the link flags automatically. Instead the
developer had to know to reconfigure CMake manually.
This is now fixed by telling CMake that the file being used to
read weak symbols from is a configure-time dependency.