]> The Tcpdump Group git mirrors - tcpdump/commit
CMake: check whether check_c_source_runs() works.
authorGuy Harris <[email protected]>
Tue, 10 Dec 2024 04:35:24 +0000 (20:35 -0800)
committerGuy Harris <[email protected]>
Mon, 16 Dec 2024 02:21:47 +0000 (18:21 -0800)
commitd8e66754be72d3b6491dfd4386cc933b2af7a29c
tree86a4b15612aa8b73d73dc1b911535288e6c2258f
parent296d466cd6bbf2f7e75e15bb6a01268e88c76ed0
CMake: check whether check_c_source_runs() works.

That's the simplest way to check whether we can use
check_c_source_runs() to test for a suitable snprintf; it's easier than
trying to find out the target instruction set architecture and comparing
it with the host instruction set architecture, as CMake doesn't provide
any mechanism to provide the target instruction set architecture, on all
platforms, in a form that can be compared with the host instruction set
architecture, and even if the target is different, we may be able to run
code for that instruction set architecture if, for example, it's a
32-bit version of the instruction set architecture on which the build is
being done, or if there's a binary emulator.

(cherry picked from commit 7fe2a0ec262c2c1e7db829b4e13b70c64b0f1da9)
CMakeLists.txt