From b3c137f71486ef70125a9f05617f89684da379a1 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sun, 29 Oct 2023 16:00:28 +0100 Subject: [PATCH 1/2] Set CMP0094 to NEW --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35acdd3db..c6fee53ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,11 @@ enable_language(C) ## FindACE requires CXX enable_language(CXX) +## Set CMP0094 to NEW +if(POLICY CMP0094) + cmake_policy(SET CMP0094 NEW) +endif () + # Disable in source build if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}") message(FATAL_ERROR "In-source builds of robotology-superbuild are not allowed. " From fc3cded9b919615d5dfd8eefd0f462a0cc1eba56 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Sun, 29 Oct 2023 22:00:28 +0100 Subject: [PATCH 2/2] Update CMakeLists.txt --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c6fee53ab..1cc0dae28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,9 +13,12 @@ enable_language(C) enable_language(CXX) ## Set CMP0094 to NEW -if(POLICY CMP0094) - cmake_policy(SET CMP0094 NEW) -endif () +# Not done on APPLE as a workaround for https://github.com/robotology/robotology-superbuild/issues/1510 +if(NOT APPLE) + if(POLICY CMP0094) + cmake_policy(SET CMP0094 NEW) + endif() +endif() # Disable in source build if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")