diff --git a/CMakeLists.txt b/CMakeLists.txt index 35acdd3db..1cc0dae28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,14 @@ enable_language(C) ## FindACE requires CXX enable_language(CXX) +## Set CMP0094 to NEW +# 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}") message(FATAL_ERROR "In-source builds of robotology-superbuild are not allowed. "