Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

When using compile_commands.json, the extra compile options in defaults.hpp are faulty. #182

Open
mcourteaux opened this issue Jun 15, 2019 · 0 comments

Comments

@mcourteaux
Copy link

mcourteaux commented Jun 15, 2019

(Sorry for fuzzy title; can't figure out better words.)

On macOS, I use cmake to generate the compile_commands.json file for my project. color_coded finds this, but still appends/prepends the extra compile options found in default.hpp. This causes conflicting compile options to be submitted to the clang backend; and syntax coloring to fail due to mismatching stdlibc versions.

I disabled the default additional compile options (by patching the functions to return {};), which fixes the issue entirely. This makes sense, as the compile_commands.json database contains the exact and correct compile options. I'm not sure what the right way to go here is in general. My guess is that defaults should not be added if there is a compile_commands.json used?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant