Developing core without compiling source completely

Hello everyone,

I searched through all threads that may help but I could not find any related answer. So I hope this question is not duplicate.

I have developed simple options like custom commands for GM. These developments are straightforward so I could add my preferred command with less than four times compilation.

On the other hand, I want to develop a custom arena join system which work with different structures including: GroupQueueInfo, PlayerQueueInfo (BattlegroundQueue.h). In addition, I need to use other functions like ObjectAccessor::FindPlayerByName. In this regard, I am working with many parts of the source so it is very natural to face many and many bugs and errors. If I want to develop in the way that each time I need to compile the source from scratch, it may takes decades for me to finish the development.

Therefore, I was looking for a solution to minimize compilation as much as is possible. I created custom CMakeLists to include required files separately, however, it seems the source is compiled with custom options so it failed.

I appreciate it if someone could guide me to develop a custom code with minimum compilation or at least options that help to recompile only changed file not all of the source.

the amount of recompilation depends of the files you change.

Thanks for your response. Could you explain how should I setup developing environment that recompilation happens only for changed file? If I use “make” command, it would recompile from scratch

you cannot, the more critical files you change the more files compiles.

How sure are you about this answer? You mean after decades of invention of C++, there is no solution to have a hot reload or at least inline compilation option??? I wish it is not true because my system is a little out of date so I should wait over 3 hours

Are you doing an incremental build or a full rebuild ?

What Aokromes said is true.

I will tell you any advices in case you didnt know it:

  • Dont use cmake if you only changed any lines in any files. Every time that you use cmake, compilation will take more time to compile.

  • Dont clear proyect in visual studio if you didnt add new files in the project or it will compile everything there.

  • You can disable tools (map extractors) of source in cmake so it wont compile with the project and it will be faster.

Regards

100% and i use that percentage rarely.

If you edit

src/server/scripts/EasternKingdoms/zone_undercity.cpp

only that file will be recompiled.

if you edit

src/server/game/Entities/Unit/Unit.cpp

everything will be recompiled.

unless you do full rebuild, then everything will be recompiled.

also 3 hours recompile? what processor you have?

Such a sad news :frowning:

I am using Intel(R) Core™ i7-4600U CPU @ 2.10GHz which is not appropriate I guess.

I have also another laptop with Intel(R) Core™ i5-8300H CPU @ 2.30GHz 2.30 GHz, however I am using it as windows system to open the game.

Is there any solution to compile in stronger laptop and run it on weaker?