GerHobbelt / pthread-win32

clone of pthread-win32 (a.k.a. pthreads4w) + local tweaks (including MSVC2008 - MSVC2022 project files)
Other
343 stars 165 forks source link

Improved Target Architecture Detection #26

Open hacksysteam opened 3 months ago

hacksysteam commented 3 months ago

This pull request proposes an improvement to the get_target_arch function in pthread-win32 to enhance compatibility across different platforms, including Linux. The new implementation replaces the use of try_run with direct processor detection using CMake variables and uname for Unix-like systems. This approach avoids potential compilation issues on non-Windows platforms.