Community
Participate
Working Groups
In my project I have various C++ source files that are pre-processed by CMake before compilation in order to hard-code the value of a variable in the C++ code before compiling. I find this useful e.g. to insert the paths of some local data files into test code that is supposed to run via CI. To distinguish these to-be-preprocessed source files from regular source files I use the *.cpp.in extension, which is not recognized by the CDT editor. I can add the file type "*.cpp.in" to Window->Preferences->C/C++->File types, but it is not properly handled, e.g. syntax check in the editor does not work. Adding "*.in" instead makes everything work, but I'd like to avoid associating a vanilla extension like *.in to C++ files since I use it for every file that has to be pre-processed by CMake, also non-C++ ones. So it seems that only extensions with a single dot are currently allowed. It would be useful if the possibility to define multi-extension source file names as C++ file types could be added to CDT.