The CMake policy CMP0144 generates an error with the latest CMake version (3.30.4). #17

Merged
Brecht Van Lommel merged 2 commits from Pierre-Pontier/cycles:fix/cmake_policy_cmp0144_is_not_know into main 2024-10-03 02:14:20 +02:00
Contributor

I'm trying to compile the latest version of Cycles. I get this error.

CMake: v3.30.4 (the latest version)
Cycles: v4.2.0

CMake Error at CMakeLists.txt:39 (cmake_policy):
Policy "CMP0144" is not known to this version of CMake.

https://cmake.org/cmake/help/latest/policy/CMP0144.html

Deleting line 39 "cmake_policy(SET CMP0144 NEW)" from the CMakeLists.txt file allows Cycles to be compiled with the latest version of CMake.

I'm trying to compile the latest version of Cycles. I get this error. CMake: v3.30.4 (the latest version) Cycles: v4.2.0 CMake Error at CMakeLists.txt:39 (cmake_policy): Policy "CMP0144" is not known to this version of CMake. https://cmake.org/cmake/help/latest/policy/CMP0144.html Deleting line 39 "cmake_policy(SET CMP0144 NEW)" from the CMakeLists.txt file allows Cycles to be compiled with the latest version of CMake.
Suryavarman added 1 commit 2024-10-01 11:49:32 +02:00
Deleting line 39 "cmake_policy(SET CMP0144 NEW)" from the CMakeLists.txt file allows Cycles to be compiled with the latest version of CMake.
Brecht Van Lommel requested changes 2024-10-02 12:29:43 +02:00
Dismissed
CMakeLists.txt Outdated
@ -37,4 +37,3 @@
# Use ROOT variables in find_package.
cmake_policy(SET CMP0074 NEW)
cmake_policy(SET CMP0144 NEW)

Can you do instead do this? That way older CMake versions still use the new behavior as we want.

if(POLICY CMP0144)
  cmake_policy(SET CMP0144 NEW)
endif() 

In fact we should do this if/endif for all cmake_policy lines, for future proofing.

Can you do instead do this? That way older CMake versions still use the new behavior as we want. ``` if(POLICY CMP0144) cmake_policy(SET CMP0144 NEW) endif() ``` In fact we should do this if/endif for all `cmake_policy` lines, for future proofing.
Suryavarman added 1 commit 2024-10-02 16:31:37 +02:00
That way older CMake versions still use the new behavior as we want.
Brecht Van Lommel approved these changes 2024-10-03 02:11:54 +02:00
Brecht Van Lommel left a comment
Owner

Thanks!

Thanks!
Brecht Van Lommel merged commit de616a4d7d into main 2024-10-03 02:14:20 +02:00
Brecht Van Lommel deleted branch fix/cmake_policy_cmp0144_is_not_know 2024-10-03 02:14:21 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: blender/cycles#17
No description provided.