Browse Source

Update ExternalProjectDependency based on commontk/Artichoke@388fc33

Tweak test in ExternalProject_Message to avoid warning related to CMP0054

This commit will avoid warning like this one:

//--------------------
CMake Warning (dev) at CMake/ctkMacroCheckExternalProjectDependency.cmake:345 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "SB_SECOND_PASS" will no longer be dereferenced when
  the policy is set to NEW.  Since the policy is not set the OLD behavior
  will be used.
Call Stack (most recent call first):
  CMake/ctkMacroCheckExternalProjectDependency.cmake:596 (ExternalProject_Message)
  CMakeExternals/Log4Qt.cmake:9 (ExternalProject_Include_Dependencies)
  CMake/ctkMacroCheckExternalProjectDependency.cmake:568 (include)
  CMake/ctkMacroCheckExternalProjectDependency.cmake:614 (ExternalProject_Include_Dependencies)
  CMake/ctkBlockCheckDependencies.cmake:132 (ExternalProject_Include_Dependencies)
  CMakeLists.txt:970 (include)
//--------------------
Jean-Christophe Fillion-Robin 10 years ago
parent
commit
ca2dd7136d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      CMake/ctkMacroCheckExternalProjectDependency.cmake

+ 1 - 1
CMake/ctkMacroCheckExternalProjectDependency.cmake

@@ -342,7 +342,7 @@ endfunction()
 #!
 function(ExternalProject_Message proj msg)
   set(_display 1)
-  if("${ARGV2}" MATCHES ".+")
+  if(NOT "x${ARGV2}" STREQUAL "x")
     set(_display ${ARGN})
   endif()
   if(${_display})