Changeset 19714


Ignore:
Timestamp:
11/12/15 18:49:52 (9 years ago)
Author:
Eric.Larour
Message:

CHG: found a way to avoid repeat of global.h inclusion only for javascript wrappers.

Location:
issm/trunk-jpl/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/main/globals.h

    r15839 r19714  
    55#ifndef _GLOBALS_H_
    66#define _GLOBALS_H_
    7 
    87#include "../shared/io/Comm/IssmComm.h"
    98#include "../toolkits/ToolkitOptions.h"
    109
    1110/*Communicators: */
     11#ifndef _DO_NOT_LOAD_GLOBALS_
    1212ISSM_MPI_Comm IssmComm::comm;
    1313bool IssmComm::parallel;
     
    1717 * often used when Petsc is not allowed*/
    1818char* ToolkitOptions::toolkitoptions;
     19#endif
    1920
    2021#endif
  • issm/trunk-jpl/src/wrappers/TriMesh/TriMesh.h

    r19711 r19714  
    1515#ifdef _HAVE_PYTHON_
    1616#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
     17#endif
     18
     19#ifdef _HAVE_JAVASCRIPT_MODULES_
     20#undef _DO_NOT_LOAD_GLOBALS_
    1721#endif
    1822
     
    6670#define SEGMENTS          psegments,pnsegs
    6771#define SEGMENTMARKERLIST psegmentmarkers,pnsegs
     72#define _DO_NOT_LOAD_GLOBALS_//we only load globals for TriMeshModule.js, not other modules!
    6873#endif
    6974
  • issm/trunk-jpl/src/wrappers/javascript/Makefile.am

    r19711 r19714  
    7474IssmModule_SOURCES = ../TriMesh/TriMesh.cpp \
    7575                                         ../NodeConnectivity/NodeConnectivity.cpp
    76 IssmModule_CXXFLAGS= -fPIC --memory-init-file 0 $(AM_CXXFLAGS) $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) -s EXPORTED_FUNCTIONS="['_TriMeshModule','_NodeConnectivityModule']"  -s DISABLE_EXCEPTION_CATCHING=0
     76IssmModule_CXXFLAGS= -fPIC -D_DO_NOT_LOAD_GLOBALS_ --memory-init-file 0 $(AM_CXXFLAGS) $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) -s EXPORTED_FUNCTIONS="['_TriMeshModule','_NodeConnectivityModule']"  -s DISABLE_EXCEPTION_CATCHING=0
    7777IssmModule_LDADD = ${deps} $(TRIANGLELIB)
    7878#}}}
Note: See TracChangeset for help on using the changeset viewer.