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

Multiple compilers #59

Open
incardon opened this issue Aug 9, 2017 · 6 comments
Open

Multiple compilers #59

incardon opened this issue Aug 9, 2017 · 6 comments
Assignees

Comments

@incardon
Copy link

incardon commented Aug 9, 2017

It seems that the generator look into /usr/include to search include files that is the path where the default compiler put header files. On the other hand in case I have a second compiler I did not find a way to redirect such include paths to the correct place.

Is there a way to do it ?

@ogoffart
Copy link
Contributor

the only "supported compiler" is clang that is used to build the generator. However, you can change the include paths with the -I option in the compilation database.
If you don't use a compilation database, you need to use -I after the --

What exactly is the command line you use to run the generator?

@incardon
Copy link
Author

incardon commented Aug 11, 2017

Hi ogoffart

Thanks for the fast reply.

I used bear to generate a json file (compilation database) with bear make. The make file use gcc-4.9.2 as compiler (+ I also have LLVM and libclang). The default machine compiler is 4.4.7 that is not able to compile the project.

To generate I am using the standard command

codebrowser_generator -b $BUILDIRECTORY -a -o $OUTPUTDIRECTORY -p codebrowser:$BUILDIRECTORY:$VERSION
codebrowser_indexgenerator $OUTPUTDIRECTORY

(With the environmental variables defined)

Now when I run codebrowser_generator I get a lot of error because it look into /usr/include/ that is the default compiler header directory.

If I understand correctly I should use clang as base compiler, and configure LLVM to look into the secondary compiler header file (not /usr/include). Is this correct ?

@ogoffart
Copy link
Contributor

Maybe you can try to add some CXXFLAGS with -I /path/to/other/compiler/include when configuring, then this will end up in the compilation database.
But if your project also compiles with clang, it might be even better to use llvm as the compiler indeed

@incardon
Copy link
Author

incardon commented Aug 12, 2017

Thanks. It compile, so I will switch completely to LLVM.

@guruz
Copy link
Contributor

guruz commented Sep 10, 2018

@incardon Did you suceed?

@incardon
Copy link
Author

I switch to a system with one compiler avoiding the problem. At the end it worked with bear + gcc, so I did not test clang

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

No branches or pull requests

3 participants