Skip to content

Commit a137892

Browse files
committed
[Tests] Only check for python 3
1 parent 115db79 commit a137892

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ TARGET_INCLUDE_DIRECTORIES(${CONTROLLER_NAME} SYSTEM PUBLIC
3232
TARGET_LINK_LIBRARIES(${CONTROLLER_NAME} ${DEVICE_NAME})
3333
INSTALL(TARGETS ${CONTROLLER_NAME} DESTINATION lib)
3434

35-
ADD_EXECUTABLE(sot-test-log sot-test-log.cc)
36-
TARGET_LINK_LIBRARIES(sot-test-log rcsot_controller)
35+
IF(${PYTHON_VERSION_MAJOR} GREATER 2)
36+
ADD_EXECUTABLE(sot-test-log sot-test-log.cc)
37+
TARGET_LINK_LIBRARIES(sot-test-log rcsot_controller)
3738

38-
ADD_PYTHON_UNIT_TEST("py-test-log" "tests/test_log.py" "python")
39+
ADD_PYTHON_UNIT_TEST("py-test-log" "tests/test_log.py" "python")
40+
ENDIF()

0 commit comments

Comments
 (0)