Files without the source dir prefix are interpreted as be relative to the source dir, so there's no need to specify it every time.
Also, specify that the project is using C++ in the Cmake project() call. This negates the necessity (?) of setting the CMAKE_CXX_COMPILER variable; LANGUAGES CXX sets all that up for us, including if your OS uses a non-GCC compiler.
Thanks @h3xx, I'll have to trust your cmake skills because mine are non-existent, but I did test this on macos/clang and it works fine. Many thanks for the update!
Files without the source dir prefix are interpreted as be relative to the source dir, so there's no need to specify it every time.
Also, specify that the project is using C++ in the Cmake
project()
call. This negates the necessity (?) of setting theCMAKE_CXX_COMPILER
variable;LANGUAGES CXX
sets all that up for us, including if your OS uses a non-GCC compiler.