Is it possible to treat all .c files as CXX at a project level in CMake? I know set_source_files_properties(... PROPERTIES LANGUAGE CXX)
can do this but I'd prefer to use fewer lines if possible. There's no single variable in my CMakeLists.txt
that has all source files.
I don't believe Tell CMake to use C++ compiler for C files coming from CMake? helps here - that's about errors related to interpreting the file types. I have no issue with overriding the LANGUAGE property, but as stated, I'd prefer not to apply it to all the various source files. I know CMake has a lot of knobs. I was hoping this would be one somewhere.