From 2f2d4d4c066b59c04322e710b8965e34affe074f Mon Sep 17 00:00:00 2001 From: Gabriel Studer <gabriel.studer@unibas.ch> Date: Wed, 9 Apr 2025 13:57:09 +0200 Subject: [PATCH] cmake - silence cmake warning Explicitely enable automatic path normalization for newer versions of cmake, see comments in CMakeLists.txt in root directory. --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10371f711..e07c53d6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,17 @@ cmake_minimum_required(VERSION 3.12.1 FATAL_ERROR) # manually forced CMake to the new scheme. cmake_policy(SET CMP0060 NEW) +if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0") + # See CMP0177 for more information + # To summarize: all paths given to the install command are normalized starting + # from cmake version 3.31. Starting from 3.31 you'll start to see warnings if + # you use the OLD behaviour but some paths would need normalization. + # The problem with ost: some of the paths that we give install look like: + # xyz/./bla. So its actually a good thing to run them through normalization + # which would give xyz/bla + cmake_policy(SET CMP0177 NEW) +endif() + project(OpenStructure CXX C) set (CMAKE_EXPORT_COMPILE_COMMANDS 1) set (OST_VERSION_MAJOR 2) -- GitLab