Generating MSVS solution files that can be passed around

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Generating MSVS solution files that can be passed around

Zaak Beekman

Greetings fellow CMake users!

While I know this topic has been discussed intermittently over the years I was wondering if anyone had any further insight.

The situation is that we have a client who works with other contractors who use almost exclusively windows and MSVS. This client wants to distribute MSVS solution files with the source code so that other contractors don’t have to install cmake. (There are some restrictions/red tape for installing additional software on the contractor machines…)

I know the official party line is “CMake must use absolute paths, rerun CMake to regenerate the MSVS solution files.” I also know that CMAKE_USE_RELATIVE_PATHS was abandoned.

Does anyone have any updated insight on this issue? Is there any mechanism, other than either manually or automatically editing the solution files to cause them to use relative paths?

Another thought might be to include a statically linked CMake windows binary with the source, but I need to investigate whether the CMake licensing allows for that.

Thanks,
Zaak


Izaak "Zaak" Beekman

-------------------------------------------------------------------------------
HPC Scientist
ParaTools Inc.
1509 16th St, NW
Washington, DC 20036
mobile: <a href="tel:(917)%20797-3239" value="+19177973239" target="_blank">(917) 797-3239
-------------------------------------------------------------------------------

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Generating MSVS solution files that can be passed around

Konstantin Tokarev


19.04.2018, 18:46, "Zaak Beekman" <[hidden email]>:
> Greetings fellow CMake users!
>
> While I know this topic has been discussed intermittently over the years I was wondering if anyone had any further insight.
>
> The situation is that we have a client who works with other contractors who use almost exclusively windows and MSVS. This client wants to distribute MSVS solution files with the source code so that other contractors don’t have to install cmake. (There are some restrictions/red tape for installing additional software on the contractor machines…)

