Skip to content

Commit

Permalink
[cmake] Be sure to set cache variables in Cpp2PyConfig.cmake.in
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed May 26, 2020
1 parent 00acaa0 commit 9a6e011
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions cmake/Cpp2PyConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@ if(NOT CPP2PY_FOUND)
set(CPP2PY_FOUND True)

# Version
set(CPP2PY_VERSION @CPP2PY_VERSION@)
set(CPP2PY_GIT_HASH @CPP2PY_GIT_HASH@)
set(CPP2PY_VERSION @CPP2PY_VERSION@ CACHE STRING "Cpp2Py Version")
set(CPP2PY_GIT_HASH @CPP2PY_GIT_HASH@ CACHE STRING "Cpp2Py Git Hash")

# The compiler used for cpp2py
set(CPP2PY_CXX_COMPILER @CMAKE_CXX_COMPILER@)
set(CPP2PY_CXX_COMPILER @CMAKE_CXX_COMPILER@ CACHE FILEPATH "C++ compiler used by Cpp2Py")

# Python Interpreter
set(CPP2PY_PYTHON_EXECUTABLE @PYTHON_EXECUTABLE@)
set(CPP2PY_PYTHON_INTERPRETER @PYTHON_EXECUTABLE@) # Backward Compat
set(CPP2PY_PYTHON_LIB_DEST_ROOT @PYTHON_LIB_DEST_ROOT@)
set(CPP2PY_PYTHON_H5PY_HDF5VERSION @PYTHON_H5PY_HDF5VERSION@)
set(CPP2PY_PYTHON_NUMPY_VERSION_LT_17 @PYTHON_NUMPY_VERSION_LT_17@)
set(CPP2PY_PYTHON_EXECUTABLE @PYTHON_EXECUTABLE@ CACHE FILEPATH "Python Executable")
set(CPP2PY_PYTHON_INTERPRETER @PYTHON_EXECUTABLE@ CACHE FILEPATH "Python Executable") # Backward Compat
set(CPP2PY_PYTHON_LIB_DEST_ROOT @PYTHON_LIB_DEST_ROOT@ CACHE PATH "Python module directory")
set(CPP2PY_PYTHON_NUMPY_VERSION_LT_17 @PYTHON_NUMPY_VERSION_LT_17@ CACHE BOOL "True if the Numpy version older than 1.17")

# Root of the Cpp2Py installation
set(CPP2PY_ROOT @CMAKE_INSTALL_PREFIX@)
set(CPP2PY_ROOT @CMAKE_INSTALL_PREFIX@ CACHE PATH "Root of Cpp2Py")

MESSAGE(STATUS "Found Cpp2pyConfig.cmake with version ${CPP2PY_VERSION}, hash = ${CPP2PY_GIT_HASH}")

Expand Down

0 comments on commit 9a6e011

Please sign in to comment.