From ed74b97b94da4510e95e70b627c5534e27541875 Mon Sep 17 00:00:00 2001 From: Mohcine Chraibi <m.chraibi@fz-juelich.de> Date: Tue, 18 Sep 2018 19:02:22 +0200 Subject: [PATCH] Add definitions for interpreter and its version even for python2. Still output warning for this case --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b6c170c..3501edcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -322,6 +322,8 @@ if((PYTHONINTERP_FOUND) AND (${PYTHON_VERSION_MAJOR} EQUAL 3)) add_definitions("-DPYTHON_VERSION=\"${PYTHON_VERSION_STRING}\"") else() message (WARNING "Could not find python 3x") + add_definitions("-DPYTHON=\"${PYTHON_EXECUTABLE}\"") + add_definitions("-DPYTHON_VERSION=\"${PYTHON_VERSION_STRING}\"") endif() # ----------------------------- cTest ------------------------------------------ -- GitLab