Jelajahi Sumber

Allow to build 3rd party components with warnings - set to true automatically if 3rd party componets are used

bel 9 tahun lalu
induk
melakukan
b97fbb6948
1 mengubah file dengan 6 tambahan dan 2 penghapusan
  1. 6 2
      CMakeLists.txt

+ 6 - 2
CMakeLists.txt

@@ -89,8 +89,12 @@ option(CIVETWEB_ENABLE_LUA "Enable Lua CGIs" OFF)
 message(STATUS "Lua CGI support - ${CIVETWEB_ENABLE_LUA}")
 
 # Allow builds to complete with warnings (do not set -Werror)
-option(CIVETWEB_ALLOW_WARNINGS "Do not stop build if there are warnings" OFF)
-message(STATUS "Build if there are warnings - ${CIVETWEB_ALLOW_WARNINGS}")
+#option(CIVETWEB_ALLOW_WARNINGS "Do not stop build if there are warnings" OFF)
+#message(STATUS "Build if there are warnings - ${CIVETWEB_ALLOW_WARNINGS}")
+# ... this option is not set by the user, but it is set if there are 3rd party components
+if (CIVETWEB_ENABLE_LUA OR CIVETWEB_ENABLE_DUKTAPE)
+SET(CIVETWEB_ALLOW_WARNINGS YES)
+endif()
 
 
 # Link to the shared LUA library