From c7aa4723d55088ec142f0756355a8cf5b8bd62b3 Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Thu, 15 Dec 2022 09:22:11 -0500 Subject: [PATCH 1/2] Set policy Signed-off-by: Nhat Nguyen --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52b7ac4166..566058366c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,14 @@ option(ONNX_MLIR_SUPPRESS_THIRD_PARTY_WARNINGS "Suppress warning in third_party set(CMAKE_CXX_STANDARD 17) +# New in cmake 3.15: +# https://cmake.org/cmake/help/latest/policy/CMP0094.html +# Stops python lookup as soon as a version satisfying version constraints +# is founded. +if (POLICY CMP0094) + cmake_policy(SET CMP0094 NEW) +endif() + # On systems that still have legacy lib64 directories (e.g., rhel/fedora, # etc.), by default some components (e.g., cmake) install into lib while # others (e.g., python) install into lib64. From 417e4c90ec789b55c40e11ae1a462402ccd3d398 Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Thu, 15 Dec 2022 09:25:26 -0500 Subject: [PATCH 2/2] Set policy Signed-off-by: Nhat Nguyen --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 566058366c..9f3a9a0473 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ set(CMAKE_CXX_STANDARD 17) # New in cmake 3.15: # https://cmake.org/cmake/help/latest/policy/CMP0094.html # Stops python lookup as soon as a version satisfying version constraints -# is founded. +# is found. if (POLICY CMP0094) cmake_policy(SET CMP0094 NEW) endif()