Changeset 1561 for trunk/Clp


Ignore:
Timestamp:
Jun 13, 2010 9:08:03 AM (9 years ago)
Author:
stefan
Message:

make check for sample dir work without including ClpConfig?.h

Location:
trunk/Clp/examples
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/examples/Makefile.in

    r1559 r1561  
    4242
    4343# C++ Compiler options
    44 CXXFLAGS = @CXXFLAGS@ -DSAMPLEDIR=\"@SAMPLE_DATA@\" -DNETLIBDIR=\"@NETLIB_DATA@\"
     44CXXFLAGS = @CXXFLAGS@
     45@COIN_HAS_SAMPLE_TRUE@CXXFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA@\"
     46@COIN_HAS_NETLIB_TRUE@CXXFLAGS += -DNETLIBDIR=\"@NETLIB_DATA@\"
    4547
    4648# additional C++ Compiler options for linking
     
    5153
    5254# C Compiler options
    53 CFLAGS = @CFLAGS@ -DSAMPLEDIR=\"@SAMPLE_DATA@\" -DNETLIBDIR=\"@NETLIB_DATA@\"
     55CFLAGS = @CFLAGS@
     56@COIN_HAS_SAMPLE_TRUE@CFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA@\"
     57@COIN_HAS_NETLIB_TRUE@CFLAGS += -DNETLIBDIR=\"@NETLIB_DATA@\"
    5458
    5559# Directory with COIN header files
  • trunk/Clp/examples/addBits.cpp

    r1559 r1561  
    2525  (you can have as many different strings as you want)
    2626*/
    27 #include "ClpConfig.h"
    2827#include "ClpSimplex.hpp"
    2928#include "CoinHelperFunctions.hpp"
     
    4039     if (argc >= 2) mpsFileName = argv[1];
    4140     else {
    42 #if defined(COIN_HAS_NETLIB) && defined(NETLIBDIR)
     41#if defined(NETLIBDIR)
    4342          mpsFileName = NETLIBDIR "/25fv47.mps";
    4443#else
  • trunk/Clp/examples/addColumns.cpp

    r1559 r1561  
    184184          int status;
    185185          if (argc < 2) {
    186 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     186#if defined(SAMPLEDIR)
    187187               status = model.readMps(SAMPLEDIR "/p0033.mps", true);
    188188#else
     
    233233          int status;
    234234          if (argc < 2) {
    235 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     235#if defined(SAMPLEDIR)
    236236               status = model.readMps(SAMPLEDIR "/p0033.mps", true);
    237237#else
  • trunk/Clp/examples/decomp2.cpp

    r1559 r1561  
    33// Corporation and others.  All Rights Reserved.
    44
    5 #include "ClpConfig.h"
    65#include "ClpSimplex.hpp"
    76#include "CoinStructuredModel.hpp"
     
    1413     */
    1514     // At present D-W rows are hard coded - will move stuff from OSL
    16 #if defined(COIN_HAS_NETLIB) && defined(NETLIBDIR)
     15#if defined(NETLIBDIR)
    1716     CoinStructuredModel model((argc < 2) ? NETLIBDIR "/czprob.mps"
    1817                               : argv[1], 1);
  • trunk/Clp/examples/decomp3.cpp

    r1559 r1561  
    33// Corporation and others.  All Rights Reserved.
    44
    5 #include "ClpConfig.h"
    65#include "ClpSimplex.hpp"
    76#include "ClpPresolve.hpp"
     
    3231     //#define PRESOLVE
    3332#ifndef PRESOLVE
    34 #if defined(COIN_HAS_NETLIB) && defined(NETLIBDIR)
     33#if defined(NETLIBDIR)
    3534     CoinStructuredModel model((argc < 2) ? NETLIBDIR "/czprob.mps"
    3635                               : argv[1], decompose, maxBlocks);
     
    5857#else
    5958     ClpSimplex  model;
    60 #if defined(COIN_HAS_NETLIB) && defined(NETLIBDIR)
     59#if defined(NETLIBDIR)
    6160     int status = model.readMps((argc < 2) ? NETLIBDIR "/czprob.mps"
    6261                                : argv[1]);
     
    9392     return 0;
    9493     ClpSimplex solver2;
    95 #if defined(COIN_HAS_NETLIB) && defined(NETLIBDIR)
     94#if defined(NETLIBDIR)
    9695     solver2.readMps((argc < 2) ? NETLIBDIR "/czprob.mps" : argv[1]);
    9796#else
  • trunk/Clp/examples/decompose.cpp

    r1559 r1561  
    33// Corporation and others.  All Rights Reserved.
    44
    5 #include "ClpConfig.h"
    65#include "ClpSimplex.hpp"
    76#include "CoinMpsIO.hpp"
     
    1413     // Keep names
    1514     if (argc < 2) {
    16 #if defined(COIN_HAS_NETLIB) && defined(NETLIBDIR)
     15#if defined(NETLIBDIR)
    1716          status = model.readMps(NETLIBDIR "/czprob.mps", true);
    1817#else
  • trunk/Clp/examples/defaults.cpp

    r1559 r1561  
    1414     // Keep names
    1515     if (argc < 2) {
    16 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     16#if defined(SAMPLEDIR)
    1717          status = model.readMps(SAMPLEDIR "/p0033.mps", true);
    1818#else
  • trunk/Clp/examples/driver.cpp

    r1559 r1561  
    1212     // Keep names when reading an mps file
    1313     if (argc < 2) {
    14 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     14#if defined(SAMPLEDIR)
    1515          status = model.readMps(SAMPLEDIR "/p0033.mps", true);
    1616#else
  • trunk/Clp/examples/driver2.cpp

    r1559 r1561  
    184184     // Keep names when reading an mps file
    185185     if (argc < 2) {
    186 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     186#if defined(SAMPLEDIR)
    187187          status = model.readMps(SAMPLEDIR "/p0033.mps", true);
    188188#else
  • trunk/Clp/examples/driverC.c

    r1559 r1561  
    55/* This example shows the use of the "C" interface */
    66
    7 #include "ClpConfig.h"
    87#include "Clp_C_Interface.h"
    98#include <stdio.h>
     
    4342     /* Keep names when reading an mps file */
    4443     if (argc < 2) {
    45 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     44#if defined(SAMPLEDIR)
    4645          status = Clp_readMps(model, SAMPLEDIR "/p0033.mps", 1, 0);
    4746#else
  • trunk/Clp/examples/ekk.cpp

    r1559 r1561  
    6565          name = argv[1];
    6666     } else {
    67 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     67#if defined(SAMPLEDIR)
    6868          name = (SAMPLEDIR "/p0033.mps";
    6969#else
  • trunk/Clp/examples/makeDual.cpp

    r1559 r1561  
    1111     int status;
    1212     if (argc < 2) {
    13 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     13#if defined(SAMPLEDIR)
    1414          status = model.readMps(SAMPLEDIR "/p0033.mps", true);
    1515#else
  • trunk/Clp/examples/minimum.cpp

    r1559 r1561  
    99     int status;
    1010     if (argc < 2) {
    11 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     11#if defined(SAMPLEDIR)
    1212          status = model.readMps(SAMPLEDIR "/p0033.mps", true);
    1313#else
  • trunk/Clp/examples/testBarrier.cpp

    r1559 r1561  
    1212     int status;
    1313     if (argc < 2) {
    14 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     14#if defined(SAMPLEDIR)
    1515          status = model.readMps(SAMPLEDIR "/p0033.mps", true);
    1616#else
  • trunk/Clp/examples/testGub.cpp

    r1559 r1561  
    33// Corporation and others.  All Rights Reserved.
    44
    5 #include "ClpConfig.h"
    65#include "ClpSimplex.hpp"
    76#include "ClpDynamicExampleMatrix.hpp"
     
    1716     int maxFactor = 100;
    1817     if (argc < 2) {
    19 #if defined(COIN_HAS_NETLIB) && defined(NETLIBDIR)
     18#if defined(NETLIBDIR)
    2019          status = model.readMps(NETLIBDIR "/czprob.mps");
    2120          if (status) {
  • trunk/Clp/examples/testGub2.cpp

    r1559 r1561  
    1717     int maxFactor = 100;
    1818     if (argc < 2) {
    19 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     19#if defined(SAMPLEDIR)
    2020          status = model.readMps(SAMPLEDIR "/p0033.mps", true);
    2121#else
  • trunk/Clp/examples/testQP.cpp

    r1559 r1561  
    2222     if (argc < 2) {
    2323          CoinMpsIO  m;
    24 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     24#if defined(SAMPLEDIR)
    2525          int status = m.readMps(SAMPLEDIR "/share2qp", "mps");
    2626#else
  • trunk/Clp/examples/useVolume.cpp

    r1559 r1561  
    163163
    164164     if (argc < 2) {
    165 #if defined(COIN_HAS_SAMPLE) && defined(SAMPLEDIR)
     165#if defined(SAMPLEDIR)
    166166          status = model.readMps(SAMPLEDIR "/p0033.mps", true);
    167167#else
Note: See TracChangeset for help on using the changeset viewer.