]> SALOME platform Git repositories - tools/configuration.git/blobdiff - cmake/SalomeMacros.cmake
Salome HOME
bos #18711 Adapt NETGEN detection procedure for version 6x (keep compatibility with...
[tools/configuration.git] / cmake / SalomeMacros.cmake
index ad57253a09e221f479db0e5a5da0b486273f0d28..e67a6d9122105a62b25968984d980f06d503af9e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -27,7 +27,9 @@ IF(WIN32)
   CMAKE_POLICY(SET CMP0020 OLD) # Disable automatic linking to qtmain.lib
 ENDIF(WIN32)
 CMAKE_POLICY(SET CMP0053 NEW)   # For correct Qt 5 detection procedure
-CMAKE_POLICY(SET CMP0074 NEW)   # Use ROOT variables when detecting packages
+IF(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12)
+  CMAKE_POLICY(SET CMP0074 NEW) # Use ROOT variables when detecting packages
+ENDIF()
 
 #----------------------------------------------------------------------------
 # LIST_CONTAINS is a macro useful for determining whether a list has a 
@@ -331,11 +333,11 @@ MACRO(SALOME_PACKAGE_REPORT_AND_CHECK)
   ELSE()
     SET(_length 23)
   ENDIF()
-  MESSAGE(STATUS "") 
-  MESSAGE(STATUS "  Optional packages - Detection report ")
-  MESSAGE(STATUS "  ==================================== ")
-  MESSAGE(STATUS "")
   IF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
+    MESSAGE(STATUS "") 
+    MESSAGE(STATUS "  Optional packages - Detection report ")
+    MESSAGE(STATUS "  ==================================== ")
+    MESSAGE(STATUS "")
     LIST(LENGTH _SALOME_OPTIONAL_PACKAGES_names _list_len)
     # Another CMake stupidity - FOREACH(... RANGE r) generates r+1 numbers ...
     MATH(EXPR _range "${_list_len}-1")
@@ -355,9 +357,9 @@ MACRO(SALOME_PACKAGE_REPORT_AND_CHECK)
     
       MESSAGE(STATUS "  * ${_pkg_name}  ->  ${_found_msg}${_flag_msg}")
     ENDFOREACH()
+    MESSAGE(STATUS "")
+    MESSAGE(STATUS "")
   ENDIF(DEFINED _SALOME_OPTIONAL_PACKAGES_names)
-  MESSAGE(STATUS "")
-  MESSAGE(STATUS "")
   
   # Failure if some packages were missing:
   IF(_will_fail)