Fix testing whether tests exist on older CMake

The string equality works on the 3.6 but not on 3.5. This works on 3.5, so I hope it also works on 3.6 (but I don't have that computer with me right now).
This commit is contained in:
Ruben D 2017-12-30 16:58:52 +01:00
parent 719bd5a707
commit 28919a57a4
No known key found for this signature in database
GPG Key ID: 6B42C9465E304A62

View File

@ -29,7 +29,7 @@ function(cura_add_test)
endif() endif()
get_test_property(${_NAME} ENVIRONMENT test_exists) #Find out if the test exists by getting a property from it that always exists (such as ENVIRONMENT because we set that ourselves). get_test_property(${_NAME} ENVIRONMENT test_exists) #Find out if the test exists by getting a property from it that always exists (such as ENVIRONMENT because we set that ourselves).
if (${test_exists} EQUAL "NOTFOUND") if (NOT ${test_exists})
add_test( add_test(
NAME ${_NAME} NAME ${_NAME}
COMMAND ${PYTHON_EXECUTABLE} -m pytest --junitxml=${CMAKE_BINARY_DIR}/junit-${_NAME}.xml ${_DIRECTORY} COMMAND ${PYTHON_EXECUTABLE} -m pytest --junitxml=${CMAKE_BINARY_DIR}/junit-${_NAME}.xml ${_DIRECTORY}