3 # Copyright (c) 2014-2017. 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@"
10 SIMGRID_GITHASH="@SIMGRID_GITHASH@"
12 CXX=@CMAKE_CXX_COMPILER@
14 INCLUDEARGS="@includeflag@"
15 CMAKE_LINKARGS="-L@libdir@"
21 if [ "@WIN32@" != "1" ]; then
22 # list_add CXXFLAGS "-Dmain=smpi_simulated_main_"
23 list_add CXXFLAGS "-fpic"
24 list_add LINKARGS "-shared" "-lsimgrid"
26 list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_main.h"
27 list_add LINKARGS "@libdir@\libsimgrid.dll"
31 while [ $# -gt 0 ]; do
41 SRCFILE="$(readlink -f ${ARG} 2>/dev/null)"
42 if [ -z "$SRCFILE" ] ; then
45 list_add CMDARGS "${SRCFILE}"
47 '-version' | '--version')
48 printf '%b\n' "$SIMGRID_VERSION"
51 "-git-version" | "--git-version")
52 printf '%b\n' "$SIMGRID_GITHASH"
55 '-compiler-version' | '--compiler-version')
59 list_add CMDARGS "${ARG}"
64 list_set CMDLINE "${CXX}"
65 list_add_not_empty CMDLINE "${CXXFLAGS}"
66 list_add_not_empty CMDLINE ${INCLUDEARGS}
67 list_add_not_empty CMDLINE ${CMAKE_LINKARGS}
68 list_add_not_empty CMDLINE "${CMDARGS}"
69 list_add_not_empty CMDLINE "${LINKARGS}"
71 eval $(list_get CMDLINE)