Reputation: 39
I have installed CMake 3.15.2 for my project.Then I configure and build VTK.Finally I install CCMake with following command.
sudo apt install cmake-curses-gui
The version of CCMake which has been installed is 3.10.2.After opening CCMake window,for setting up the paths and others, I get following image.
Then when I press [c] for configuration, I get following error message.
From the error , it seems to me that the version of CMake used by CCMake is lower than the version VTK requires.Though installed CMake version is 3.15.2.But CMake version in CCMake is 3.10.2.During configuration ,VTK checks this version which is creating problem.I have tried to upgrade the version of CCMake , but don't get anything above 3.10.2.I have also followed solutions of following question which is same as mine.
ccmake using cmake version 3.10
But can't solve. Dear altruists , how can I solve it? Any suggestion will be appreciated.And thanks in advance.
Upvotes: 0
Views: 659
Reputation: 39
Actually,the problem was created due to a condition in vtk-config.cmake file. The condition was
That's why
I have changed the version of CMake in the condition like following image.
Now it works fine.Reason of giving 3.10 is my CMake version is 3.10.2 which you will find in the second screenshot of my question.You will update it according to your installed version. Finally I needed one more change.In the vtk-config.cmake file, you will see cmake_policy().With it the version of CMake can be set. Initially it was
cmake_policy(VERSION 3.12)
. After my edition it is cmake_policy(VERSION 3.10)
.
Without edition I have faced following error
An attempt was made to set the policy version of CMake to "3.12" which is greater than this version of CMake. This is not allowed because the greater version may have new policies not known to this CMake. You may need a newer CMake version to build this project.
That's all.
Upvotes: 0