]> The Tcpdump Group git mirrors - tcpdump/commitdiff
CMake: improve the comment before project(tcpdump C). [skip ci]
authorGuy Harris <[email protected]>
Wed, 15 Feb 2023 23:10:35 +0000 (15:10 -0800)
committerGuy Harris <[email protected]>
Wed, 15 Feb 2023 23:10:35 +0000 (15:10 -0800)
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

index f904e76b025af4c2ba6e7f183615c0a365e41646..52c039f2bfb561cdd47f0a497e564ca2b4142db8 100644 (file)
@@ -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)
 
 #