#include <pthread.h>
#include <execinfo.h>
+#define BUILD_EXE ${exe}
+
typedef void (*sighandler_t)(int);
sighandler_t setsig(int sig, sighandler_t handler)
{
if(getenv ("DEBUGGER"))
{
std::stringstream exec;
-#if ${exe}
+#if BUILD_EXE
exec << "$$DEBUGGER " << "${exe_path} " << getpid() << "&";
#else
exec << "$$DEBUGGER SALOME_Container " << getpid() << "&";
const char *interfaceName)
: Superv_Component_i(orb, poa, contId, instanceName, interfaceName)
{
-#if ${exe}
+#if BUILD_EXE
setsig(SIGSEGV,&THandler);
set_terminate(&terminateHandler);
set_unexpected(&unexpectedHandler);
const char *interfaceName)
: Superv_Component_i(orb, poa, container, instanceName, interfaceName)
{
-#if ${exe}
+#if BUILD_EXE
setsig(SIGSEGV,&THandler);
set_terminate(&terminateHandler);
set_unexpected(&unexpectedHandler);
void ${component}_i::destroy()
{
-#if ${exe}
+#if BUILD_EXE
_remove_ref();
if(!CORBA::is_nil(_orb))
_orb->shutdown(0);
catch (...)
{
std::cerr << "unknown exception" << std::endl;
-#if ${exe}
+#if BUILD_EXE
_exit(-1);
#endif
//cp_fin(component,CP_ARRET);
(cmake_text, cmake_vars) = self.additionalLibraries()
cxxfile = "%s.cxx" % self.name
hxxfile = "%s.hxx" % self.name
- ret = { cxxfile:self.makecxx(gen),
+ if self.kind == "exe":
+ exe_opt = 1
+ else:
+ exe_opt = 0
+ ret = { cxxfile:self.makecxx(gen, exe_opt),
hxxfile:self.makehxx(gen)
}
sources = " ".join(map(os.path.basename,self.sources))
ret["CMakeLists.txt"] = cmakelist_content
return ret
-
def makehxx(self, gen):
"""return a string that is the content of .hxx file