From 982b045402fcceba020cc7f6ebd45da80a73769a Mon Sep 17 00:00:00 2001 From: Jakub Jeziorski Date: Sun, 25 Aug 2019 22:54:01 -0700 Subject: [PATCH] Check that all_tests target exists before adding dependencies (#945) --- usdtransaction/AL/usd/transaction/tests/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usdtransaction/AL/usd/transaction/tests/CMakeLists.txt b/usdtransaction/AL/usd/transaction/tests/CMakeLists.txt index 10d0e6d07d..2ab1fa05e0 100644 --- a/usdtransaction/AL/usd/transaction/tests/CMakeLists.txt +++ b/usdtransaction/AL/usd/transaction/tests/CMakeLists.txt @@ -50,4 +50,6 @@ set_tests_properties(${USDTRANSACTION_PYTHON_TEST_NAME} ENVIRONMENT PYTHONPATH=${CMAKE_BINARY_DIR}/src:$ENV{PYTHONPATH} ) -add_dependencies(all_tests ${USDTRANSACTION_TEST_EXECUTABLE_NAME} ${USDTRANSACTION_PYTHON_LIBRARY_NAME}) \ No newline at end of file +if (TARGET all_tests) + add_dependencies(all_tests ${USDTRANSACTION_TEST_EXECUTABLE_NAME} ${USDTRANSACTION_PYTHON_LIBRARY_NAME}) +endif() \ No newline at end of file