Bug 548266 - Allow to define multi-extension files as C++ file types
Summary: Allow to define multi-extension files as C++ file types
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 9.7.0   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-14 04:01 EDT by Nicola Mori CLA
Modified: 2020-09-04 15:16 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicola Mori CLA 2019-06-14 04:01:25 EDT
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.