Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
be compatible with the standard of cmake+MPI
[simgrid.git] / src / smpi / smpicxx.in
index 9d2a2c8..2630654 100755 (executable)
@@ -32,6 +32,9 @@ else
     list_add LINKARGS "@libdir@\libsimgrid.dll"
 fi
 
+# By default, we execute the commands instead of only showing them to cmake
+Show=
+
 list_set CMDARGS
 while [ $# -gt 0 ]; do
     ARG="$1"
@@ -60,6 +63,10 @@ while [ $# -gt 0 ]; do
         '-compiler-version' | '--compiler-version')
             ${CXX} --version
             ;;
+       '-show'|'-compile-info'|'-link-info')
+            # Dry run displaying commands instead of executing them. Useful to cmake
+           Show=echo
+           ;;
         *)
             list_add CMDARGS "${ARG}"
       ;;
@@ -74,4 +81,4 @@ list_add_not_empty CMDLINE "${CMDARGS}"
 list_add_not_empty CMDLINE "${LINKARGS}"
 
 eval $(list_get CMDLINE)
-"$@"
+$Show "$@"