Board index FlightGear Support Compiling

Compiling and Building FG again with new c++ code

Building FlightGear from source, and in the need for help?

Compiling and Building FG again with new c++ code

Postby gierschi@flightgear » Wed Jul 20, 2016 2:09 pm

Hey guys,

I have done some small changes in the FG c++ source code (just in the file FGWinds.cpp) and have still installed FG on my Linux computer. Now I want built a new FG version with the modified code. How can I do this without compiling each file again. This would last maybe 10/15 minutes (I have tested it) and that method is not a good idea to check if small changes in the code work. My Folder structure is the following:

Source code at /localdata/giersch/src/flightgear.git/*
Flightgear version 1 at /localdata/giersch/FG-3.6-v1/*
$FG_ROOT at /localdata/giersch/FG-3.6-v1/fgdata

Thank you very much in advance for an answer.
gierschi@flightgear
 
Posts: 58
Joined: Tue Nov 03, 2015 9:40 pm

Re: Compiling and Building FG again with new c++ code

Postby Thorsten » Wed Jul 20, 2016 3:16 pm

Even on my really old system with me being anything but a CMake wizard, it happens automagically that when I change one file, only that file (and the dependent ones) is recompiled, not everything.

So I guess it's down to configuring your build environment
Thorsten
 
Posts: 11900
Joined: Mon Nov 02, 2009 8:33 am

Re: Compiling and Building FG again with new c++ code

Postby bugman » Wed Jul 20, 2016 3:27 pm

CMake will take care of all of that for you, if you use the CMake build system. Only the changed files will be recompiled.

Regards,
Edward
bugman
Moderator
 
Posts: 1799
Joined: Thu Mar 19, 2015 9:01 am
Version: next

Re: Compiling and Building FG again with new c++ code

Postby Hooray » Wed Jul 20, 2016 8:52 pm

Besides, by using ccache (and possibly distcc), you can massively speed up compilation even further
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12090
Joined: Tue Mar 25, 2008 8:40 am

Re: Compiling and Building FG again with new c++ code

Postby gierschi@flightgear » Thu Jul 21, 2016 7:19 am

Thanks for the hints.

Can you tell me the exact command you are using? Do i have set some cmake option? And where can I find the precompiled files from my first version I've already built?
gierschi@flightgear
 
Posts: 58
Joined: Tue Nov 03, 2015 9:40 pm


Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest