]> 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]>
Tue, 10 Dec 2024 18:47:32 +0000 (10:47 -0800)
commit7fe2a0ec262c2c1e7db829b4e13b70c64b0f1da9
treef851191dc57878abb4c8ed0f277964febe8bb507
parentb170946478cdfd48aa075149c20afdb9d89fd6f1
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.
CMakeLists.txt