Alternatively you could use cmake-gui and on first generation in an empty directoy, a popup window appears allowing you to select the generator.
mkdir build2 cd build2 cmake-gui .. then set the various flags in the gui. On Tue, Jul 11, 2017 at 3:13 AM, A.M. Sabuncu <amsabu...@gmail.com> wrote: > Petr, > > Thank you so much. The following command you suggested fixed the problem, > and I was able to run a successful build: > > cmake .. -G "Visual Studio 15 2017 Win64" > > I am grateful for your help. This may have been a minor item for you, but > for me, it was a real stumbling block. > > By the way, the other alternative you suggested did not work: > > cmake .. -A Win64 (or "Win64") > > The result was: > > -- Building for: Visual Studio 15 2017 > -- Running cmake version 3.8.2 > -- Found Git: C:/Program Files/Git/cmd/git.exe (found version > "2.10.2.windows.1") > -- Configuring with MAX_INDEXES = 64U > -- The C compiler identification is unknown > -- The CXX compiler identification is unknown > CMake Error at CMakeLists.txt:126 (PROJECT): > No CMAKE_C_COMPILER could be found. > > The funny thing is that the use of the -G flag does not issue a "Building > for..." message, but correctly locates the necessary compiler, whereas the > -A flag seems to know what target it is building for, but cannot find the > compiler! > > Thank you again, > > A. M. Sabuncu > > On Tue, Jul 11, 2017 at 10:12 AM, Petr Kmoch <petr.km...@gmail.com> wrote: > >> Hi, >> >> when generating a Visual Studio buildsystem with CMake, you can specify >> the target architecture. If you don't, the default is 32-bit. >> >> To specify the architecture, either put it into the generator name: >> >> cmake .. -G "Visual Studio 15 2017 Win64" .... >> >> or specify just the architecture using -A: >> >> cmake .. -A Win64 .... >> >> See description of -G and -A in CMake docs: >> https://cmake.org/cmake/help/latest/manual/cmake.1.html >> >> Petr >> >> On 10 July 2017 at 22:06, A.M. Sabuncu <amsabu...@gmail.com> wrote: >> >>> I am completely new to CMake, and am using to build MySQL 5.7.18 on >>> Windows 10 x64, using the following command: >>> >>> cmake .. -DDOWNLOAD_BOOST=1 -DWITH_BOOST="C:\Boost" -DENABLE_DOWNLOADS=1 >>> >>> I have VS 2017 installed, and I am on 64 bit machine, but for some >>> reason, the above command produces the following output: >>> >>> The CXX compiler identification is MSVC 19.10.25019.0 >>> -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual >>> Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX >>> 86/x86/cl.exe >>> -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual >>> Studio/2017/Professional/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe >>> -- works >>> >>> The correct compiler is in the HostX64/x64 folder. >>> >>> Thinking that CMake might be looking it up from there, I checked the >>> processor architecture environment variable from the same cmd.exe that I >>> launched the CMake command from, and here's the result: >>> >>> PROCESSOR_ARCHITECTURE=AMD64 >>> >>> When I follow the above CMake command with the following: >>> >>> devenv MySQL.sln /build RelWithDebInfo >>> >>> I get 32-bit results generated, which is not what I want. >>> >>> How can I get CMake to generate a 64-bit build? >>> >>> Thanks so much. >>> >>> >>> -- >>> >>> 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 >>> >> >> > > -- > > 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 >
-- 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