<div dir="ltr">I searched but couldn't find a previous discussion on this.  VTK redefines the standard CMake macro CHECK_CXX_SOURCE_RUNS with an inconsistent argument list.  If a project includes UseVTK.cmake, then VTK's version of the macro can be injected into the project.<br>

<br><br><div>VTK has the file CMake/CheckCXXSourceRuns.cmake which defines the macro:<br><div><br>MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR COMMENT)<br><br><br>CMake ships with the same module, but the macro is defined as:<br>

<br>macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR)<br><br><br></div><div>If a project includes UseVTK.cmake, then CMAKE_MODULE_PATH is appended to include the directory with VTK's version of CheckCXXSourceRuns.cmake.<br><br>

<br></div><div>So if you have this code in your project:<br><br></div><div>include(CheckCXXSourceRuns)<br></div><div>check_cxx_source_runs(${src} RESULT)<br></div><div><br></div><div>Then you may have an error, depending on whether or not you have included UseVTK.cmake.  The error message won't tell you where the macro was defined, only that you called it with the wrong number of arguments:<br>

<br>  CHECK_CXX_SOURCE_RUNS Macro invoked with incorrect arguments for macro<br>  named: CHECK_CXX_SOURCE_RUNS<br><br><br>Pat<br></div></div></div>