We're trying to convert a project from using a very old hand-built makefile (the original version was written over 20 years ago!) to using cmake. We want to do the builds using command line nmake, not using Visual Studio project files.
With our existing setup, to switch between 32- and 64- bit builds, we only need to change the option specified on the vcvarsall batch file and do a clean build. The tools figure out from the environment variables which build we're doing any everything works great. We've started our conversion by converting one of our smaller library files. All of the source files appear to compile correctly, but when we get to the link, we're getting the following error: Linking CXX shared library CMakeFiles\bin\rexxapi.dll msvcprtd.lib(MSVCP120D.dll) : fatal error LNK1112: module machine type 'x64' con flicts with target machine type 'X86' LINK Pass 1 failed. with 1112 NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"' : return code '0xffffffff' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0 \VC\BIN\amd64\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0 \VC\BIN\amd64\nmake.exe"' : return code '0x2' Stop. looking at the generated build.make file, I see that the option /machine:X86 appears on the link command. I tried manually deleting that option, but the error persisted. What do I need to do for cmake to generate the correct 64-bit logic...and equally as important, how do we switch between doing 32-bit and 64-bit builds when needed? And let me repeat, we do not want to use the Visual Studio generators...we want the nmake version. Rick
-- 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://www.cmake.org/mailman/listinfo/cmake