René J.V. Bertin wrote: > The > issue was a project that requested an earlier CMake version > (2.8.something) further down.
There should be no 'further down'. There should be exactly one use of cmake_minimum_required per buildsystem. If you are hitting this issue because you are cloning random repos and using add_subdirectory, you're essentially getting undefined behavior, unless the target repo is designed to let you do that. That is - some buildsystems check whether they are top-level and only then invoke cmake_minimum_required. Something like: if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) # Building standalone cmake_minimum_required(VERSION 3.3) project(Dependency) endif() add_executable(etc) if you use add_subdirectory with top-level projects which don't explicitly do something like that, you're getting undefined , and generally unexpected behavior in many ways. Thanks, Steve. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers