Canonical way to set the Visual Studio solution (.sln) filename?

I am trying to control the filename of the Visual Studio solution generated when using CMake:

if( NOT DEFINED BOOST_PROJECT_NAME )
  set( BOOST_PROJECT_NAME "Boost" )
endif()
project( ${BOOST_PROJECT_NAME} VERSION 1.82.0 LANGUAGES CXX )

However the owner of the script says " The project name is significant and changing it just to rename the .sln file is not the right fix. You should ask in the CMake discourse whether there’s a way to change the name of the generated .sln file without changing the CMake project name."

Is there another way to control the filename of the resulting .sln file without changing the project name?

Thanks!

1 Like