Skip to content

Commit

Permalink
refs modelica#3867: Remove ModelicaUtilities.h
Browse files Browse the repository at this point in the history
ModelicaUtilities.h is ought to be distributed by Modelica tools and no longer by the MSL.
  • Loading branch information
beutlich committed Oct 29, 2021
1 parent af0913b commit 1bb1d40
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .CI/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,14 @@ def allAutotools() {
def autotools(CC, CPPFLAGS, config, nostatic, dotest) {
sh label: "Build $CC $CPPFLAGS", script: """
export CC=$CC
export CPPFLAGS=$CPPFLAGS
export CPPFLAGS="$CPPFLAGS -I${WORKSPACE}/.CI/Test"
export CFLAGS="-Os -fPIC"
rm -rf Modelica/Resources/Library/*
mkdir -p Modelica/Resources/Library/\$LIBDIR
cd Modelica/Resources/BuildProjects/autotools
git clean -fdx .
./autogen.sh
./configure --libdir="\$PWD/../../Library/\$LIBDIR" $config
./configure --libdir="${WORKSPACE}/Modelica/Resources/Library/\$LIBDIR" $config
make --output-sync -j${numPhysicalCPU()}
make install
"""
Expand All @@ -223,7 +223,7 @@ def makefile(CC, dotest) {
rm -rf Modelica/Resources/Library/*
mkdir -p "Modelica/Resources/Library/$LIBDIR"
cd Modelica/Resources/BuildProjects/gcc
make --output-sync -j${numPhysicalCPU()} TARGETDIR="$LIBDIR"
make --output-sync -j${numPhysicalCPU()} TARGETDIR="$LIBDIR" CPPFLAGS="-I${WORKSPACE}/.CI/Test"
"""
sh label: "Test $CC", script: """
export CC=$CC
Expand Down
2 changes: 1 addition & 1 deletion .CI/Test/Common.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "../../Modelica/Resources/C-Sources/ModelicaUtilities.h"
#include "ModelicaUtilities.h"
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/checkCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
pushd Modelica/Resources/BuildProjects/autotools
git clean -fdx .
./autogen.sh
./configure --libdir="$PWD/../../Library/$LIBDIR" --enable-static --disable-shared --enable-static-zlib --disable-hdf5
./configure --libdir="$PWD/../../Library/$LIBDIR" --enable-static --disable-shared --enable-static-zlib --disable-hdf5 CPPFLAGS="-I${GITHUB_WORKSPACE}/.CI/Test"
make --output-sync
sudo make install
popd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;MODELICAIO_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
Expand Down Expand Up @@ -106,7 +106,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;MODELICAIO_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
Expand Down Expand Up @@ -168,7 +168,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;MODELICAIO_EXPORTS;_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="0"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
Expand Down Expand Up @@ -228,7 +228,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;MODELICAIO_EXPORTS;_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="0"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
Expand Down Expand Up @@ -281,16 +281,12 @@
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\C-Sources\ModelicaMatIO.h"
>
</File>
<File
RelativePath="..\..\C-Sources\ModelicaIO.h"
>
</File>
<File
RelativePath="..\..\C-Sources\ModelicaUtilities.h"
RelativePath="..\..\C-Sources\ModelicaMatIO.h"
>
</File>
</Filter>
Expand All @@ -301,4 +297,6 @@
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\C-Sources\zlib\"
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;;&quot;..\..\C-Sources\zlib\&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;MODELICAMATIO_EXPORTS;PSNIP_SAFE_FORCE_PORTABLE;HAVE_ZLIB=1"
MinimalRebuild="true"
BasicRuntimeChecks="3"
Expand Down Expand Up @@ -106,7 +106,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\C-Sources\zlib\"
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;;&quot;..\..\C-Sources\zlib\&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;MODELICAMATIO_EXPORTS;PSNIP_SAFE_FORCE_PORTABLE;HAVE_ZLIB=1"
MinimalRebuild="true"
BasicRuntimeChecks="3"
Expand Down Expand Up @@ -168,7 +168,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\C-Sources\zlib\"
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;;&quot;..\..\C-Sources\zlib\&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;MODELICAMATIO_EXPORTS;PSNIP_SAFE_FORCE_PORTABLE;_CRT_SECURE_NO_WARNINGS;HAVE_ZLIB=1"
RuntimeLibrary="0"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
Expand Down Expand Up @@ -228,7 +228,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\C-Sources\zlib\"
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;;&quot;..\..\C-Sources\zlib\&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;MODELICAMATIO_EXPORTS;PSNIP_SAFE_FORCE_PORTABLE;_CRT_SECURE_NO_WARNINGS;HAVE_ZLIB=1"
RuntimeLibrary="0"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
Expand Down Expand Up @@ -289,10 +289,6 @@
RelativePath="..\..\C-Sources\ModelicaMatIO.h"
>
</File>
<File
RelativePath="..\..\C-Sources\ModelicaUtilities.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;MODELICASTANDARDTABLES_EXPORTS;DEBUG_TIME_EVENTS;TABLE_SHARE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
Expand Down Expand Up @@ -106,7 +106,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;MODELICASTANDARDTABLES_EXPORTS;DEBUG_TIME_EVENTS;TABLE_SHARE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
Expand Down Expand Up @@ -168,7 +168,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;MODELICASTANDARDTABLES_EXPORTS;_CRT_SECURE_NO_WARNINGS;TABLE_SHARE"
RuntimeLibrary="0"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
Expand Down Expand Up @@ -228,7 +228,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
AdditionalIncludeDirectories="&quot;$(MODELICA_UTILITIES_INCLUDE)&quot;"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;MODELICASTANDARDTABLES_EXPORTS;_CRT_SECURE_NO_WARNINGS;TABLE_SHARE"
RuntimeLibrary="0"
ProgramDataBaseFileName="$(IntDir)\$(ProjectName).pdb"
Expand Down Expand Up @@ -293,10 +293,6 @@
RelativePath="..\..\C-Sources\ModelicaStandardTables.h"
>
</File>
<File
RelativePath="..\..\C-Sources\ModelicaUtilities.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Expand Down
8 changes: 6 additions & 2 deletions Modelica/Resources/BuildProjects/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ from the C-code under ../C-Sources
The intention is that interested tool vendors can build these libraries
by using the provided build projects as a start.

Note, the tool vendors are responsible for building the binary libraries
The tool vendors are responsible for building the binary libraries
and including them in their tools.

May 17, 2018
When building the binary libraries by VisualStudio2005 the environment
variable MODELICA_UTILITIES_INCLUDE needs to be set to the path of the
(tool-vendor-specific) ModelicaUtilities.h header file.

September 24, 2021
2 changes: 1 addition & 1 deletion Modelica/Utilities/Streams.mo
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ separated by LF or CR-LF.
pure function error "Print error message and cancel all actions - in case of an unrecoverable error"
extends Modelica.Icons.Function;
input String string "String to be printed to error message window";
external "C" ModelicaError(string) annotation(IncludeDirectory="modelica://Modelica/Resources/C-Sources", Include="#include \"ModelicaUtilities.h\"", Library="ModelicaExternalC");
external "C" ModelicaError(string) annotation(Include="#include \"ModelicaUtilities.h\"", Library="ModelicaExternalC");
annotation (Documentation(info="<html>
<h4>Syntax</h4>
<blockquote><pre>
Expand Down

0 comments on commit 1bb1d40

Please sign in to comment.