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
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?
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?
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:
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?