Skip to content

Commit

Permalink
Added ROSE configuration support for UPC code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Too committed May 2, 2011
1 parent 39eb5cf commit 0afdfdd
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.
20 changes: 20 additions & 0 deletions acmacros/upc.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Find a compiler for Unified Parallel C. -*- Autoconf -*-

# Copyright (C) 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

AC_DEFUN([AM_PROG_UPC],
[dnl We need OBJEXT and EXEEXT, but Autoconf doesn't offer any public
dnl macro to compute them. Use AC_PROG_CC instead.
AC_REQUIRE([AC_PROG_CC])dnl
AC_ARG_VAR([UPC], [Unified Parallel C compiler command])dnl
AC_ARG_VAR([UPCFLAGS], [Unified Parallel C compiler flags])dnl
AC_CHECK_TOOLS([UPC], [m4_default([$1], [upcc upc])], [:])
if test "$UPC" = :; then
AC_MSG_ERROR([no Unified Parallel C compiler was found], [77])
fi
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([UPC])])dnl
])
1 change: 1 addition & 0 deletions config/support-rose.m4
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ else
AC_MSG_RESULT([skipping])
fi
ROSE_SUPPORT_UPC
##
#########################################################################################
Expand Down
14 changes: 14 additions & 0 deletions config/support-upc.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
AC_DEFUN([ROSE_SUPPORT_UPC],
[
# Begin macro ROSE_SUPPORT_UPC.
# Automake-UPC Support http:https://www.gnu.org/software/hello/manual/automake/Unified-Parallel-C-Support.html
# Handling new file extensions: https://idlebox.net/2009/apidocs/automake-1.11.zip/automake_18.html#SEC148
AC_MSG_CHECKING([for UPC])
AC_ARG_ENABLE([upc],AS_HELP_STRING([--enable-upc],[Enable UPC support in ROSE (default=no)]),,[enableval=no])
AM_CONDITIONAL(ROSE_WITH_UPC, [test "x$enableval" = "xyes"])
#if test "x$enableval" = "xyes" ; then
AM_PROG_UPC
#fi
AC_MSG_RESULT([$enableval])
])
13 changes: 9 additions & 4 deletions projects/RTED/CppRuntimeSystem/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ libCppRuntimeSystem_la_SOURCES = CppRuntimeSystem.cpp \
RsType.cpp\
TypeSystem.cpp \
PointerManager.cpp\
StackManager.cpp \
ptrops.c \
workzone.c \
rtedsync.c
StackManager.cpp
# TOO: Example of conditionally including files when ROSE
# is configured with UPC support.
if ROSE_WITH_UPC
libCppRuntimeSystem_la_SOURCES += \
ptrops.upc \
workzone.upc \
rtedsync.upc
endif



Expand Down

0 comments on commit 0afdfdd

Please sign in to comment.