Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
1 changed file
with
11 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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). |