Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Compilation Database to handle different configuration sources in an unique way #1365

Closed
guwirth opened this issue Dec 27, 2017 · 2 comments · Fixed by #1970
Closed

Add Compilation Database to handle different configuration sources in an unique way #1365

guwirth opened this issue Dec 27, 2017 · 2 comments · Fixed by #1970
Assignees
Milestone

Comments

@guwirth
Copy link
Collaborator

guwirth commented Dec 27, 2017

At the moment we have different solution to handle macros and include directories from different sources:

  • config file
  • Visual Studio LOG file
  • JsonCompilationDatabase

Would be the best to have only one internal handling for this:

  • read the source only once, store result in CxxConfiguration
  • Visual Studio LOG file: reading the configuration should be separated from other functionality. At the moment reading issues and settings is mixed behind one config value.

Proposal:

  • create a database (map) in CxxConfiguration
  • should be possible to define global settings (valid for all files)
  • should be possible to define source file specific macros and includes
    • key is the source file name
    • values are:
      • file specific include paths
      • file specific macros
  • different config sources should use this one DB as backend
  • config file should be read only once

see also #1325, #1326,

@Bertk
Copy link
Contributor

Bertk commented Jan 15, 2018

Hi @guwirth,

will this proposal also support C++ Modules?

Visual Studio supports definitions for VS C++ projects and for C++ implementation files. As far as I know does the C++ Community plug-in not supports all of this levels. Will this proposal consider the definitions on file level?

Best regards
Bert

@guwirth
Copy link
Collaborator Author

guwirth commented Jan 16, 2018

Hi @Bertk,

in C++ typically only the C or C++ files are compiled (and the header files only indirect). So it should be sufficient to create a database with c/cpp files and the related macros and includes per file?

Regards,
Günter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants