UCL/GreatCMakeCookOff

FindNumpy doesn't set NUMPY_FOUND on success

fredRos opened this issue · 2 comments

I tried

find_package(Numpy)
if(NUMPY_FOUND)
  message("Found numpy")
else()
  message(FATAL_ERROR "Could not find numpy")
endif()

and from the output generated by FindNumpy.cmake I saw that it found numpy but NUMPY_FOUND is not set to true. So I went to

find_package(Numpy)
if(NUMPY_INCLUDE_DIRS)
  message("Found numpy")
else()
  message(FATAL_ERROR "Could not find numpy")
endif()

and that worked.

Is there perhaps another reason for you to consider numpy wasn't found? If so, the debug output doesn't allude to that.

You're quite right. Should work now. I think...

Thanks a lot, it works now