tests: avoid false DOWNLOAD_CATCH manually-specified variables warning (#5803)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index ebd3fff..34b22a5 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -67,6 +67,7 @@
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../tools")
option(PYBIND11_WERROR "Report all warnings as errors" OFF)
+option(DOWNLOAD_CATCH "Download catch2 if not found" OFF)
option(DOWNLOAD_EIGEN "Download EIGEN" OFF)
option(PYBIND11_CUDA_TESTS "Enable building CUDA tests" OFF)
option(PYBIND11_TEST_SMART_HOLDER "Change the default to smart holder" OFF)
diff --git a/tools/FindCatch.cmake b/tools/FindCatch.cmake
index 5d3fcbf..967434c 100644
--- a/tools/FindCatch.cmake
+++ b/tools/FindCatch.cmake
@@ -9,8 +9,6 @@
# CATCH_INCLUDE_DIR - path to catch.hpp
# CATCH_VERSION - version number
-option(DOWNLOAD_CATCH "Download catch2 if not found")
-
if(NOT Catch_FIND_VERSION)
message(FATAL_ERROR "A version number must be specified.")
elseif(Catch_FIND_REQUIRED)