find_path (SYSTEM_USR_DIR "stdlib.h")
include_directories (${SYSTEM_USR_DIR})
-option (GTEST "Build all gtests." OFF)
option (BUILDDOC "Build all doc." OFF)
option (BUILDSWIG "Build swig modules." ON)
option (BUILDSWIGPYTHON "Build swig python modules." ON)
option (BUILDPYTHON3 "Use python3 for building/installing" OFF)
option (INSTALLGPIOTOOL "Install gpio tool" OFF)
option (BUILDARCH "Override architecture to build for - override" OFF)
+option (TESTS "Override the addition of tests" ON)
if (NOT BUILDARCH)
include (TargetArch)
message(FATAL_ERROR "Only x86 and arm platforms currently supported")
endif()
-if (GTEST)
- enable_testing ()
- add_subdirectory (tests)
+if (BUILDSWIGPYTHON)
+ if (BUILDPYTHON3)
+ set (PYTHONBUILD_VERSION 3)
+ else ()
+ set (PYTHONBUILD_VERSION 2.7)
+ endif ()
+ find_package (PythonInterp ${PYTHONBUILD_VERSION} REQUIRED)
+ if (TESTS)
+ if (${PYTHONINTERP_FOUND})
+ enable_testing ()
+ add_subdirectory (tests)
+ endif ()
+ endif ()
endif ()
if (BUILDDOC)