Skip to content

Commit

Permalink
Merge pull request #122 from STEllAR-GROUP/fixing_windows_support
Browse files Browse the repository at this point in the history
Tweaking build system to support Windows
  • Loading branch information
khuck authored May 22, 2020
2 parents 12d5cb5 + 76a46e8 commit 60fe191
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/apex/CMakeLists.hpx
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,12 @@ foreach(lib IN LISTS _apex_imported_targets)
endforeach()

# Link to dl
if (APEX_USE_WEAK_SYMBOLS)
if (APEX_USE_WEAK_SYMBOLS OR MSVC)
target_compile_definitions(apex_flags INTERFACE APEX_USE_WEAK_SYMBOLS)
else()
find_library(DYNAMICLIB dl)
target_link_libraries(apex PRIVATE ${DYNAMICLIB})
endif (APEX_USE_WEAK_SYMBOLS)
endif (APEX_USE_WEAK_SYMBOLS OR MSVC)

# TODO: see how to remove those global include directories
# add the binary tree to the search path for include files
Expand Down
6 changes: 5 additions & 1 deletion src/apex/apex_export.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
#define APEX_EXPORT_H

#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
#if defined(HPX_LIBRARY_EXPORTS)
#define APEX_EXPORT __declspec(dllexport)
#define APEX_WEAK_PRE __declspec(selectany)
#else
#define APEX_EXPORT __declspec(dllimport)
#endif
#define APEX_WEAK_PRE
#define APEX_WEAK_POST
#else

Expand Down
3 changes: 2 additions & 1 deletion src/apex/profiler_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <unistd.h>
#include <sched.h>
#endif
#include <chrono>
#include <cstdio>
#include <vector>
#include <string>
Expand Down Expand Up @@ -621,7 +622,7 @@ std::unordered_set<profile*> free_profiles;
queue_signal.post();
#endif
// wait for profiles to update
usleep(100);
std::this_thread::sleep_for(std::chrono::microseconds(100));
total_time = get_profile(main_id);
}
double wall_clock_main = total_time->get_accumulated() *
Expand Down

0 comments on commit 60fe191

Please sign in to comment.