Skip to content

Update CMakeLists.txt#226

Open
JaredDiCioccio wants to merge 1 commit intomasterfrom
225-top-level-cmake-build-doesnt-forward-python_executable-python_library-python_include_dir-to-gravity_external
Open

Update CMakeLists.txt#226
JaredDiCioccio wants to merge 1 commit intomasterfrom
225-top-level-cmake-build-doesnt-forward-python_executable-python_library-python_include_dir-to-gravity_external

Conversation

@JaredDiCioccio
Copy link
Contributor

Pass Python_EXECUTABLE/LIBRARY/INCLUDE_DIR from command line switches to gravity_external project. This will properly allow you to specify environment specific settings if necessary.

If nothing is provided, will pass along the Python_EXECUTABLE found by the FindPython macro and be business as usual.

Pass Python_EXECUTABLE/LIBRARY/INCLUDE_DIR from command line switches to gravity_external project.  This will properly allow you to specify environment specific settings if necessary.

If nothing is provided, will pass along the Python_EXECUTABLE found by the FindPython macro and be business as usual.
@mbarger99
Copy link
Contributor

@JaredDiCioccio, I finally had some time to play with this. Using the latest master, I just tried specifying an alternate python3 using the three -D properties you reference here, and was able to link against my alternate python3. Maybe other recent cmake updates are propagating those properties to the external build (doesn't look like it to me)? Or maybe I'm not testing this correctly.

I have python3.8 installed on my VM, and then ran with this command:

cmake -DPython_EXECUTABLE=/media/drive2/python3.9/bin/python3 -DPython_LIBRARY=/media/drive2/python3.9/lib/libpython3.9.so -DPython_INCLUDE_DIR=/media/drive2/python3.9/include/python3.9 -DGRAVITY_USE_EXTERNAL_SPDLOG=ON -DGRAVITY_USE_EXTERNAL_ZEROMQ=ON -DGRAVITY_USE_EXTERNAL_PROTOBUF=ON -DCMAKE_INSTALL_PREFIX=/home/mbarger/gravity/install ..

I'm seeing the gravity python lib (_gravity.so) links against this version 3.9 lib. Does that cover what you were fixing here? If so, I think we can close this as OBE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

top level cmake build doesn't forward Python_EXECUTABLE, Python_LIBRARY, Python_INCLUDE_DIR to gravity_external

2 participants