Compilation times
A rebuild of the full solutions can be as long as 10 mins, depending on the configuration. A few tricks can be used to reduce build times.
- Unity build: Cmake offers an option to batch source files to reduce the number of files for faster compilation. This is used on some build servers and on some development workstations.
- Caching using
buildcache. When GitHub actions was introduced, there was a need to have a build cache working for both Linux and Windows. At that time,buildcachewas the only option for one crossplatform tool.buildcachecaching is now used on ResInsight GitHub Actions. - Recent deveopment has now made
ccacheeasily available on Windows. The speedup in compilation time can be quite impressive. A complete rebuild of the ResInsight solution takes 1.10 on one workstation.
Configuration and use of ccache (Windows)
- Download and install ccache https://ccache.dev/download.html
- In the
ResInsightCMake defines, set the full path to theccache.exefor the define “ccache_exe” - Make sure that all
CXX_*compiler flags use/Z7instead of/Zi. If/Ziis used, ccache will not work. - To see where your cache is located on your system, use the
ccache -p

