Hi,

I use the CMakeAddFortranSubdirectory feature in one of my projects.  This 
appears to be broken under Visual Studio 2017 Community Edition RC because 
CMake\share\cmake-3.8\Modules\Platform\GNUtoMS_lib.bat.in generates a batch 
file that contains:

call "C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"

and this batch function changes the current working directory to 
%USERPROFILE%/Source (unlike earlier versions) .  Has anyone else seen this?

I have fixed the issue by replacing the cmake provided GNUtoMS_lib.bat.in with

@echo off
set CWD=%CD%
call "@CMAKE_GNUtoMS_BAT@"
cd /d %CWD%
lib /machine:"@CMAKE_GNUtoMS_ARCH@" %*

I'm not sure if CMake needs to make this change more permanent or if this is a 
bug in VS2017.

-kt
-----

-- 

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:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to