Then your best choice is probably Premake (http://premake.github.io/)

>
> I know the official party line is “CMake must use absolute paths, rerun CMake to regenerate the MSVS solution files.” I also know that CMAKE_USE_RELATIVE_PATHS was abandoned.
>
> Does anyone have any updated insight on this issue? Is there any mechanism, other than either manually or automatically editing the solution files to cause them to use relative paths?
>
> Another thought might be to include a statically linked CMake windows binary with the source, but I need to investigate whether the CMake licensing allows for that.
>
> Thanks,
> Zaak
>
> Izaak "Zaak" Beekman
>
> -------------------------------------------------------------------------------
> HPC Scientist
> ParaTools Inc.
> [hidden email]
> 1509 16th St, NW
> Washington, DC 20036
> mobile: (917) 797-3239
> -------------------------------------------------------------------------------
> ​
>
> ,--
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake


-- 
Regards,
Konstantin
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Generating MSVS solution files that can be passed around

Zaak Beekman


On Thu, Apr 19, 2018 at 11:51 AM Konstantin Tokarev <[hidden email]> wrote:
Then your best choice is probably Premake (http://premake.github.io/)

No.

Big project. Have build system. CMake has 1st class language support for Fortran. I can't introduce a LUA dependency. 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Generating MSVS solution files that can be passed around

Cristian Adam
In reply to this post by Zaak Beekman
On Thu, Apr 19, 2018 at 5:46 PM, Zaak Beekman <[hidden email]> wrote:

The situation is that we have a client who works with other contractors who use almost exclusively windows and MSVS. This client wants to distribute MSVS solution files with the source code so that other contractors don’t have to install cmake. (There are some restrictions/red tape for installing additional software on the contractor machines…)


Why not distribute CMake as source code? Compile it so that they don't have to "install" it.

On the other hand Visual Studio 2017 comes with their own version of CMake! Just make sure your contractors use VS2017 :D

Cheers,
Cristian. 
 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Generating MSVS solution files that can be passed around

Zaak Beekman
Ha, yeah that’s an option. The problem is that they’re not “my” contractors. They are the client’s contractors. We’ll see.
On Thu, Apr 19, 2018 at 12:52 PM Cristian Adam <[hidden email]> wrote:
On Thu, Apr 19, 2018 at 5:46 PM, Zaak Beekman <[hidden email]> wrote:

The situation is that we have a client who works with other contractors who use almost exclusively windows and MSVS. This client wants to distribute MSVS solution files with the source code so that other contractors don’t have to install cmake. (There are some restrictions/red tape for installing additional software on the contractor machines…)


Why not distribute CMake as source code? Compile it so that they don't have to "install" it.

On the other hand Visual Studio 2017 comes with their own version of CMake! Just make sure your contractors use VS2017 :D

Cheers,
Cristian. 
 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Generating MSVS solution files that can be passed around

Jano Svitok
You don't have to install cmake. Just get the zip version, unzip in somewhere along your sources and you are done.
I'm not sure whether any runtime dlls are needed, but I suppose not.

We use cmake like that. We've committed a copy in our git repo, and have a simple means to update cmake for everyone
in the team at once.

Jano

On Thu, Apr 19, 2018 at 6:55 PM, Zaak Beekman <[hidden email]> wrote:
Ha, yeah that’s an option. The problem is that they’re not “my” contractors. They are the client’s contractors. We’ll see.
On Thu, Apr 19, 2018 at 12:52 PM Cristian Adam <[hidden email]> wrote:
On Thu, Apr 19, 2018 at 5:46 PM, Zaak Beekman <[hidden email]> wrote:

The situation is that we have a client who works with other contractors who use almost exclusively windows and MSVS. This client wants to distribute MSVS solution files with the source code so that other contractors don’t have to install cmake. (There are some restrictions/red tape for installing additional software on the contractor machines…)


Why not distribute CMake as source code? Compile it so that they don't have to "install" it.

On the other hand Visual Studio 2017 comes with their own version of CMake! Just make sure your contractors use VS2017 :D

Cheers,
Cristian. 
 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Generating MSVS solution files that can be passed around

Zaak Beekman
Thanks Jano, that's the work flow I was considering.

On Thu, Apr 19, 2018 at 5:33 PM Jano Svitok <[hidden email]> wrote:
You don't have to install cmake. Just get the zip version, unzip in somewhere along your sources and you are done.
I'm not sure whether any runtime dlls are needed, but I suppose not.

We use cmake like that. We've committed a copy in our git repo, and have a simple means to update cmake for everyone
in the team at once.

Jano

On Thu, Apr 19, 2018 at 6:55 PM, Zaak Beekman <[hidden email]> wrote:
Ha, yeah that’s an option. The problem is that they’re not “my” contractors. They are the client’s contractors. We’ll see.
On Thu, Apr 19, 2018 at 12:52 PM Cristian Adam <[hidden email]> wrote:
On Thu, Apr 19, 2018 at 5:46 PM, Zaak Beekman <[hidden email]> wrote:

The situation is that we have a client who works with other contractors who use almost exclusively windows and MSVS. This client wants to distribute MSVS solution files with the source code so that other contractors don’t have to install cmake. (There are some restrictions/red tape for installing additional software on the contractor machines…)


Why not distribute CMake as source code? Compile it so that they don't have to "install" it.

On the other hand Visual Studio 2017 comes with their own version of CMake! Just make sure your contractors use VS2017 :D

Cheers,
Cristian. 
 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Generating MSVS solution files that can be passed around

Bill Hoffman
One thing to consider is that MS is now shipping CMake as part of VS. 
So, if you can get your project to work with that version of VS, you
should be all set. In fact you can have people just open the project and
MS VS will run CMake for you.

-Bill

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Generating MSVS solution files that can be passed around

Zaak Beekman
In reply to this post by Zaak Beekman
Hi Bill,

Thanks for your response! Yes, I am aware of that MSVS has CMake integration starting in MSVS 2017, but for various reasons, the pace of upgrading or installing new software with the other contractors on the project is limited. Some are stuck with MSVS 2015 which does not yet have native CMake support.

I have included CMake binaries for Windows in a vendor subdirectory of the project and wrote a batch file to allow one-click generation of Visual Studio project files using the CMake binary now included with the source code. With one click, the version of MSVS available is queried through registry keys, the machine arch is queried and the included CMake is launched with the correct MSVS version and arch specified to the -G generator flag.

Thanks to all for all your help and suggestions!

Best,
Zaak

On Thu, Apr 19, 2018 at 5:37 PM Zaak Beekman <[hidden email]> wrote:
Thanks Jano, that's the work flow I was considering.

On Thu, Apr 19, 2018 at 5:33 PM Jano Svitok <[hidden email]> wrote:
You don't have to install cmake. Just get the zip version, unzip in somewhere along your sources and you are done.
I'm not sure whether any runtime dlls are needed, but I suppose not.

We use cmake like that. We've committed a copy in our git repo, and have a simple means to update cmake for everyone
in the team at once.

Jano

On Thu, Apr 19, 2018 at 6:55 PM, Zaak Beekman <[hidden email]> wrote:
Ha, yeah that’s an option. The problem is that they’re not “my” contractors. They are the client’s contractors. We’ll see.
On Thu, Apr 19, 2018 at 12:52 PM Cristian Adam <[hidden email]> wrote:
On Thu, Apr 19, 2018 at 5:46 PM, Zaak Beekman <[hidden email]> wrote:

The situation is that we have a client who works with other contractors who use almost exclusively windows and MSVS. This client wants to distribute MSVS solution files with the source code so that other contractors don’t have to install cmake. (There are some restrictions/red tape for installing additional software on the contractor machines…)


Why not distribute CMake as source code? Compile it so that they don't have to "install" it.

On the other hand Visual Studio 2017 comes with their own version of CMake! Just make sure your contractors use VS2017 :D

Cheers,
Cristian. 
 

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake