Skip to content

Commit

Permalink
some move
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Oct 24, 2023
1 parent ccbdf13 commit 682bd83
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 32 deletions.
25 changes: 0 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,31 +237,6 @@ endif()

find_package(jsoncpp CONFIG REQUIRED)

# Third-party solver
## Xpress
if(XPRESS)
message("XPRESS is ${XPRESS}")

#Default xpress install dir
if (NOT XPRESSDIR)
if (MSVC)
set(XPRESSDIR "C:/xpressmp")
elseif(UNIX)
set(XPRESSDIR "/opt/xpressmp")
endif()
endif()

find_package(XPRESS REQUIRED)

# Add solver variables for usage in C++ source code
# There are already some variables defined by SOLVER, -DUSE_XPRESS, -DUSE_CBC
# But they are exclusive, only one can be set to True
# We need to keep COIN-OR at least COIN-OR to True while it is required in lpnamer
# and we want to allow compilation with several solvers so that the user can switch
# the solver without any compilation phase.
# @TODO : I think those parameters should be merged in a future version
add_definitions( -DXPRESS=true )
endif(XPRESS)


## Coin-OR (Clp and CBC solvers)
Expand Down
4 changes: 1 addition & 3 deletions src/cpp/multisolver_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@
list(APPEND Solver_sources
${CMAKE_CURRENT_LIST_DIR}/SolverFactory.cpp
)

list(APPEND XPRESS_LOAD
${CMAKE_CURRENT_LIST_DIR}/environment.cc
${CMAKE_CURRENT_LIST_DIR}/environment.h
)

# XPRESS
#IF( XPRESS )
list(APPEND Solver_sources
${CMAKE_CURRENT_LIST_DIR}/SolverXpress.cpp
${CMAKE_CURRENT_LIST_DIR}/environment.h
${CMAKE_CURRENT_LIST_DIR}/environment.cc
)
#ENDIF( XPRESS )

Expand Down
2 changes: 1 addition & 1 deletion src/cpp/multisolver_interface/SolverFactory.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#include "SolverXpress.h"
#include "environment.h"
#include "multisolver_interface/environment.h"

#ifdef COIN_OR
#include "SolverCbc.h"
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/multisolver_interface/SolverXpress.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include <fstream>
#include <mutex>

#include "environment.h"
#include "multisolver_interface/SolverAbstract.h"
#include "multisolver_interface/environment.h"

/*!
* \class class SolverXpress
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/multisolver_interface/environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "environment.h"
#include "multisolver_interface/environment.h"

#include <filesystem>
#include <iostream>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/cpp/sensitivity/SensitivityStudyTest.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "SensitivityFileLogger.h"
#include "SensitivityStudy.h"
#include "environment.h"
#include "gtest/gtest.h"
#include "multisolver_interface/SolverFactory.h"
#include "multisolver_interface/environment.h"

class SensitivityStudyTest : public ::testing::Test {
public:
Expand Down

0 comments on commit 682bd83

Please sign in to comment.