Changeset 19764c6 in git


Ignore:
Timestamp:
Mar 16, 2011, 6:53:23 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
950214e56df8e233d791b1abc2c8674661d285d0
Parents:
79fa8352d2e8a5cc848baaa1ce73f4345f8daa44
Message:
FIX: the issue of debug/release Singular needed for correspondingly built dynamic module

From: Oleksandr Motsak <motsak@mathematik.uni-kl.de>

git-svn-id: file:///usr/local/Singular/svn/trunk@13996 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
dyn_modules/syzextra
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • dyn_modules/syzextra/SConstruct

    r79fa83 r19764c6  
    99
    1010
    11 sing_psico_int_if = env.SharedLibrary('syzextra',
     11#env.SharedObject(target = 'mod_main.o', source = 'mod_main.cc')
     12
     13
     14### Works with any Singular
     15#syzextra_if = env.SharedLibrary('syzextra',
     16#                               ["mod_main.cc", "DebugPrint.cc", "myNF.cc"],
     17#                               SHLIBPREFIX="", LDMODULESUFFIX=".so", CPPDEFINES = 'NDEBUG', SHLIBSUFFIX = ".so",
     18#                               CPPPATH = SING_INCLUDES,
     19#                               LIBS=[])
     20
     21### Works with Singularg only!
     22syzextra_debug_if = env.LoadableModule('syzextra_g',
    1223                               ["mod_main.cc", "DebugPrint.cc", "myNF.cc"],
    13                                SHLIBPREFIX="", LDMODULESUFFIX=".so",
     24                               SHLIBPREFIX="", LDMODULESUFFIX=".sog", SHLIBSUFFIX = ".sog",
    1425                               CPPPATH = SING_INCLUDES,
    1526                               LIBS=[])
    1627
    17 Default(sing_psico_int_if)
     28# Default(syzextra_if)
     29# Default(syzextra_debug_if)
    1830
  • dyn_modules/syzextra/mod_main.cc

    r79fa83 r19764c6  
    8686}
    8787
     88static inline void view(const intvec* v)
     89{
     90#ifndef NDEBUG
     91  v->view();
     92#else
     93  // This code duplication is only due to Hannes's #ifndef NDEBUG!
     94  Print ("intvec: {rows: %d, cols: %d, length: %d, Values: \n", v->rows(), v->cols(), v->length());
     95
     96  for (int i = 0; i < v->rows(); i++)
     97  {
     98    Print ("Row[%3d]:", i);
     99    for (int j = 0; j < v->cols(); j++)
     100      Print (" %5d", (*v)[j + i * (v->cols())] );
     101    PrintLn ();
     102  }
     103  PrintS ("}\n");
     104#endif
     105
     106}
     107
     108                   
     109
    88110static BOOLEAN DetailedPrint(leftv __res, leftv h)
    89111{
     
    150172
    151173#define PRINT_pINTVECTOR(s, v) Print("intvec '%10s'(%p)", #v, (s)->v); \
    152 if( (s)->v != NULL ){ PrintS(": "); (s)->v->view(); }; \
     174if( (s)->v != NULL ){ PrintS(": "); view((s)->v); }; \
    153175PrintLn();
    154176
  • dyn_modules/syzextra/syzextra.tst

    r79fa83 r19764c6  
    11echo = 2;
    22
    3 LIB("./syzextra.so");
     3"ndebug?: ", system("with", "ndebug");
     4"om_ndebug?: ", system("with", "om_ndebug");
     5
     6if( system("with", "ndebug") )
     7{
     8  "Loading the Release version!";
     9  LIB("./syzextra.so");
     10}
     11else
     12{
     13  "Loading the Debug version!";
     14  LIB("./syzextra.sog");
     15}
    416
    517noop();
Note: See TracChangeset for help on using the changeset viewer.