diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43f91bde8..f456b08a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -314,6 +314,7 @@ jobs: python_action_ver: "3.9" simd: sse4.2 setenvs: export CMAKE_BUILD_TYPE=Debug + CMAKE_VERSION=3.23.0 LLVM_VERSION=14.0.0 LLVM_DISTRO_NAME=ubuntu-18.04 PUGIXML_VERSION=v1.8 diff --git a/CMakeLists.txt b/CMakeLists.txt index 79996aefc..11e75f091 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # SPDX-License-Identifier: BSD-3-Clause # https://github.com/AcademySoftwareFoundation/OpenShadingLanguage -cmake_minimum_required (VERSION 3.19) +cmake_minimum_required (VERSION 3.23) set (OSL_VERSION "1.16.0.0") set (OSL_VERSION_OVERRIDE "" CACHE STRING @@ -30,15 +30,6 @@ else () set (${PROJECT_NAME}_DEV_RELEASE ON) endif () -# Set PROJECT_IS_TOP_LEVEL to ON if if this is the top level project (not -# if this is included as a subproject of something else). Note that this is -# handled automatically for CMake >= 3.21. -if (CMAKE_VERSION VERSION_LESS 3.21) - if ("${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}") - set (PROJECT_IS_TOP_LEVEL ON) - endif () -endif () - # Set up module path for our own cmake modules and add some esential ones list (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/src/cmake/modules" @@ -83,6 +74,7 @@ message (STATUS "Project install prefix = ${CMAKE_INSTALL_PREFIX}") message (STATUS "Configuration types = ${CMAKE_CONFIGURATION_TYPES}") message (STATUS "Build type = ${CMAKE_BUILD_TYPE}") message (STATUS "Supported release = ${${PROJECT_NAME}_SUPPORTED_RELEASE}") +message (STATUS "Project is top level = ${PROJECT_IS_TOP_LEVEL}") # Make the build area layout look a bit more like the final dist layout set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) diff --git a/INSTALL.md b/INSTALL.md index 9960df8b4..462a2e553 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -19,7 +19,7 @@ Dependencies OSL requires the following dependencies or tools. NEW or CHANGED minimum dependencies since the last major release are **bold**. -* Build system: [CMake](https://cmake.org/) 3.19 or newer (tested +* Build system: [CMake](https://cmake.org/) 3.23 or newer (tested through 4.2) * A suitable C++17 compiler to build OSL itself, which may be any of: