Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaking build system to support Windows #122

Merged
merged 1 commit into from
May 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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