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
Fixed build for mingw. #2607
Fixed build for mingw. #2607
Conversation
Tested on win7x64 with msys2, mingw-w64, gcc 6.3.0, cmake 1.8. CMake was called with the following parameters: cmake -G "MSYS Makefiles" -DHPX_WITH_TESTS_EXTERNAL_BUILD=Off -DHPX_WITH_MALLOC=jemalloc -DCMAKE_INSTALL_PREFIX:PATH=/c/msys64/mingw64 ..
@@ -1064,7 +1064,7 @@ namespace hpx { namespace threads | |||
|
|||
{ | |||
std::unique_lock<hpx::util::spinlock> lk(topo_mtx); | |||
if (hwloc_get_thread_cpubind(topo, handle.native_handle(), cpuset, | |||
if (hwloc_get_thread_cpubind(topo, (HANDLE)(handle.native_handle()), cpuset, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C-casts should be avoided in C++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moreover, HANDLE
is a Windows-only type, so this will break on other platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
The inspection error was: hwloc_topology_info.cpp: *Line length limit*: 1068, *Tabs*1071
Tested on win7x64 with msys2, mingw-w64, gcc 6.3.0, cmake 1.8.
CMake was called with the following parameters: