strange error when building paraview superbuild on Windows 10 with cmake

Hi,

I follow the link here
https://gitlab.kitware.com/paraview/paraview-superbuild
to build Paraview 5.5.2 on my PC.
Following the link it is said that

The superbuild can be built with a Makefiles or Ninja CMake generator. The IDE generators (Xcode and Visual Studio) are not supported.

However, if I try with Makefiles/Ninja generator in cmake, it ends with a CMake Error

CMake Error at superbuild/projects/win32/boost.cmake:5 (message):
At least Visual Studio 9.0 is required
Call Stack (most recent call first):
superbuild/cmake/SuperbuildMacros.cmake:673 (include)
superbuild/CMakeLists.txt:145 (_superbuild_discover_projects)

I also find the following method by using Ninja + VS 12/14 compiler( with vcvarsall.bat, see the following link) in the archives of the old mailing lists, but this method doesn’t work for me either, I still get the same error (At least Visual Studio 9.0 is required…):
https://markmail.org/message/cjnniaac4lt2ldy4

could anyone give some help?

It looks like CMake does not find the visual studio compiler. Did you run cmake via the visual studio interface(aka visual studio x64 win64 command prompt)? If using CMake-gui, did you specify the compiler?

Make sure you run cmake-gui and ninja from the visual studio native command.

Hi Haocheng,

thank you very much for your reply!
The Cmake-gui seems need more variables to be set, so I switched to the command line.
I tried to run the cmake via the visual studio interface, but I still got the “At least Visual Studio 9.0 is required” error.

However, today I found out that the visual studio interface only adjusts the path variable and sets some other variables. Then based on the adjusted path, cmake finds the compiler for MinGW/Strawberry for me at first. After deleting unneeded entries in my path variable, the cmake can finally find the VS compiler and I get rid of this error.

But now I get a new error:

CMake Error at superbuild/cmake/SuperbuildUtils.cmake:45 (message):
CMAKE_BUILD_TYPE must be one of: Release, RelWithDebInfo.
Call Stack (most recent call first):
superbuild/CMakeLists.txt:25 (include)

Based on this link, I tried the following command:

cmake --config Release -GNinja …

But I still get this “CMAKE_BUILD_TYPE” error. Do you know how to solve this?

Hi Mathieu,

thank you very much for your reply!
The Cmake-gui seems need more variables to be set, so I switched to the command line.
Actually, with Cmake-gui I get this error:

CMake Error at C:/Program Files/CMake/share/cmake-3.12/Modules/CMakeDetermineRCCompiler.cmake:20 (message):
Could not find compiler set in environment variable RC:

rc.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.12/Modules/Platform/Windows-MSVC.cmake:380 (enable_language)
C:/Program Files/CMake/share/cmake-3.12/Modules/Platform/Windows-MSVC-C.cmake:5 (__windows_compiler_msvc)
C:/Program Files/CMake/share/cmake-3.12/Modules/CMakeCInformation.cmake:48 (include)
CMakeLists.txt:3 (project)

CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage

I tried to run the cmake via the visual studio interface, but I still got the “At least Visual Studio 9.0 is required” error.

Today I found out that the visual studio interface only adjusts the path variable and sets some other variables. Then based on the adjusted path, cmake finds the compiler for MinGW/Strawberry for me at first. After deleting unneeded entries in my path variable, the cmake can finally find the VS compiler and I get rid of this error.

But now I get a new error:

CMake Error at superbuild/cmake/SuperbuildUtils.cmake:45 (message):
CMAKE_BUILD_TYPE must be one of: Release, RelWithDebInfo.
Call Stack (most recent call first):
superbuild/CMakeLists.txt:25 (include)

Based on this link, I tried the following command:

cmake --config Release -GNinja …

But I still get this “CMAKE_BUILD_TYPE” error. Do you know how to solve this?

Can you try cmake -DCMAKE_BUILD_TYPE=Release?

Or you can manally change the CMAKE_BUILD_TYPE variable in the CMakeCache.txt file.

1 Like

Thank you very much! Now I have built it successfully.