Skip to content

Commit

Permalink
Add various warnings if you try to compile with non-free packages
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@19932 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 2, 2014
1 parent ac620a6 commit 053a363
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
8 changes: 4 additions & 4 deletions Compiler/BackEnd/HpcOmTaskGraph.mo
Expand Up @@ -5781,8 +5781,8 @@ algorithm
case ((fromnode,tonode,cost),_,_,_,_)
equation
true = intEq(fromnode,actnode);
adjwgt = arrayUpdate(adjwgt,imarker,cost);
adjncy = arrayUpdate(adjncy,imarker,tonode-1);
arrayUpdate(adjwgt,imarker,cost);
arrayUpdate(adjncy,imarker,tonode-1);
then
imarker+1;
case (_,_,_,_,_)
Expand All @@ -5802,7 +5802,7 @@ protected
Integer position;
algorithm
omarker := List.fold3(help,sortEdgeHelp,actnode,adjncy,adjwgt,imarker);
xadj := arrayUpdate(xadj,actnode+1,omarker-1);
arrayUpdate(xadj,actnode+1,omarker-1);
end sortEdge;


Expand All @@ -5816,7 +5816,7 @@ protected
algorithm
value:=getExeCost(node,iTaskGraphMeta);
(_,rv):=value;
vwgt:=arrayUpdate(vwgt,node,realInt(rv));
arrayUpdate(vwgt,node,realInt(rv));
end setVwgt;

public function prepareMetis
Expand Down
20 changes: 13 additions & 7 deletions configure.in
Expand Up @@ -113,6 +113,8 @@ fi
AC_PREFIX_DEFAULT($PREFIX)
prefix=$PREFIX

AC_ARG_ENABLE(non-free-packages, [ --enable-non-free-packages Enables you to link non-free packages. But doing so limits your ability to distribute code under GPL3, even to co-workers and the like. If you are an OSMC member you might be allowed to link and ship such libraries if you have a commercial license for the linked packages.],[test "yes" = "$enableval" && ENABLE_NON_FREE_PACKAGES=1 && NON_FREE_VERSION=") (non-free version for personal use only; seriously do not distribute this binary"] && FINAL_MESSAGES="$FINAL_MESSAGES\nLinking against non-free packages: Yes (this version of omc not for distribution)")

dnl Checks for programs.
AC_LANG([C])
AC_PROG_CC
Expand Down Expand Up @@ -891,13 +893,16 @@ AC_ARG_WITH(METIS, [ --with-METIS=DIR Compile with Metis graph

AC_ARG_WITH(PATOH, [ --with-PATOH=DIR Compile with PATOH hypergraph partitioner in DIR],
[
USE_PATOH=1
if test USE_METIS=1; then
AC_MSG_RESULT([ Cannot compile with METIS and PATOH. Choosing PATOH only. ] )
METISHOME="";
fi
USE_METIS=0
USE_GRAPH=1
USE_PATOH=1
if test "$ENABLE_NON_FREE_PACKAGES" = ""; then
AC_MSG_ERROR([May not compile PATOH unless non-free packages are enabled (enabling those limits your ability to distribute code under GPL3, even to co-workers and the like; if you are an OSMC member you might be allowed to link and ship the library, but only if you have a commercial license...)] )
fi
if test "$USE_METIS" = 1; then
AC_MSG_ERROR([Cannot compile with METIS and PATOH] )
METISHOME="";
fi
USE_METIS=0
USE_GRAPH=1
AC_MSG_RESULT([Enabling PATOH... PATOHHOME="$withval"]);
PATOHHOME="$withval";
], [
Expand Down Expand Up @@ -935,6 +940,7 @@ test -z "$SOURCE_REVISION" && SOURCE_REVISION=`svn info 2>&1 | grep ^Revision: |
test -z "$SOURCE_REVISION" && SOURCE_REVISION="????"

AC_MSG_RESULT([$SOURCE_REVISION])
SOURCE_REVISION="$SOURCE_REVISION$NON_FREE_VERSION"

AC_MSG_CHECKING([for OpenModelica platform name])
# I don't really agree with the Modelica specification since "Intel 32-bit" is
Expand Down

0 comments on commit 053a363

Please sign in to comment.