diff options
author | Bradley M. Kuhn <bkuhn@ebb.org> | 2012-09-06 16:12:31 -0400 |
---|---|---|
committer | Bradley M. Kuhn <bkuhn@ebb.org> | 2012-09-06 16:12:31 -0400 |
commit | 72fa58b7fb3c70444481519b53267d8ef1e01cca (patch) | |
tree | 9c17196a18ec6c98c8ced8eab2a161c65570ad2a /CMakeLists.txt | |
parent | 608d27a7743a0cf3431808dd144b855b2a99d075 (diff) | |
download | fork-ledger-72fa58b7fb3c70444481519b53267d8ef1e01cca.tar.gz fork-ledger-72fa58b7fb3c70444481519b53267d8ef1e01cca.tar.bz2 fork-ledger-72fa58b7fb3c70444481519b53267d8ef1e01cca.zip |
Ledger's Python API is known to work best against Python 2.7, then Python 2.6
Indeed, at the moment, it doesn't work against Python 3.x at all, so
ideally, we'd like to tell CMake that no Python versions except 2.7 and
2.6 are acceptable. However, at least as of CMake 2.8.8, there appears to
be no way to instruct CMake to never consider other versions of Python.
In other words, Python_ADDITIONAL_VERSIONS is prepended to the list of
possible Python versions considered, rather than replacing it wholly.
Theoretically, we could try to diddle withe the internal CMake variables
_PYTHON_FIND_OTHER_VERSIONS or _Python_VERSIONS somehow, but that seems
kludgey and dangerous. This patch is probably "enough for now" to at
least make sure that if the user has both Python 2.x and Python 3.x
installed, some version of 2.x that is known to work will be preferred.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 487fe429..a4109a17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,7 @@ endif() find_package(PythonInterp) # Used for running tests if(USE_PYTHON) + set(Python_ADDITIONAL_VERSIONS 2.7 2.6) find_package(PythonLibs) if(PYTHONLIBS_FOUND) set(BOOST_PYTHON python) |