Skip to content

Commit 861efe2

Browse files
authored
Merge pull request ERGO-Code#2746 from ERGO-Code/move-filereader
Move filereader
2 parents 48b48d6 + e3c082a commit 861efe2

File tree

14 files changed

+22
-34
lines changed

14 files changed

+22
-34
lines changed

BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ cuda_library(
5050
cc_library(
5151
name = "highs",
5252
srcs = ["highs/interfaces/highs_c_api.cpp"] + glob([
53-
"extern/filereaderlp/*.cpp",
5453
"highs/io/*.cpp",
54+
"highs/io/filereaderlp/*.cpp",
5555
"highs/ipm/*.cpp",
5656
"highs/ipm/ipx/*.cc",
5757
"highs/ipm/basiclu/*.c",
@@ -71,8 +71,8 @@ cc_library(
7171
"highs/mip/feasibilityjump.hh",
7272
] + glob([
7373
"**/*.h",
74+
"highs/io/filereaderlp/*.hpp",
7475
"highs/qpsolver/*.hpp",
75-
"extern/filereaderlp/*.hpp",
7676
"extern/zstr/*.hpp",
7777
]),
7878
copts = select({

THIRD_PARTY_NOTICES.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,6 @@ The upstream source code is available at:
2828

2929
CLI11 is only used to parse command line input for the HiGHS executable, so does not affect the license status of the HiGHS library or language interfaces to it.
3030

31-
## filereaderlp
32-
33-
The source code in `/extern/filereaderlp` is distributed under the [MIT license](https://opensource.org/license/MIT)
34-
at `/extern/filereaderlp/LICENSE`.
35-
36-
It was originally developed by Michael Feldmeier.
37-
38-
The upstream source code is available at:
39-
40-
* https://github.com/feldmeier/FilereaderLP
41-
4231
## metis
4332

4433
The source code in `/extern/metis` is distributed under the [Apache 2.0 license](https://opensource.org/license/apache-2-0)

check/TestLPFileFormat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "HCheckConfig.h"
22
#include "Highs.h"
33
#include "catch.hpp"
4-
#include "filereaderlp/reader.hpp"
4+
#include "io/filereaderlp/reader.hpp"
55

66
const bool dev_run = false;
77

cmake/sources-python.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
set(include_dirs_python
22
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/extern>
3-
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/extern/filereader>
43
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/extern/pdqsort>
54
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/extern/zstr>
65
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs>
76
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/interfaces>
87
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/io>
8+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/io/filereader>
99
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/ipm>
1010
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/ipm/ipx>
1111
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/ipm/basiclu>
@@ -176,7 +176,6 @@ set(ipx_sources_python
176176
highs/ipm/ipx/utils.h)
177177

178178
set(highs_sources_python
179-
extern/filereaderlp/reader.cpp
180179
highs/interfaces/highs_c_api.cpp
181180
highs/io/Filereader.cpp
182181
highs/io/FilereaderEms.cpp
@@ -186,6 +185,7 @@ set(highs_sources_python
186185
highs/io/HMpsFF.cpp
187186
highs/io/HMPSIO.cpp
188187
highs/io/LoadOptions.cpp
188+
highs/io/filereaderlp/reader.cpp
189189
highs/ipm/IpxWrapper.cpp
190190
highs/lp_data/Highs.cpp
191191
highs/lp_data/HighsCallback.cpp
@@ -286,10 +286,6 @@ set(highs_sources_python
286286
highs/util/stringutil.cpp)
287287

288288
set(highs_headers_python
289-
extern/filereaderlp/builder.hpp
290-
extern/filereaderlp/def.hpp
291-
extern/filereaderlp/model.hpp
292-
extern/filereaderlp/reader.hpp
293289
extern/pdqsort/pdqsort.h
294290
highs/interfaces/highs_c_api.h
295291
highs/io/Filereader.h
@@ -300,6 +296,10 @@ set(highs_headers_python
300296
highs/io/HMpsFF.h
301297
highs/io/HMPSIO.h
302298
highs/io/LoadOptions.h
299+
highs/io/filereaderlp/builder.hpp
300+
highs/io/filereaderlp/def.hpp
301+
highs/io/filereaderlp/model.hpp
302+
highs/io/filereaderlp/reader.hpp
303303
highs/ipm/IpxSolution.h
304304
highs/ipm/IpxWrapper.h
305305
highs/lp_data/HConst.h

cmake/sources.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
set(include_dirs
22
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/extern>
3-
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/extern/filereader>
43
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/extern/pdqsort>
54
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/extern/zstr>
65
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs>
76
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/interfaces>
87
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/io>
8+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/io/filereader>
99
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/ipm>
1010
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/ipm/ipx>
1111
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/highs/ipm/basiclu>
@@ -325,10 +325,9 @@ set(hipo_orderings_headers
325325
../extern/rcm/rcm.h)
326326

327327
# redefinition of 'kHighsInf'
328-
set_source_files_properties (../extern/filereaderlp/reader.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
328+
set_source_files_properties (io/filereaderlp/reader.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
329329

330330
set(highs_sources
331-
../extern/filereaderlp/reader.cpp
332331
interfaces/highs_c_api.cpp
333332
io/Filereader.cpp
334333
io/FilereaderEms.cpp
@@ -338,6 +337,7 @@ set(highs_sources
338337
io/HMpsFF.cpp
339338
io/HMPSIO.cpp
340339
io/LoadOptions.cpp
340+
io/filereaderlp/reader.cpp
341341
ipm/IpxWrapper.cpp
342342
lp_data/Highs.cpp
343343
lp_data/HighsCallback.cpp
@@ -440,10 +440,6 @@ set(highs_sources
440440

441441
# add catch header?
442442
set(highs_headers
443-
../extern/filereaderlp/builder.hpp
444-
../extern/filereaderlp/def.hpp
445-
../extern/filereaderlp/model.hpp
446-
../extern/filereaderlp/reader.hpp
447443
../extern/pdqsort/pdqsort.h
448444
../extern/zstr/strict_fstream.hpp
449445
../extern/zstr/zstr.hpp
@@ -456,6 +452,10 @@ set(highs_headers
456452
io/HMpsFF.h
457453
io/HMPSIO.h
458454
io/LoadOptions.h
455+
io/filereaderlp/builder.hpp
456+
io/filereaderlp/def.hpp
457+
io/filereaderlp/model.hpp
458+
io/filereaderlp/reader.hpp
459459
ipm/IpxSolution.h
460460
ipm/IpxWrapper.h
461461
lp_data/HConst.h

highs/io/FilereaderLp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <exception>
1717
#include <map>
1818

19-
#include "../extern/filereaderlp/reader.hpp"
19+
#include "io/filereaderlp/reader.hpp"
2020
#include "lp_data/HighsLpUtils.h"
2121

2222
FilereaderRetcode FilereaderLp::readModelFromFile(const HighsOptions& options,
@@ -290,7 +290,7 @@ FilereaderRetcode FilereaderLp::readModelFromFile(const HighsOptions& options,
290290
sum_num_zero > 1 ? "s" : "");
291291

292292
} catch (std::invalid_argument& ex) {
293-
// lpassert in extern/filereaderlp/def.hpp throws
293+
// lpassert in highs/io/filereaderlp/def.hpp throws
294294
// std::invalid_argument whatever the error. Hence, unless
295295
// something is done specially - here or elsewhere -
296296
// FilereaderRetcode::kParserError will be returned.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <string>
66
#include <unordered_map>
77

8-
#include "model.hpp"
8+
#include "io/filereaderlp/model.hpp"
99

1010
struct Builder {
1111
std::unordered_map<std::string, std::shared_ptr<Variable>> variables;

0 commit comments

Comments
 (0)