For some reason, the parameter_acceptor source is being rebuilt even when not touched. This leads to unnecessary relinking of the library. Here, for example, is the output after touching a cmake related file:
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jp/Programs/GitHub/deal.II/dealii-dev/build
[ 0%] Built target expand_instantiations_exe
[ 0%] Built target obj_non_matching_inst
[ 0%] Built target obj_sundials_inst
[ 0%] Built target obj_integrators_debug
[ 0%] Built target obj_rol_inst
[ 0%] Built target doxygen_headers
[ 0%] Built target obj_integrators_release
[ 0%] Built target obj_hp_inst
[ 3%] Built target obj_dofs_inst
[ 3%] Built target obj_grid_inst
[ 7%] Built target obj_lac_inst
[ 8%] Built target obj_base_inst
[ 14%] Built target obj_fe_inst
[ 18%] Built target obj_numerics_inst
[ 20%] Built target obj_matrix_free_inst
[ 20%] Built target obj_algorithms_inst
[ 22%] Built target obj_multigrid_inst
[ 22%] Built target obj_distributed_inst
[ 22%] Built target obj_meshworker_inst
[ 22%] Built target obj_opencascade_inst
[ 23%] Built target obj_particle_inst
[ 23%] Built target obj_differentiation_ad_inst
[ 23%] Built target obj_physics_inst
[ 23%] Built target obj_physics_elasticity_inst
[ 23%] Built target obj_non_matching_debug
[ 24%] Built target obj_sundials_debug
[ 24%] Built target obj_sundials_release
[ 25%] Built target obj_hp_release
[ 27%] Built target obj_dofs_release
[ 28%] Built target obj_multigrid_release
[ 28%] Built target obj_algorithms_release
[ 28%] Built target obj_matrix_free_release
[ 28%] Built target obj_distributed_release
[ 28%] Built target obj_meshworker_release
[ 30%] Built target obj_grid_release
Scanning dependencies of target obj_base_release
[ 30%] Built target obj_particle_release
[ 30%] Built target obj_physics_release
[ 30%] Built target obj_differentiation_ad_release
[ 31%] Built target obj_opencascade_release
[ 31%] Built target obj_rol_release
[ 31%] Built target obj_non_matching_release
[ 31%] Built target obj_rol_debug
[ 31%] Built target obj_physics_elasticity_release
[ 34%] Built target obj_dofs_debug
[ 38%] Built target obj_numerics_release
[ 48%] Built target obj_lac_release
[ 54%] Built target obj_fe_release
[ 55%] Built target obj_hp_debug
Scanning dependencies of target obj_base_debug
[ 56%] Built target obj_multigrid_debug
[ 57%] Built target obj_distributed_debug
[ 57%] Built target obj_algorithms_debug
[ 60%] Built target obj_grid_debug
[ 60%] Built target obj_matrix_free_debug
[ 61%] Built target obj_meshworker_debug
[ 61%] Built target obj_opencascade_debug
[ 67%] Built target obj_numerics_debug
[ 75%] Built target obj_lac_debug
[ 76%] Built target obj_differentiation_ad_debug
[ 76%] Built target obj_physics_debug
[ 77%] Built target obj_physics_elasticity_debug
[ 77%] Built target obj_particle_debug
[ 84%] Built target obj_fe_debug
[ 84%] Building CXX object source/base/CMakeFiles/obj_base_release.dir/parameter_acceptor.cc.o
[ 84%] Building CXX object source/base/CMakeFiles/obj_base_debug.dir/parameter_acceptor.cc.o
[ 91%] Built target obj_base_release
[ 91%] Linking CXX shared library ../lib/libdeal_II.dylib
[ 98%] Built target obj_base_debug
[ 98%] Linking CXX shared library ../lib/libdeal_II.g.dylib
[100%] Built target deal_II
[100%] Built target deal_II.g
@luca-heltai I believe that you wrote this class - do you have any idea why this happens?
@jppelteret, the rebuild and relink is due to the inclusion of base/revision.h in parameter_acceptor.cc which in this case is used to produce this kind of log when we save the parameters
# DEAL_II_GIT_BRANCH= master
# DEAL_II_GIT_SHORTREV= ec3ec701f2
so when you change branch and/or you commit you have to recompile parameter_acceptor and relink
I have no idea how to avoid this btw
I see, that makes sense. Thanks very much for explaining to me what's going on! I can't think of a reasonable solution to this either. I'll leave the topic open for discussion for a day or two, and will close it if nobody has any suggestions regarding how we could change this.
How important is that to have this in the prm? I would prefer we use DEAL_II_VERSION* from config.h
How important is that to have this in the prm? I would prefer we use DEAL_II_VERSION* from config.h
same here.
yeah The header base/revision.h was never meant to be including by the library itself exactly because of that reason :-)
Most helpful comment
How important is that to have this in the prm? I would prefer we use DEAL_II_VERSION* from config.h