NiftyPET / NIPET

High-throughput PET image reconstruction with high quantitative accuracy and precision
Apache License 2.0
29 stars 8 forks source link

using via CMake failed (doc incomplete?) #50

Closed KrisThielemans closed 11 months ago

KrisThielemans commented 11 months ago

I installed nipet from PyPy and used

    find_package(NiftyPETnipet REQUIRED COMPONENTS mmr_auxe mmr_lmproc petprj CONFIG)

and get

CMake Warning (dev) at my-env/lib/python3.10/site-packages/niftypet/nipet/cmake/NiftyPETnipetConfig.cmake:30 (if):
  Policy CMP0057 is not set: Support new IN_LIST if() operator.  Run "cmake
  --help-policy CMP0057" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  IN_LIST will be interpreted as an operator 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):
  CMakeLists.txt:186 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at my-env/lib/python3.10/site-packages/niftypet/nipet/cmake/NiftyPETnipetConfig.cmake:30 (if):
  if given arguments:
    "NOT" "_comp" "IN_LIST" "_supported_components"
  Unknown arguments specified

I had the same error when just using

find_package(NiftyPETnipet REQUIRED COMPONENTS mmr_auxe mmr_lmproc petprj)
KrisThielemans commented 11 months ago

oops. that policy will be set when requiring CMake 3.3, as correctly stated. Sorry