diff --git a/CMakeLists.txt b/CMakeLists.txt index f07be0e0bd..ffdcd43a60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1586,11 +1586,19 @@ endif() # performance tests #----------------------------------- if(BUILD_PERF_TESTS AND PYTHON_EXECUTABLE) - add_custom_target(perf - ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/modules/ts/misc/run.py" --configuration $ "${CMAKE_BINARY_DIR}" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/modules/ts/misc/run.py" - ) + if(CMAKE_VERSION VERSION_GREATER "2.8.2") + add_custom_target(perf + ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/modules/ts/misc/run.py" --configuration $ "${CMAKE_BINARY_DIR}" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/modules/ts/misc/run.py" + ) + else() + add_custom_target(perf + ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/modules/ts/misc/run.py" "${CMAKE_BINARY_DIR}" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/modules/ts/misc/run.py" + ) + endif() endif() #-----------------------------------