[debuginfo-tests] Update Python CMake variable
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 29 Apr 2020 16:51:24 +0000 (09:51 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 29 Apr 2020 16:51:32 +0000 (09:51 -0700)
debuginfo-tests/CMakeLists.txt

index 9f488e9..745e238 100644 (file)
@@ -24,21 +24,20 @@ if (WIN32)
   set(DEBUGINFO_TEST_DEPS ${DEBUGINFO_TEST_DEPS} lld)
 endif()
 
-if (NOT DEFINED PYTHON_EXECUTABLE)
-  message(FATAL_ERROR "Cannot run debuginfo-tests without python")
-elseif(PYTHON_VERSION_MAJOR LESS 3)
+if (NOT DEFINED Python3_EXECUTABLE)
   message(FATAL_ERROR "Cannot run debuginfo-tests without python 3")
-else()
-   configure_lit_site_cfg(
-    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
-    ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
-    MAIN_CONFIG
-    ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
-    )
-
-  add_lit_testsuite(check-debuginfo "Running debug info integration tests"
-    ${CMAKE_CURRENT_BINARY_DIR}
-    DEPENDS ${DEBUGINFO_TEST_DEPS}
-    )
-  set_target_properties(check-debuginfo PROPERTIES FOLDER "Debug info tests")
 endif()
+
+configure_lit_site_cfg(
+  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
+  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
+  MAIN_CONFIG
+  ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
+  )
+
+add_lit_testsuite(check-debuginfo "Running debug info integration tests"
+  ${CMAKE_CURRENT_BINARY_DIR}
+  DEPENDS ${DEBUGINFO_TEST_DEPS}
+  )
+
+set_target_properties(check-debuginfo PROPERTIES FOLDER "Debug info tests")