Ignore:
Timestamp:
Dec 19, 2010 1:42:04 PM (9 years ago)
Author:
stefan
Message:

sync with trunk rev1551, except for chgsets 1539,1540

Location:
stable/2.6/Cbc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • stable/2.6/Cbc

  • stable/2.6/Cbc/examples/Makefile.in

    r1520 r1553  
    4545##########################################################################
    4646
     47COIN_HAS_PKGCONFIG = @COIN_HAS_PKGCONFIG_TRUE@TRUE
     48COIN_CXX_IS_CL = @COIN_CXX_IS_CL_TRUE@TRUE
     49COIN_HAS_SAMPLE = @COIN_HAS_SAMPLE_TRUE@TRUE
     50COIN_HAS_MIPLIB3 = @COIN_HAS_MIPLIB3_TRUE@TRUE
     51
    4752# C++ Compiler command
    4853CXX = @CXX@
     
    5055# C++ Compiler options
    5156CXXFLAGS = @CXXFLAGS@
    52 @COIN_HAS_SAMPLE_TRUE@CXXFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA@\"
    53 @COIN_HAS_MIPLIB3_TRUE@CXXFLAGS += -DMIPLIB3DIR=\"@MIPLIB3_DATA@\"
    5457
    5558# C Compiler options
    5659CFLAGS = @CFLAGS@
    57 @COIN_HAS_SAMPLE_TRUE@CFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA@\"
    5860
    5961# additional C++ Compiler options for linking
    6062CXXLINKFLAGS = @RPATH_FLAGS@
    6163
    62 # Directory with COIN header files
    63 COININCDIR = @abs_include_dir@/coin
     64# Sample data directory
     65ifeq ($(COIN_HAS_SAMPLE), TRUE)
     66  ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
     67    CXXFLAGS += -DSAMPLEDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatasample`\"
     68      CFLAGS += -DSAMPLEDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatasample`\"
     69  else
     70    CXXFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA_INSTALLED@\"
     71      CFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA_INSTALLED@\"
     72  endif
     73endif
    6474
    65 # Directory with COIN libraries
    66 COINLIBDIR = @abs_lib_dir@
     75# Miplib3 data directory
     76ifeq ($(COIN_HAS_MIPLIB3), TRUE)
     77  ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
     78    CXXFLAGS += -DMIPLIB3DIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatamiplib3`\"
     79  else
     80    CXXFLAGS += -DMIPLIB3DIR=\"@MIPLIB3_DATA_INSTALLED@\"
     81  endif
     82endif
    6783
    68 # Libraries necessary to link with Cbc
    69 LIBS = -L$(COINLIBDIR) -lCbcSolver -lCbc -lOsiCbc @CBCLIB_LIBS@
     84# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers)
     85ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
     86  INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags cbc`
     87else
     88  INCL = @CBCLIB_CFLAGS_INSTALLED@
     89endif
     90INCL += $(ADDINCFLAGS)
    7091
    71 # Necessary Include dirs (we use the CYGPATH_W variables to allow
    72 # compilation with Windows compilers)
    73 # COININCDIR should come first, so that the include directory of the Cbc installation is checked first
    74 # for header files; this is necessary if the installed header files differ from their source header files (esp., XxxConfig.h)
    75 INCL = -I`$(CYGPATH_W) $(COININCDIR)` @COINDEPEND_CFLAGS@ @CLP_CFLAGS@ $(ADDINCFLAGS)
     92# Linker flags
     93ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
     94  LIBS = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs cbc`
     95else
     96  ifeq ($(COIN_CXX_IS_CL), TRUE)
     97    LIBS = /link /libpath:`$(CYGPATH_W) @abs_lib_dir@` libCbcSolver.lib libCbc.lib libOsiCbc.lib @CBCLIB_LIBS_INSTALLED@
     98  else
     99    LIBS = -L@abs_lib_dir@ -lCbcSolver -lCbc -lOsiCbc @CBCLIB_LIBS_INSTALLED@
     100  endif
     101endif
    76102
    77103# The following is necessary under cygwin, if native compilers are used
     
    112138        bla=;\
    113139        for file in $(OBJS); do bla="$$bla `$(CYGPATH_W) $$file`"; done; \
    114         $(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(ADDLIBS) $(LIBS)
     140        $(CXX) $(CXXLINKFLAGS) $(CXXFLAGS) -o $@ $$bla $(LIBS) $(ADDLIBS)
    115141
    116142clean:
  • stable/2.6/Cbc/examples/cbc_driverC_sos.c

    r1468 r1553  
    2323{
    2424  const char prefix[] = "cbc_driverC_sos.cpp::callBack(): ";
    25   const int  VERBOSE = 0;
     25  const int  VERBOSE = 4;
    2626  if (VERBOSE>0) printf("%s begin\n",prefix);
    2727  if (VERBOSE>1) printf("%s messageNumber %i\n",prefix,messageNumber);
     
    4949{
    5050  const char prefix[] = "cbc_driverC_sos.cpp::getDefaultModel(): ";
    51   const int  VERBOSE = 0;
     51  const int  VERBOSE = 4;
    5252  Cbc_Model  *model;
    5353  int status;
     
    6969  Cbc_registerCallBack(model,callBack);
    7070  /* Keep names when reading an mps file */
    71   if (argc<2) {
     71  if (argc < 2) {
    7272#if defined(SAMPLEDIR)
    73     status=Cbc_readMps(model, SAMPLEDIR "/p0033.mps");
     73  /*
     74    SAMPLEDIR should be something like "path/to/mps/directory/", including the
     75    quotes and final directory separator. Don't forget to properly escape
     76    '\' when using native Windows path syntax.
     77  */
     78    status=Cbc_readMps(model,SAMPLEDIR "p0033.mps") ;
    7479#else
    75     fprintf(stderr, "Do not know where to find sample MPS files.\n");
     80    fprintf(stderr, "Please specify the full path to an MPS file on the command line\n");
    7681    exit(1);
    7782#endif
     
    210215{
    211216  const char prefix[] = "cbc_driverC_sos.cpp:main(): ";
    212   const int  VERBOSE = 0;
     217  const int  VERBOSE = 4;
    213218  Cbc_Model * model, * model2;
    214219  double time1;
  • stable/2.6/Cbc/examples/sample2.cpp

    r1468 r1553  
    7373  // Read in model using argv[1]
    7474  // and assert that it is a clean model
    75   const char dirsep =  CoinFindDirSeparator();
     75  std::string dirsep(1,CoinFindDirSeparator());
    7676  std::string mpsFileName;
    77 #if defined(SAMPLEDIR)
    78   mpsFileName = SAMPLEDIR "/p0033.mps";
    79 #else
     77# if defined(SAMPLEDIR)
     78  mpsFileName = SAMPLEDIR ;
     79  mpsFileName += dirsep+"p0033.mps";
     80# else
    8081  if (argc < 2) {
    8182    fprintf(stderr, "Do not know where to find sample MPS files.\n");
    8283    exit(1);
    8384  }
    84 #endif
     85# endif
    8586  if (argc>=2) mpsFileName = argv[1];
    8687  int numMpsReadErrors = solver1.readMps(mpsFileName.c_str(),"");
Note: See TracChangeset for help on using the changeset viewer.