From: Martin Quinson Date: Thu, 27 Dec 2018 09:19:34 +0000 (+0100) Subject: Only test python bindings if they are enabled X-Git-Tag: v3_22~751 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/bfc156b417dd2ff7d9279bc7fc762975a27320bf?hp=4782c1fc73fedbcb8d81c45c588fcb48d9439658 Only test python bindings if they are enabled But still include their files in the archive in all cases --- diff --git a/examples/python/CMakeLists.txt b/examples/python/CMakeLists.txt index 311cc84875..01121601a0 100644 --- a/examples/python/CMakeLists.txt +++ b/examples/python/CMakeLists.txt @@ -2,11 +2,13 @@ foreach(example exec-basic) set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${example}/${example}.tesh) set(examples_src ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${example}/${example}.py) - ADD_TESH(python-${example} --setenv srcdir=${example} - --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms - --setenv LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib - --setenv PYTHONPATH=${CMAKE_BINARY_DIR}/lib - ${CMAKE_HOME_DIRECTORY}/examples/python/${example}/${example}.tesh) + if(enable_python) + ADD_TESH(python-${example} --setenv srcdir=${example} + --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms + --setenv LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib + --setenv PYTHONPATH=${CMAKE_BINARY_DIR}/lib + ${CMAKE_HOME_DIRECTORY}/examples/python/${example}/${example}.tesh) + endif() endforeach() set(tesh_files ${tesh_files} PARENT_SCOPE)