Skip to content

Commit 72b9186

Browse files
committed
Merge branch 'develop' into 'main'
New GDX release 7.11.16 See merge request devel/gdx!109
2 parents 5e01173 + 60c4d1c commit 72b9186

100 files changed

Lines changed: 737 additions & 11555 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 25 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,30 @@ cmake_minimum_required(VERSION 3.16)
22
project(gdx)
33
set(CMAKE_CXX_STANDARD 17)
44

5-
find_program(CCACHE_FOUND ccache)
6-
if (CCACHE_FOUND)
7-
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
8-
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
9-
endif (CCACHE_FOUND)
5+
# ccache and sccache
6+
if(NOT DEFINED CMAKE_C_COMPILER_LAUNCHER AND NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER)
7+
find_program(CCACHE_FOUND ccache)
8+
find_program(SCCACHE_FOUND sccache)
9+
if (SCCACHE_FOUND) # using sccache on Windows for MSVC cl.exe compatibility!
10+
message("-- Found sccache at: ${SCCACHE_FOUND}")
11+
set(CMAKE_C_COMPILER_LAUNCHER ${SCCACHE_FOUND})
12+
set(CMAKE_CXX_COMPILER_LAUNCHER ${SCCACHE_FOUND})
13+
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
14+
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
15+
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
16+
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
17+
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
18+
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
19+
elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
20+
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
21+
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
22+
endif()
23+
elseif(CCACHE_FOUND)
24+
message("-- Found ccache at: ${CCACHE_FOUND}")
25+
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_FOUND})
26+
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_FOUND})
27+
endif()
28+
endif()
1029

1130
set(mylibs ${CMAKE_DL_LIBS} pthread m)
1231

@@ -61,8 +80,6 @@ if (UNIX)
6180
endif ()
6281
endif (UNIX)
6382

