diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/minc/avoid-try-run.diff | |
Diffstat (limited to 'vcpkg/ports/minc/avoid-try-run.diff')
| -rw-r--r-- | vcpkg/ports/minc/avoid-try-run.diff | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vcpkg/ports/minc/avoid-try-run.diff b/vcpkg/ports/minc/avoid-try-run.diff new file mode 100644 index 0000000..5353a6c --- /dev/null +++ b/vcpkg/ports/minc/avoid-try-run.diff @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dcd594b..a357b90 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -174,6 +174,12 @@ ELSE(HAVE_CLOCK_GETTIME_RT) + CHECK_SYMBOL_EXISTS(clock_gettime "time.h" HAVE_CLOCK_GETTIME_SYMBOL) + # then check that it's available + IF(HAVE_CLOCK_GETTIME_SYMBOL) ++ if(CMAKE_CROSSCOMPILING) ++ # Seed try_run results. Override in triplet if needed. ++ set(HAVE_CLOCK_GETTIME_RUN 0 CACHE STRING "") ++ set(CMAKE_TRY_COMPILE_TARGET_TYPE EXECUTABLE) ++ try_compile(HAVE_CLOCK_GETTIME_COMP SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/check_clock_gettime.c) ++ endif() + TRY_RUN(HAVE_CLOCK_GETTIME_RUN HAVE_CLOCK_GETTIME_COMP + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/check_clock_gettime.c |