https://bz.apache.org/bugzilla/show_bug.cgi?id=63672

            Bug ID: 63672
           Summary: mod_md breaks CMake build when dependencies like CURL
                    or JANSSON missing (with patch)
           Product: Apache httpd-2
           Version: 2.4.41
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Build
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

The latest mod_md patch (r1862791) added a few extra dependencies for mod_md.

This breaks a CMake build if one of the new dependencies is missing, due to an
error in the checking for optionals.

${${mod_requires}} now contains a list of values, but the CMake code assumes a
single value, so it fails with a syntax error in IF.

--- CMakeLists.txt      2019-08-19 14:54:01.857833900 +0200
+++ CMakeLists.txt      2019-07-09 10:40:17.000000000 +0200
@@ -765,11 +765,11 @@
   ENDIF()

   IF(NOT ${enable_mod_val} STREQUAL "O") # build of module is desired
     SET(mod_requires "${mod_name}_requires")
     STRING(TOUPPER ${enable_mod_val} enable_mod_val_upper)
-    IF(NOT ${${mod_requires}} STREQUAL "") # module has some prerequisite
+    IF(NOT "${${mod_requires}}" STREQUAL "") # module has some prerequisite
-      IF(NOT ${${mod_requires}}) # prerequisite doesn't exist
+      IF(NOT "${${mod_requires}}") # prerequisite doesn't exist
         IF(NOT ${enable_mod_val} STREQUAL ${enable_mod_val_upper}) # lower
case, so optional based on prereq
           MESSAGE(STATUS "${mod_name} was requested but couldn't be built due
to a missing prerequisite (${${mod_requires}})")
           SET(enable_mod_val_upper "O") # skip due to missing prerequisite
         ELSE() # must be upper case "A" or "I" (or coding error above)


Some other choices in the patch are a bit odd as well, e.g. not using the
existing FindCurl CMake script
(https://cmake.org/cmake/help/latest/module/FindCURL.html) and instead rolling
your own or not defining JANSSON_FOUND at all.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to