I am trying to organize a C++ project which starts to have a lot of files. I would like to create two executables which share some source file using Cmake. I have found an i
You have to quote the variables.
add_executable(test_mss "${Common_sources}" "${Mss_sources}")
Otherwise for an empty variable, CMake replaces the variable by nothing and the number of arguments seems to be wrong.
Similar problem: https://stackoverflow.com/a/39733128/2799037