Skip to content

Commit

Permalink
Fixing HPX build due to static global constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Mar 10, 2021
1 parent 3f32834 commit e905352
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
11 changes: 9 additions & 2 deletions src/apex/apex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,18 @@
#include <hpx/include/actions.hpp>
#include <hpx/include/util.hpp>
#include <hpx/lcos_local/composable_guard.hpp>
#else // APEX_HAVE_HPX
/* When running with apex_exec, we want to initialize APEX on library load */
#include "global_constructor_destructor.h"
#else
#include "global_constructor_destructor.h"
#ifdef HAS_CONSTRUCTORS
extern "C" {
DEFINE_CONSTRUCTOR(apex_init_static_void)
DEFINE_DESTRUCTOR(apex_finalize_static_void)
}
#endif
#endif // APEX_HAVE_HPX


#if APEX_DEBUG
#define FUNCTION_ENTER printf("enter %lu *** %s:%d!\n", \
thread_instance::get_id(), __func__, __LINE__); fflush(stdout);
Expand Down
7 changes: 0 additions & 7 deletions src/apex/global_constructor_destructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,3 @@
#warning "Global constructors and destructors not defined!"
#endif

#ifdef HAS_CONSTRUCTORS
extern "C" {
DEFINE_CONSTRUCTOR(apex_init_static_void)
DEFINE_DESTRUCTOR(apex_finalize_static_void)
}
#endif

0 comments on commit e905352

Please sign in to comment.