Commit 5aa6cea4 authored by Matthias Möller's avatar Matthias Möller
Browse files

same config for different qt versions

refs #2237

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@266 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 22ac8432
...@@ -32,21 +32,16 @@ if( WANT_COMISO_QT ) ...@@ -32,21 +32,16 @@ if( WANT_COMISO_QT )
message(STATUS "Using QT5 for CoMISo") message(STATUS "Using QT5 for CoMISo")
endif () endif ()
# QT4 settings in CoMISo # QT settings in CoMISo
if( QT4_FOUND) if( QT4_FOUND)
add_definitions (-DQT4_FOUND) add_definitions (-DQT4_FOUND)
set (COMISO_QT4_CONFIG_FILE_SETTINGS "#define COMISO_QT4_AVAILABLE 1" ) set (COMISO_QT_CONFIG_FILE_SETTINGS "#define COMISO_QT_AVAILABLE 1" )
else() elseif( QT5_FOUND)
set (COMISO_QT4_CONFIG_FILE_SETTINGS "#define COMISO_QT4_AVAILABLE 0" )
endif ()
# QT5 settings in CoMISo
if( QT5_FOUND)
add_definitions (-DQT5_FOUND) add_definitions (-DQT5_FOUND)
set (COMISO_QT5_CONFIG_FILE_SETTINGS "#define COMISO_QT5_AVAILABLE 1" ) set (COMISO_QT_CONFIG_FILE_SETTINGS "#define COMISO_QT_AVAILABLE 1" )
else() else()
set (COMISO_QT5_CONFIG_FILE_SETTINGS "#define COMISO_QT5_AVAILABLE 0" ) set (COMISO_QT_CONFIG_FILE_SETTINGS "#define COMISO_QT_AVAILABLE 0" )
endif () endif()
endif( WANT_COMISO_QT ) endif( WANT_COMISO_QT )
......
// Build time dependencies for CoMiso // Build time dependencies for CoMiso
@COMISO_QT4_CONFIG_FILE_SETTINGS@ @COMISO_QT_CONFIG_FILE_SETTINGS@
@COMISO_BOOST_CONFIG_FILE_SETTINGS@ @COMISO_BOOST_CONFIG_FILE_SETTINGS@
@COMISO_BLAS_CONFIG_FILE_SETTINGS@ @COMISO_BLAS_CONFIG_FILE_SETTINGS@
@COMISO_GMM_CONFIG_FILE_SETTINGS@ @COMISO_GMM_CONFIG_FILE_SETTINGS@
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#if (COMISO_GUROBI_AVAILABLE && COMISO_BOOST_AVAILABLE) #if (COMISO_GUROBI_AVAILABLE && COMISO_BOOST_AVAILABLE)
#if (COMISO_QT4_AVAILABLE) #if (COMISO_QT_AVAILABLE)
#include <QTemporaryFile> #include <QTemporaryFile>
#include <QFileInfo> #include <QFileInfo>
#endif #endif
...@@ -85,7 +85,7 @@ void GurobiHelper::outputModelToMpsGz(GRBModel &model, const std::string &proble ...@@ -85,7 +85,7 @@ void GurobiHelper::outputModelToMpsGz(GRBModel &model, const std::string &proble
#if OUTPUT_UNCOMPRESSED_WITH_CONSTANT_COMMENT #if OUTPUT_UNCOMPRESSED_WITH_CONSTANT_COMMENT
boost::scoped_ptr<TempFileGuard> tempFileGuard; boost::scoped_ptr<TempFileGuard> tempFileGuard;
{ {
#if (COMISO_QT4_AVAILABLE) #if (COMISO_QT_AVAILABLE)
QTemporaryFile tempFile("XXXXXX.mps"); QTemporaryFile tempFile("XXXXXX.mps");
tempFile.setAutoRemove(false); tempFile.setAutoRemove(false);
tempFile.open(); tempFile.open();
...@@ -133,7 +133,7 @@ void GurobiHelper::outputModelToMpsGz(GRBModel &model, const std::string &proble ...@@ -133,7 +133,7 @@ void GurobiHelper::outputModelToMpsGz(GRBModel &model, const std::string &proble
void GurobiHelper::importInitialSolutionIntoModel(GRBModel &model, const std::string &solution_path_) { void GurobiHelper::importInitialSolutionIntoModel(GRBModel &model, const std::string &solution_path_) {
boost::scoped_ptr<TempFileGuard> tempFileGuard; boost::scoped_ptr<TempFileGuard> tempFileGuard;
{ {
#if (COMISO_QT4_AVAILABLE) #if (COMISO_QT_AVAILABLE)
QTemporaryFile tempFile("XXXXXX.mst"); QTemporaryFile tempFile("XXXXXX.mst");
tempFile.setAutoRemove(false); tempFile.setAutoRemove(false);
tempFile.open(); tempFile.open();
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <CoMISo/Config/config.hh> #include <CoMISo/Config/config.hh>
//== BUILD-TIME DEPENDENCIES ================================================================= //== BUILD-TIME DEPENDENCIES =================================================================
#if(COMISO_QT4_AVAILABLE) #if(COMISO_QT_AVAILABLE)
//============================================================================================ //============================================================================================
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include <CoMISo/Config/config.hh> #include <CoMISo/Config/config.hh>
//== BUILD-TIME DEPENDENCIES ================================================================= //== BUILD-TIME DEPENDENCIES =================================================================
#if COMISO_QT4_AVAILABLE || COMISO_QT5_AVAILABLE #if COMISO_QT_AVAILABLE
//============================================================================================ //============================================================================================
//== INCLUDES ================================================================= //== INCLUDES =================================================================
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <CoMISo/Config/config.hh> #include <CoMISo/Config/config.hh>
#include "MISolver.hh" #include "MISolver.hh"
#if(COMISO_QT4_AVAILABLE) #if(COMISO_QT_AVAILABLE)
#include <CoMISo/QtWidgets/MISolverDialogUI.hh> #include <CoMISo/QtWidgets/MISolverDialogUI.hh>
#endif #endif
...@@ -725,7 +725,7 @@ void ...@@ -725,7 +725,7 @@ void
MISolver:: MISolver::
show_options_dialog() show_options_dialog()
{ {
#if(COMISO_QT4_AVAILABLE) #if(COMISO_QT_AVAILABLE)
MISolverDialog* pd = new MISolverDialog(*this); MISolverDialog* pd = new MISolverDialog(*this);
pd->exec(); pd->exec();
#else #else
......
...@@ -385,7 +385,7 @@ private: ...@@ -385,7 +385,7 @@ private:
bool use_constraint_reordering_; bool use_constraint_reordering_;
#if(COMISO_QT4_AVAILABLE) #if(COMISO_QT_AVAILABLE)
friend class COMISO::MISolverDialog; friend class COMISO::MISolverDialog;
#endif #endif
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment