From 34026eb857a4923a85ecea4b51ee72ee21118a7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20J=C3=BCrges?= <jurges@astron.nl>
Date: Thu, 23 Aug 2018 09:28:49 +0000
Subject: [PATCH] Task SW-417:  Without the REQUIRED keyword find_python_module
 does not fail

When find_python_module is used in one of our Cmake files and the Python module
that is listed there is missing on the build system the cmake process does not
fail.  Instead it prints out this funny message:

-- Could NOT find PYTHON_INOTIFY (missing:  PYTHON_INOTIFY)
CMake Warning at CMake/FindPythonModule.cmake:102 (message):
  Removed REQUIRED option while looking for python module 'inotify' because
  BUILD_DOCUMENTATION=OFF.  This allows cmake to continue configuring so you
  could make the doc, but building the code might not be possible.
Call Stack (most recent call first):
  LCU/Maintenance/MDB_tools/CMakeLists.txt:13 (find_python_module)

In my opinion this should rathet fail unless(!) BUILD_DOCUMENTATION=ON.
---
 LCU/Maintenance/MDB_tools/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/LCU/Maintenance/MDB_tools/CMakeLists.txt b/LCU/Maintenance/MDB_tools/CMakeLists.txt
index 9de50a6d206..b1aa8abe3dc 100644
--- a/LCU/Maintenance/MDB_tools/CMakeLists.txt
+++ b/LCU/Maintenance/MDB_tools/CMakeLists.txt
@@ -8,9 +8,9 @@ include(PythonInstall)
 include(FindPythonModule)
 
 #Required packages
-find_python_module(beautifultable)
-find_python_module(blessings)
-find_python_module(watchdog)
+find_python_module(beautifultable REQUIRED)
+find_python_module(blessings REQUIRED)
+find_python_module(inotify REQUIRED)
 
 set(_py_files
   cli/__init__.py
-- 
GitLab