From: Martin Quinson Date: Sat, 3 Sep 2016 13:38:39 +0000 (+0200) Subject: fix the compilation without SMPI X-Git-Tag: v3_14~419^2~17 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/594c978fc108c86e61507870cda49428c51b2a3f fix the compilation without SMPI This is to avoid a "undefined reference: parse_factor". The SMPI network model is not available anymore when SMPI is compiled out. --- diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index c9590e81d8..c18df99d40 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -76,6 +76,15 @@ s_surf_model_description_t surf_network_model_description[] = { {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */ }; +#if ! HAVE_SMPI +void surf_network_model_init_SMPI() { + xbt_die("Please activate SMPI support in cmake to use the SMPI network model."); +} +void surf_network_model_init_IB() { + xbt_die("Please activate SMPI support in cmake to use the IB network model."); +} +#endif + s_surf_model_description_t surf_cpu_model_description[] = { {"Cas01", "Simplistic CPU model (time=size/power).", surf_cpu_model_init_Cas01}, {nullptr, nullptr, nullptr} /* this array must be nullptr terminated */ diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index ba6c3c026e..ff7d97a5f0 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -242,6 +242,9 @@ set(SMPI_SRC src/smpi/smpi_topo.cpp src/smpi/smpi_utils.cpp src/smpi/smpi_f77.cpp + + src/surf/network_smpi.cpp + src/surf/network_ib.cpp ) set(XBT_SRC @@ -315,8 +318,6 @@ set(SURF_SRC src/surf/network_cm02.cpp src/surf/network_constant.cpp src/surf/network_interface.cpp - src/surf/network_smpi.cpp - src/surf/network_ib.cpp src/surf/plugins/energy.cpp src/surf/PropertyHolder.cpp src/surf/sg_platf.cpp