From d7c7405281ac0d45486ed1560d0c6d9c0697143b Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Fri, 1 Mar 2019 11:29:24 -0800 Subject: [PATCH] invalidate wrong cached result for diagnostic_msgs --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50c81a9d..709c8f91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,8 @@ if(BUILD_TESTING) # and not the ROS 1 package set(_ros1_diagnostic_msgs_DIR "${ros1_diagnostic_msgs_PREFIX}/share/diagnostic_msgs/cmake") if("${diagnostic_msgs_DIR}" STREQUAL "${_ros1_diagnostic_msgs_DIR}") + # invalidate the cached result to retry finding the package next time + unset(diagnostic_msgs_DIR CACHE) message(FATAL_ERROR "Failed to find ROS 2 package 'diagnostic_msgs'") endif() set(TEST_ROS1_BRIDGE TRUE)