Skip to content

Commit ae496d1

Browse files
authored
Merge pull request #970 from etcwilde/main
Fix CMake warnings in llbuild
2 parents a4a5c41 + 1fbcca5 commit ae496d1

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ set(LLBUILD_LIBDIR_SUFFIX "${LIB_SUFFIX}" CACHE STRING "Set default library fold
8888
if(BUILD_TESTING)
8989
find_package(Lit)
9090
find_package(FileCheck)
91-
find_package(PythonInterp)
91+
find_package(Python3 3.7 COMPONENTS Interpreter)
9292
endif()
9393

9494
###

tests/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ configure_file(
1818
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
1919
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg)
2020

21-
include(FindPython)
22-
if(Python_Interpreter_FOUND AND LIT_FOUND AND FILECHECK_FOUND)
21+
if(Python3_Interpreter_FOUND AND LIT_FOUND AND FILECHECK_FOUND)
2322
set(LIT_ARGS "${LLBUILD_LIT_ARGS}")
2423
separate_arguments(LIT_ARGS)
2524

@@ -29,7 +28,7 @@ if(Python_Interpreter_FOUND AND LIT_FOUND AND FILECHECK_FOUND)
2928
endif()
3029

3130
set(lit_command
32-
${Python_EXECUTABLE}
31+
${Python3_EXECUTABLE}
3332
${LIT_EXECUTABLE}
3433
${LIT_ARGS}
3534
--param build_mode=${build_mode})
@@ -46,9 +45,6 @@ if(Python_Interpreter_FOUND AND LIT_FOUND AND FILECHECK_FOUND)
4645
add_dependencies(test-llbuild ${test_target_dependencies})
4746

4847
# Add a target for running all tests.
49-
if(POLICY CMP0037)
50-
cmake_policy(SET CMP0037 OLD)
51-
endif(POLICY CMP0037)
5248
add_custom_target(test)
5349
add_dependencies(test test-llbuild)
5450
set_target_properties(test PROPERTIES FOLDER "Tests")

0 commit comments

Comments
 (0)