UBT -cmakefile improvement

Thank you so much for working on additional IDE support. Really appreciated!

The -cmakefile option in 4.9 seems to work well on OS X (hasn’t been able to test on Windows yet).

There is one issue I’d like to report with the current implementation. I’m generating game project files (not engine build project files). I’m not sure how other IDEs interpret the generated CMakeLists.txt, but CLion lists all engine source files in the project navigator, all of them on root level:

A workaround for this is to remove all the custom targets at the end of the CMakeLists file and add the following line instead:

add_executable(FakeTarget, ${GAME_SOURCE_FILES})

where GAME_SOURCE_FILES only includes the source files of the game, but no engine files (basically the end of the SOURCE_FILES list).

Of course this way I can’t build from the IDE and have to compile in the Editor, but I still get code assistance and highlighting.

I’m not sure if this is an issue with the generated file, or CLion.

I would recommend raising this issue with CLion. There is no good way to split this into two targets (e.g. engine “library” and game executable, which would depend on it), since you need all those source files for compiling the game (engine does not compile into a separate library).

The issue seems to be purely visual: CLion could do a better job showing the list of files, given that it has all the path information necessary for grouping them into subdirectories

Alright, thanks! I reported this issue here.