64-
include(base-units.cmake)
65-
6683
set(zlib-units
6784
# ZLIB modules
6885
# missing? run in project root: git clone https://github.com/madler/zlib zlib
@@ -103,60 +120,25 @@ set(gdx-core
103120
${zlib-units}
104121
)
105122

106-
set(test-deps
107-
# runtime library
108-
src/rtl/p3library.cpp
109-
src/rtl/p3library.hpp
110-
src/rtl/stdthread.cpp
111-
src/rtl/stdthread.hpp
112-
113-
# global
114-
src/global/gmslibname.cpp
115-
src/global/gmslibname.hpp
116-
117-
# gdlib
118-
src/gdlib/charmaps.cpp
119-
src/gdlib/charmaps.hpp
120-
src/gdlib/gmacro.cpp
121-
src/gdlib/gmacro.hpp
122-
src/gdlib/gmsheapnew.cpp
123-
src/gdlib/gmsheapnew.hpp
124-
src/gdlib/gmsonly.hpp
125-
src/gdlib/gmsonly.cpp
126-
src/gdlib/obfuscatestr.cpp
127-
src/gdlib/obfuscatestr.hpp
128-
src/gdlib/strhash.hpp
129-
src/gdlib/strhash.cpp
130-
src/gdlib/xcompress.cpp
131-
src/gdlib/xcompress.hpp
132-
)
133-
134123
set(tests
135124
src/tests/doctestmain.cpp
136125

137126
src/tests/gdxtests.hpp
138127
src/tests/gdxtests.cpp
139128
src/tests/gxfiletests.cpp
140129

141-
src/tests/gdlib/datastoragetests.cpp
142-
src/tests/gdlib/glookuptests.cpp
143-
src/tests/gdlib/gmacrotests.cpp
144130
src/tests/gdlib/gmsdatatests.cpp
145-
src/tests/gdlib/gmsheapnewtests.cpp
146131
src/tests/gdlib/gmsobjtests.cpp
147132
src/tests/gdlib/gmsstrmtests.cpp
148-
src/tests/gdlib/obfuscatestrtests.cpp
149133
src/tests/gdlib/strhashtests.cpp
150134
src/tests/gdlib/strutilxtests.cpp
151135
src/tests/gdlib/utilstests.cpp
152-
src/tests/gdlib/xcompresstests.cpp
153136

154137
src/tests/rtl/p3iotests.cpp
155138
src/tests/rtl/p3utilstests.cpp
156-
src/tests/rtl/stdthreadtests.cpp
157139
src/tests/rtl/sysutilsp3tests.cpp
158140
)
159141

160-
set(inc-dirs zlib src generated)
142+
set(inc-dirs zlib src generated src/gdlib src/global src/rtl)
161143

162144
include(targets.cmake)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ TGXFileObj gdx;
578578
TgdxUELIndex UELS;
579579
TgdxValues Vals;
580580
int FDim, N, NrRecs, ErrNr, acrindx;
581-
std::array<char, GMS_SSIZE> ErrMsg, acrtext, acrname;
581+
std::array<char, GMS_SSSIZE> ErrMsg, acrtext, acrname;
582582
//Check the library
583583
if(!gdxGetReadyX(ErrMsg)) {
584584
std::cout << "Error loading GDX library, msg = " << ErrMsg << std::endl;

base-units.cmake

Lines changed: 0 additions & 85 deletions
This file was deleted.

changelog.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
---
2+
- 7.11.16:
3+
- Drastically improve performance of `gdxOpenRead` for GDX files with many UELs by reducing the memory allocation count.
4+
- Drop many GAMS infrastructure source files not actively used by GDX library.
25
- 7.11.15:
36
- Fixed an issue where `gdxmerge` would fail with a "Symbol is too large" error when merging GDX files containing large symbols.
47
- 7.11.14:

gdx.vcxproj

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -19,62 +19,34 @@
1919
</ProjectConfiguration>
2020
</ItemGroup>
2121
<ItemGroup>
22-
<ClCompile Include="src\gdlib\charmaps.cpp" />
23-
<ClCompile Include="src\gdlib\cmdpar.cpp" />
2422
<ClCompile Include="src\gdlib\datastorage.cpp" />
2523
<ClCompile Include="src\gdlib\dblutil.cpp" />
26-
<ClCompile Include="src\gdlib\gamsdirs.cpp" />
27-
<ClCompile Include="src\gdlib\gfileopen.cpp" />
28-
<ClCompile Include="src\gdlib\glookup.cpp" />
29-
<ClCompile Include="src\gdlib\gmacro.cpp" />
3024
<ClCompile Include="src\gdlib\gmsdata.cpp" />
31-
<ClCompile Include="src\gdlib\gmsglob.cpp" />
32-
<ClCompile Include="src\gdlib\gmsheapnew.cpp" />
33-
<ClCompile Include="src\gdlib\gmslist.cpp" />
3425
<ClCompile Include="src\gdlib\gmsobj.cpp" />
35-
<ClCompile Include="src\gdlib\gmsonly.cpp" />
3626
<ClCompile Include="src\gdlib\gmsstrm.cpp" />
37-
<ClCompile Include="src\gdlib\obfuscatestr.cpp" />
38-
<ClCompile Include="src\gdlib\runner.cpp" />
39-
<ClCompile Include="src\gdlib\statlib.cpp" />
40-
<ClCompile Include="src\gdlib\statlibobj.cpp" />
4127
<ClCompile Include="src\gdlib\strhash.cpp" />
4228
<ClCompile Include="src\gdlib\strutilx.cpp" />
4329
<ClCompile Include="src\gdlib\utils.cpp" />
44-
<ClCompile Include="src\gdlib\xcompress.cpp" />
45-
<ClCompile Include="src\global\ctvproc.cpp" />
46-
<ClCompile Include="src\global\gmslibname.cpp" />
47-
<ClCompile Include="src\global\gmsspecs.cpp" />
48-
<ClCompile Include="src\global\modhead.cpp" />
4930
<ClCompile Include="src\gxfile.cpp" />
5031
<ClCompile Include="src\rtl\dtoaLoc.c" />
51-
<ClCompile Include="src\rtl\idglobal_p3.cpp" />
5232
<ClCompile Include="src\rtl\math_p3.cpp" />
5333
<ClCompile Include="src\rtl\p3io.cpp" />
54-
<ClCompile Include="src\rtl\p3library.cpp" />
5534
<ClCompile Include="src\rtl\p3platform.cpp" />
5635
<ClCompile Include="src\rtl\p3process.cpp" />
5736
<ClCompile Include="src\rtl\p3utils.cpp" />
58-
<ClCompile Include="src\rtl\stdthread.cpp" />
5937
<ClCompile Include="src\rtl\sysutils_p3.cpp" />
6038
<ClCompile Include="src\tests\doctestmain.cpp" />
6139
<ClCompile Include="src\tests\gdlib\datastoragetests.cpp" />
62-
<ClCompile Include="src\tests\gdlib\glookuptests.cpp" />
63-
<ClCompile Include="src\tests\gdlib\gmacrotests.cpp" />
6440
<ClCompile Include="src\tests\gdlib\gmsdatatests.cpp" />
65-
<ClCompile Include="src\tests\gdlib\gmsheapnewtests.cpp" />
6641
<ClCompile Include="src\tests\gdlib\gmsobjtests.cpp" />
6742
<ClCompile Include="src\tests\gdlib\gmsstrmtests.cpp" />
68-
<ClCompile Include="src\tests\gdlib\obfuscatestrtests.cpp" />
6943
<ClCompile Include="src\tests\gdlib\strhashtests.cpp" />
7044
<ClCompile Include="src\tests\gdlib\strutilxtests.cpp" />
7145
<ClCompile Include="src\tests\gdlib\utilstests.cpp" />
72-
<ClCompile Include="src\tests\gdlib\xcompresstests.cpp" />
7346
<ClCompile Include="src\tests\gdxtests.cpp" />
7447
<ClCompile Include="src\tests\gxfiletests.cpp" />
7548
<ClCompile Include="src\tests\rtl\p3iotests.cpp" />
7649
<ClCompile Include="src\tests\rtl\p3utilstests.cpp" />
77-
<ClCompile Include="src\tests\rtl\stdthreadtests.cpp" />
7850
<ClCompile Include="src\tests\rtl\sysutilsp3tests.cpp" />
7951
<ClCompile Include="zlib\adler32.c" />
8052
<ClCompile Include="zlib\compress.c" />
@@ -94,48 +66,25 @@
9466
</ItemGroup>
9567
<ItemGroup>
9668
<ClInclude Include="src\gdlib\batchalloc.hpp" />
97-
<ClInclude Include="src\gdlib\charmaps.hpp" />
98-
<ClInclude Include="src\gdlib\cmdpar.hpp" />
9969
<ClInclude Include="src\gdlib\datastorage.hpp" />
10070
<ClInclude Include="src\gdlib\dblutil.hpp" />
101-
<ClInclude Include="src\gdlib\gamsdirs.hpp" />
102-
<ClInclude Include="src\gdlib\gfileopen.hpp" />
103-
<ClInclude Include="src\gdlib\glookup.hpp" />
104-
<ClInclude Include="src\gdlib\gmacro.hpp" />
10571
<ClInclude Include="src\gdlib\gmsdata.hpp" />
106-
<ClInclude Include="src\gdlib\gmsgen.hpp" />
107-
<ClInclude Include="src\gdlib\gmsglob.hpp" />
108-
<ClInclude Include="src\gdlib\gmsheapnew.hpp" />
109-
<ClInclude Include="src\gdlib\gmslist.hpp" />
11072
<ClInclude Include="src\gdlib\gmsobj.hpp" />
111-
<ClInclude Include="src\gdlib\gmsonly.hpp" />
11273
<ClInclude Include="src\gdlib\gmsstrm.hpp" />
113-
<ClInclude Include="src\gdlib\obfuscatestr.hpp" />
114-
<ClInclude Include="src\gdlib\runner.hpp" />
115-
<ClInclude Include="src\gdlib\statlib.hpp" />
116-
<ClInclude Include="src\gdlib\statlibobj.hpp" />
117-
<ClInclude Include="src\gdlib\stattypes.hpp" />
11874
<ClInclude Include="src\gdlib\strhash.hpp" />
11975
<ClInclude Include="src\gdlib\strutilx.hpp" />
12076
<ClInclude Include="src\gdlib\utils.hpp" />
121-
<ClInclude Include="src\gdlib\xcompress.hpp" />
12277
<ClInclude Include="src\gdx.hpp" />
123-
<ClInclude Include="src\global\ctvproc.hpp" />
12478
<ClInclude Include="src\global\delphitypes.hpp" />
125-
<ClInclude Include="src\global\gmslibname.hpp" />
126-
<ClInclude Include="src\global\gmsspecs.hpp" />
127-
<ClInclude Include="src\global\modhead.hpp" />
12879
<ClInclude Include="src\global\unit.h" />
12980
<ClInclude Include="src\gxfile.hpp" />
13081
<ClInclude Include="src\rtl\dtoaLoc.h" />
13182
<ClInclude Include="src\rtl\idglobal_p3.hpp" />
13283
<ClInclude Include="src\rtl\math_p3.hpp" />
13384
<ClInclude Include="src\rtl\p3io.hpp" />
134-
<ClInclude Include="src\rtl\p3library.hpp" />
13585
<ClInclude Include="src\rtl\p3platform.hpp" />
13686
<ClInclude Include="src\rtl\p3process.hpp" />
13787
<ClInclude Include="src\rtl\p3utils.hpp" />
138-
<ClInclude Include="src\rtl\stdthread.hpp" />
13988
<ClInclude Include="src\rtl\sysutils_p3.hpp" />
14089
<ClInclude Include="src\tests\doctest.hpp" />
14190
<ClInclude Include="src\tests\gdxtests.hpp" />
@@ -206,10 +155,10 @@
206155
<PropertyGroup Label="UserMacros" />
207156
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
208157
<LinkIncremental>true</LinkIncremental>
209-
<IncludePath>src;generated;zlib;$(IncludePath)</IncludePath>
158+
<IncludePath>src;generated;zlib;src/gdlib;src/rtl;src/global;$(IncludePath)</IncludePath>
210159
</PropertyGroup>
211160
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
212-
<IncludePath>src;generated;zlib;$(IncludePath)</IncludePath>
161+
<IncludePath>src;generated;zlib;src/gdlib;src/rtl;src/global;$(IncludePath)</IncludePath>
213162
</PropertyGroup>
214163
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
215164
<ClCompile>

0 commit comments

Comments
 (0)