3 # Copyright (c) 2014. The SimGrid Team.
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the license (GNU LGPL) which comes with this package.
9 SIMGRID_VERSION="@SIMGRID_VERSION_STRING@"
11 CXX=@CMAKE_CXX_COMPILER@
13 INCLUDEARGS="@includeflag@"
14 CMAKE_LINKARGS="-L@libdir@"
20 if [ "@WIN32@" != "1" ]; then
21 list_add CXXFLAGS "-Dmain=smpi_simulated_main_"
22 list_add LINKARGS "-lsimgrid"
24 list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_main.h"
25 list_add LINKARGS "@libdir@\libsimgrid.dll"
29 while [ $# -gt 0 ]; do
39 SRCFILE="$(readlink -f ${ARG} 2>/dev/null)"
40 if [ -z "$SRCFILE" ] ; then
43 list_add CMDARGS "${SRCFILE}"
45 '-version' | '--version')
46 printf '%b\n' "$SIMGRID_VERSION"
49 '-compiler-version' | '--compiler-version')
53 list_add CMDARGS "${ARG}"
58 list_set CMDLINE "${CXX}"
59 list_add_not_empty CMDLINE "${CXXFLAGS}"
60 list_add_not_empty CMDLINE ${INCLUDEARGS}
61 list_add_not_empty CMDLINE ${CMAKE_LINKARGS}
62 list_add_not_empty CMDLINE "${CMDARGS}"
63 list_add_not_empty CMDLINE "${LINKARGS}"
65 eval $(list_get CMDLINE)