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

build(windows): compile commands database not generated #138

Open
t-bre opened this issue Nov 4, 2022 · 1 comment
Open

build(windows): compile commands database not generated #138

t-bre opened this issue Nov 4, 2022 · 1 comment
Labels
bug Something isn't working build Build and toolchain help wanted Extra attention is needed

Comments

@t-bre
Copy link
Member

t-bre commented Nov 4, 2022

Description

Compile commands database (compile_commands.json) is not generated when building with CMake on Windows. This database helps improve Intellisense in vscode.

The CMAKE_EXPORT_COMPILE_COMMANDS option doesn't support the msbuild Visual studio generators. Hence Windows users get the issue of compile_commands.json not found.

Steps To Reproduce

  1. Build on Windows with CMake.
  2. Check build folder.
  3. No compile_commands.json file.

Environment

os       : Windows
compiler : msvc (via msbuild)

Expected Behaviour

Compile commands database is generated.

Possible Solutions

  • Investigate another CMAKE command/option.
  • Look for other tools which can generate compilation databases.
@t-bre t-bre added bug Something isn't working help wanted Extra attention is needed build Build and toolchain labels Nov 4, 2022
@inventor02
Copy link
Member

We could try using the Ninja generator which is cross-platform and allows the compile_commands.json file to be generated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Build and toolchain help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants