Skip to content

Commit 0273c8c

Browse files
bgoglinndenoyelle
authored andcommitted
contrib/windows: update README
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 <[email protected]>
1 parent 06fe0f7 commit 0273c8c

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

contrib/windows/README

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,19 @@
11
This Visual Studio support is experimental.
2-
Thanks to Eloi Gaudry for contributing the first draft of files.
2+
Thanks to Eloi Gaudry for contributing most of these files.
33

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

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

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

11-
hwloc-compress-dir not built because needs work.
14+
15+
hwloc-compress-dir not built because it needs work.
1216

1317
hwloc-gather-topology is Linux specific.
1418

15-
hwloc-ps is not built because it does nothing on Windows anyway.
16-
Possible code proposed by Eloi Gaudry:
17-
// Get the process list snapshot
18-
HANDLE hProcessSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0);
19-
// Initialize the process entry structure
20-
PROCESSENTRY32 ProcessEntry = { 0 } ;
21-
ProcessEntry.dwSize = sizeof(ProcessEntry);
22-
// Get the first process info
23-
if (Process32First( hProcessSnapShot, &ProcessEntry)) {
24-
do {
25-
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, ProcessEntry.th32ProcessID) ;
26-
if (hProcess) {
27-
std::cerr << ProcessEntry.th32ProcessID << "(" << ProcessEntry.szExeFile << ")" << std::endl ;
28-
}
29-
// check the PROCESSENTRY32 for other members.
30-
} while (Process32Next(hProcessSnapShot, &ProcessEntry));
31-
// Close the handle
32-
CloseHandle( hProcessSnapShot ) ;
33-
}
19+
hwloc-ps is not built because it does nothing on Windows anyway (see #367).

0 commit comments

Comments
 (0)