CMake Error at CMakeLists.txt:654 (add_executable): Target “manta” links to the item/home/yy/anaconda3 envs den2vel_ENV/lib/libpython3.7 Margaret spellings o “which has leading or trailing whitespace. This is now an error according to policy CMP0004. Environment: Ubuntu16.04 + Anaconda Cause: The object manta linked to has a bunch of empty strings. The link object can be seen from the cmake output as PYTHON_LIBRARIES. If you look at the definition of this object, you can see set(PYTHON_LIBRARIES ${PYTHON_LIBRARY}), so you can change this variable. Solution: set (PYTHON_LIBRARY “/ home/yy/anaconda3 / envs/lib/libpython3.7 Margaret spellings o”) # alternatively, set manually here instead: Set (PYTHON_LIBRARY “/ home/yy/anaconda3 envs den2vel_ENV/lib/libpython3.7 Margaret spellings o”) # alternatively, set manually here.