aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-02-15 15:10:35 -0800
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2023-10-11 21:46:20 +0200
commit7146ef7abf332eb143ce4fb309a429cdec1c927b (patch)
tree42448a5178e9dc16821dedc75ae85059c70711ab /CMakeLists.txt
parent698bb2f2a162b994627526ce6b8d8db99a3ebcc8 (diff)
downloadtcpdump-7146ef7abf332eb143ce4fb309a429cdec1c927b.tar.gz
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. (cherry picked from commit 31762a4eb365011bb1862be817040d3f9ca72e64) [skip ci]
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c747462..9c542266 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,7 +85,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
@@ -111,9 +117,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)
#