Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
jedule: obey our coding standards
[simgrid.git] / src / smpi / smpi_main.c
index d194156..7d94af6 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2007-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 int main(int argc, char **argv)
 {
+  if (getenv("SMPI_PRETEND_CC") != NULL) {
+    /* Hack to ensure that smpicc can pretend to be a simple compiler. Particularly handy to pass it to the
+     * configuration tools. This one is used with dlopen privatization. */
+    return 0;
+  }
+
   if (argc < 2) {
-    fprintf(stderr, "Missing SMPI program to launch\n");
+    fprintf(stderr, "Usage: smpimain <program to launch>\n");
     exit(1);
   }
   return smpi_main(argv[1], argc - 1, argv + 1);