Skip to content

Commit

Permalink
contrib/windows: update README
Browse files Browse the repository at this point in the history
Move idea of hwloc-ps to a github issue.
Update some comments, add details for command-line build.

Thanks to Eloi Gaudry for the suggestion.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
(cherry picked from commit a0d8a72)
  • Loading branch information
bgoglin committed Sep 25, 2019
1 parent 7ad04eb commit f1a2e22
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions contrib/windows/README
@@ -1,33 +1,19 @@
This Visual Studio support is experimental.
Thanks to Eloi Gaudry for contributing the first draft of files.
Thanks to Eloi Gaudry for contributing most of these files.

This may be directly open in VS, or built from the command-line with:
%MSBUILD_PATH%\MSBuild hwloc.sln /p:Configuration=Release /p:Platform=x64

No PlatformToolset is specified, so that the default target is always
used during build.
That means your build may not be compatible with older systems.
Enforce a specific toolset before building if needed.
If the specified platform toolset is too recent for your VS installation:
"The builds tools for v142 (Platform Toolset = 'v142') cannot be found."
You may force the build using your old one by adding
/p:PlatformToolset=v110

See contrib/ci.inria.fr/job-1-visualstudio.bat for an example.

hwloc-compress-dir not built because needs work.

hwloc-compress-dir not built because it needs work.

hwloc-gather-topology is Linux specific.

hwloc-ps is not built because it does nothing on Windows anyway.
Possible code proposed by Eloi Gaudry:
// Get the process list snapshot
HANDLE hProcessSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0);
// Initialize the process entry structure
PROCESSENTRY32 ProcessEntry = { 0 } ;
ProcessEntry.dwSize = sizeof(ProcessEntry);
// Get the first process info
if (Process32First( hProcessSnapShot, &ProcessEntry)) {
do {
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, ProcessEntry.th32ProcessID) ;
if (hProcess) {
std::cerr << ProcessEntry.th32ProcessID << "(" << ProcessEntry.szExeFile << ")" << std::endl ;
}
// check the PROCESSENTRY32 for other members.
} while (Process32Next(hProcessSnapShot, &ProcessEntry));
// Close the handle
CloseHandle( hProcessSnapShot ) ;
}
hwloc-ps is not built because it does nothing on Windows anyway (see #367).

0 comments on commit f1a2e22

Please sign in to comment.