Skip to content

Commit

Permalink
cmake: Allow to build without Python.
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
jrfonseca committed Apr 27, 2015
1 parent f9f8aca commit c73961d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Recommended:
* [Debugging Tools for Windows](https://msdn.microsoft.com/en-us/library/windows/hardware/ff551063.aspx)
for the latest version of `dbghelp.dll` and `symsrv.dll` DLLs.

* [Python 2.x](https://www.python.org/downloads/) for running some of the tests.


# Cross-compilation toolchain #

Expand Down
12 changes: 7 additions & 5 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ add_test (
#

add_subdirectory (apps)
find_package (PythonInterp 2.7 REQUIRED)
add_test (
NAME test_catchsegv
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/apps/test.py $<TARGET_FILE:catchsegv> ${CMAKE_CURRENT_BINARY_DIR}/apps
)
find_package (PythonInterp 2.7)
if (PYTHONINTERP_FOUND)
add_test (
NAME test_catchsegv
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/apps/test.py $<TARGET_FILE:catchsegv> ${CMAKE_CURRENT_BINARY_DIR}/apps
)
endif ()

0 comments on commit c73961d

Please sign in to comment.