From 31762a4eb365011bb1862be817040d3f9ca72e64 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 15 Feb 2023 15:10:35 -0800 Subject: CMake: improve the comment before project(tcpdump C). [skip ci] Note that, even if there weren't horrible consequences to either 1) having no C++ compiler, 2) setting an instruction set bit width in CFLAGS but not in CXXFLAGS, or 3) having C and C++ compilers with different default instruction set bit-widths, specifying that we're C-only avoids wasting time looking for a C++ compiler. --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f904e76b..52c039f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,7 +86,13 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) # -# OK, this is a royal pain. +# We explicitly indicate what languages are used in tcpdump to avoid +# checking for a C++ compiler. +# +# One reason to avoid that check is that there's no need to waste +# configuration time performing it. +# +# Another reason is that: # # CMake will try to determine the sizes of some data types, including # void *, early in the process of configuration; apparently, it's done @@ -112,9 +118,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) # building 32-bit, the size for C++ will win, and, again, hilarity # will ensue. # -# So we *explicitly* state that only C is used; there is currently no -# C++ code in tcpdump. -# project(tcpdump C) # -- cgit v1.2.1