X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/39c935d6d5ee86d153f6f7e6a10d723ae7c57f6f..87bd67da504fcbde92b0ae9b29a971635bb858e5:/src/smpi/smpicc.in diff --git a/src/smpi/smpicc.in b/src/smpi/smpicc.in index 0662209286..162cca023e 100755 --- a/src/smpi/smpicc.in +++ b/src/smpi/smpicc.in @@ -1,21 +1,21 @@ #!/usr/bin/env sh -# Copyright (c) 2007-2021. The SimGrid Team. +# Copyright (c) 2007-2022. 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. SIMGRID_VERSION="@SIMGRID_VERSION_STRING@" -SIMGRID_GITHASH="@SIMGRID_GITHASH@" +SIMGRID_GITHASH="@GIT_VERSION@" CC=@CMAKE_C_COMPILER@ -INCLUDEARGS="@includeflag@" -CMAKE_LINKARGS="-L@libdir@" - @SMPITOOLS_SH@ +list_set INCLUDEARGS @includeflag@ +list_set CMAKE_LINKARGS "-L@libdir@" + # Don't use -Wl,-z-defs with Clang and address sanitizer if [ "@CMAKE_C_COMPILER_ID@" = "Clang" ] && [ "@HAVE_SANITIZER_ADDRESS@" = "TRUE" ]; then LINKER_UNDEFINED_ERROR="" @@ -93,9 +93,13 @@ while [ $# -gt 0 ]; do esac done +if [ "x@WIN32@" != "x1" ]; then + list_add CMDARGS "-fPIC" +fi + list_set CMDLINE "${CC}" list_add_not_empty CMDLINE "${CFLAGS}" -list_add_not_empty CMDLINE ${INCLUDEARGS} +list_add_not_empty CMDLINE "${INCLUDEARGS}" list_add_not_empty CMDLINE "${CMAKE_LINKARGS}" list_add_not_empty CMDLINE "${CMDARGS}" list_add_not_empty CMDLINE "${LINKARGS}"