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

Michael Jackson mike.jackson at bluequartz.net
Fri Sep 21 11:26:18 EDT 2018


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
    




More information about the CMake mailing list