x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Get compile_commands.json

Hey, i am using rdm (with emacs) for my game development. rdm requires a compile_commands.json file which is a file that contains all the the compile commands for the code.

I am trying to create one for my game code and for UE4 engine code. usually to generate the compile_commands.json we run "bear" on the compile program, bear expect that the output of the compilation program to be with verbose with all of the command to compile the code but i cant get this from the game compilation.

Is there a way to generate compile_commands.json? Or somehow add --verbose to the clang command?

Product Version: UE 4.18
Tags:
more ▼

asked Sep 07 '18 at 05:52 PM in Linux

avatar image

Darkstorm1997
82 9 15 26

avatar image Paul "TBBle" Hampson Nov 27 '18 at 12:35 AM

Bear doesn't depend on the output of the build tool, it depends on being loaded into the build process and intercepting the exec calls to the compiler.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

The first two steps on Sourcetrail with Unreal Engine 4 - a quick primer suggest a working approach, until native support for JSON Compilation Database is added to the Unreal Build Tool.

Quoting the steps:

  1. Install a patched version of Bear from https://github.com/TTimo/Bear/tree/ttimo (note: ttimo branch)

  2. From a clean UE4 tree, capture a compilation database: bear -o ./UE4Game.json ./Engine/Build/BatchFiles/Linux/Build.sh UE4Game Linux Development -disableunity -nopch

He points out two issues that currently block Bear from capturing UE4 builds correctly:

more ▼

answered Nov 27 '18 at 01:57 AM

avatar image

Paul "TBBle" Hampson
1 1 1

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question