[CMake] How to have Visual Studio 15 2017 actually use a 64 bit toolchain.

Michael Jackson mike.jackson at bluequartz.net
Fri Sep 21 16:31:58 EDT 2018


Nope. That just tells what _version_ of the compiler suite to use, but not
the architecture.

-- The C compiler identification is MSVC 19.0.24234.1
-- The CXX compiler identification is MSVC 19.0.24234.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/x86_amd64/cl.exe -- works

C:\Users\mjackson\DREAM3D-Dev\DREAM3D-Builds\Test>set
PreferredToolArchitecture=x64
C:\Users\mjackson\DREAM3D-Dev\DREAM3D-Builds\Test>cmake -G "Visual Studio
15 2017 Win64" -T "v140" -DDREAM3D_SDK=C:/DREAM3D_SDK ../../DREAM3D
--  *
-- *******************************************************
-- The C compiler identification is MSVC 19.0.24234.1
-- The CXX compiler identification is MSVC 19.0.24234.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/amd64/cl.exe -- works


_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net



On Fri, Sep 21, 2018 at 4:02 PM J Decker <d3ck0r at gmail.com> wrote:

> "C:/tools/unix/cmake/bin/cmake.exe" -G "Visual Studio 15 2016 Win64" -T
> "v140" ..
> C:\tools\unix\cmake\bin\cmake.exe --build . --config "Debug" --target
> "INSTALL"
>
> On Fri, Sep 21, 2018 at 8:26 AM Michael Jackson <
> mike.jackson at bluequartz.net> wrote:
>
>> So I tried using "-DCMAKE_GENERATOR_TOOLSET=x64" while configuring a
>> clean build directory but it still picked up the x86 compiler. I ended up
>> going into the "Settings" of Windows 10 and added the environment variable
>> PreferredToolArchitecture=x64 to my account. Logged out, Logged back in and
>> then did another configuration run and now during the cmake configuration
>> run the proper 64 bit compiler is picked up and used. Still probably
>> missing something obvious in the CMake file that I can add....
>>
>> --
>> Mike Jackson
>>
>> On 9/21/18, 10:28 AM, "CMake on behalf of Mateusz Loskot" <
>> cmake-bounces at cmake.org on behalf of mateusz at loskot.net> wrote:
>>
>>     On Fri, 21 Sep 2018 at 16:13, Michael Jackson
>>     <mike.jackson at bluequartz.net> wrote:
>>     >
>>     > For those that want to actually use Visual Studio 15 2017 is there
>> anything in CMake or an environment variable that can be set?
>>
>>     Isn't host=x64 for that purpose?
>>
>>
>> https://cmake.org/cmake/help/v3.12/variable/CMAKE_GENERATOR_TOOLSET.html
>>
>>     Best regards
>>     --
>>     Mateusz Loskot, http://mateusz.loskot.net
>>     --
>>
>>     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
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180921/7b961d72/attachment.html>


More information about the CMake mailing list