KhronosGroup / KTX-Software

KTX (Khronos Texture) Library and Tools
Other
834 stars 222 forks source link

Change MSVC std::mutex workaround #923

Closed MarkCallow closed 2 weeks ago

MarkCallow commented 2 weeks ago

Instead of removing the older version of the vcruntime from the Temurin JVM installation in the GitHub Actions runner image, define _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR when compiling libktx and ${ASTCENC_LIB_TARGET}. This makes the code compatible with older VC runtimes removing the burden from users to ensure their JVM installation uses the latest VC runtime.

See https://github.com/actions/runner-images/issues/10055. For further background see https://github.com/actions/runner-images/issues/10004 and https://developercommunity.visualstudio.com/t/Access-violation-in-_Thrd_yield-after-up/10664660#T-N10669129-N10678728.

Includes 2 other minor changes:

  1. Move the compiler info dump in CMakeLists.txt to before first use of the compiler info and recode it to use cmake_print_variables.
  2. Disable dump of system and platform info in tests/loadtests/CMakeLists.txt.