Skip to content

Hundreds of warnings while compiling AirSim for Unity on Linux #2478

Description

@rajat2004

OS: Ubuntu 18.04
Unity 2019.f2

Reproduction -

cd Unity
./build.sh

And watch as hundreds of warnings(about 340) scroll by on your screen. Total output size after redirecting it to a file comes out to be 9 MB

I believe this is happening due to compiler warning flags used to compile RPC being applied to the entire source code. This is quite bothersome, especially when trying to setup Travis for testing where the max output size is 4 MB, and thus requires additional workarounds to reduce output

From my poking around and diving into the CMake files, the problem seems to occur due to -

  1. Unity/AirlibWrapper has it's own CMakeLists.txt, where cmake/rpc-setup.cmake is included, which is modified from the original one used in RPC

  2. CMake project() is used here, which is the first and the only instance of this being used in the Unity CMake setup, and hence defines the PROJECT_NAME in all the subsequent ones

rpc-setup.cmake sets the compiler flags for the project, and this causes them to be applied everywhere. Usage of PROJECT_NAME can be seen by searching for it in the file

Such a thing doesn't happen in Unreal because it uses a wrapper over RPC's CMakeList itself with a separate project which doesn't affect the other files

This is just my current understanding of trying to figure of why this is happening. I'm not experienced in using CMake, and would love to have others's input in trying to figure out this problem

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions