Passing --user instead of --prefix to setup.py gives inconsistent UseUFC.cmake file

Issue #81 resolved
Damon McDougall created an issue

I installed ffc with this command:

python setup.py install --user

Doing this produced the following ~/.local/share/ufc/UFCConfig.cmake file:

# CMake configuration for UFC (http://fenicsproject.org/)
#
# This file has been generated automatically by the FFC/UFC installation.

# FIXME: Check that naming conforms to CMake standards

# Package found
set(UFC_FOUND TRUE)

# Include directories
set(UFC_INCLUDE_DIRS "/usr/local/include")

# Compiler flags
set(UFC_CXX_FLAGS "-std=c++0x")

# Python include directories
set(UFC_PYTHON_INCLUDE_DIRS "/opt/apps/intel15/python/2.7.9/include/python2.7")

# Python libraries
set(UFC_PYTHON_LIBRARIES "/opt/apps/intel15/python/2.7.9/lib/libpython2.7.so")

# Python executable
set(UFC_PYTHON_EXECUTABLE "/opt/apps/intel15/python/2.7.9/bin/python")

# SWIG executable
set(UFC_SWIG_EXECUTABLE "/home1/apps/swig/3.0.5/bin/swig")

# Version
set(UFC_VERSION_STRING "1.5.0")

# The location of the UseUFC.cmake file
set(UFC_USE_FILE "/usr/local/share/ufc/UseUFC.cmake")

Note that UFC_USE_FILE and UFC_INCLUDE_DIRS aren't set to the correct values. The culprit is the get_installation_prefix function, which relies on passing --prefix.

The result of this bug is that JIT compiles will fail to find the right cmake makefile at runtime.

Comments (3)

  1. Log in to comment