Specify C and CXX for CMake projects with MSVC
A quirk with Visual Studio and CMake for C++ projects is that the C language must also be specified in CMakeLists.txt like:
project(foo LANGUAGES C CXX)
Otherwise, weird linker errors can occur, even on a pure C++ project with no C files.