Hello,

Due to the relative slowness of mingw32-make.exe (MinGW) compared to
make.exe (MSYS) I set out to convert a working MinGW generator project over
to MSYS.  The project uses Visual Studio CXX and Intel Fortran.  Is this
even possible?

My approach was to treat the toolchain like a cross compile, since MSYS
assumes GCC and GFortran.  I printed the relevant toolchain variables from
the working MinGW build, and set them in the MSYS build before the project
statement.  The statements are:

set(CMAKE_SYSTEM_NAME "Windows")
set(CMAKE_C_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/amd64/cl.exe")
set(CMAKE_C_COMPILER_ID "MSVC")
set(CMAKE_CXX_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/amd64/cl.exe")
set(CMAKE_CXX_COMPILER_ID "MSVC")
set(CMAKE_Fortran_COMPILER "C:/Program Files (x86)/Intel/Composer XE
2015/bin/intel64/ifort.exe")
set(CMAKE_Fortran_COMPILER_ID "Intel")
set(CMAKE_AR "C:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/amd64/lib.exe" CACHE FILEPATH "Archiver")

However, when I perform the initial cmake specifying the MSYS Makefiles
generator I get the following error:

-- The CXX compiler identification is MSVC 18.0.31101.0
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual
Studio 12.0/VC/bin/amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual
Studio 12.0/VC/bin/amd64/cl.exe -- broken
CMake Error at c:/Program Files
(x86)/CMake/share/cmake-3.0/Modules/CMakeTestCXXCompiler.cmake:54 (message):
  The C++ compiler "C:/Program Files (x86)/Microsoft Visual Studio
  12.0/VC/bin/amd64/cl.exe" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: F:/P4V/brobins_sim_DEV/build_msys/Release/CMakeFiles/CMakeTmp

  Run Build Command:"c:/opt/gnuwin32/bin/make.exe"
  "cmTryCompileExec3536241854/fast"

  c:/opt/gnuwin32/bin/make.exe -f
  CMakeFiles/cmTryCompileExec3536241854.dir/build.make
  CMakeFiles/cmTryCompileExec3536241854.dir/build

  make.exe[1]: Entering directory
  `F:/P4V/brobins_sim_DEV/build_msys/Release/CMakeFiles/CMakeTmp'

  "/c/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report
  /F/P4V/brobins_sim_DEV/build_msys/Release/CMakeFiles/CMakeTmp/CMakeFiles 1

  The system cannot find the path specified.

  make.exe[1]: ***
  [CMakeFiles/cmTryCompileExec3536241854.dir/testCXXCompiler.cxx.obj] Error
  1

  make.exe[1]: Leaving directory
  `F:/P4V/brobins_sim_DEV/build_msys/Release/CMakeFiles/CMakeTmp'

  make.exe: *** [cmTryCompileExec3536241854/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:30 (project)

-- Configuring incomplete, errors occurred!
See also
"F:/P4V/brobins_sim_DEV/build_msys/Release/CMakeFiles/CMakeOutput.log".
See also
"F:/P4V/brobins_sim_DEV/build_msys/Release/CMakeFiles/CMakeError.log".

Any ideas what I should attempt next?

Thank you!

Ben
-- 

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