[cmake-developers] [CMake 0014891]: CMake incorrectly handles path to gfortran compiler containing spaces
Mantis Bug Tracker
mantis at public.kitware.com
Fri Apr 18 14:13:59 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=14891
======================================================================
Reported By: vitaut
Assigned To:
======================================================================
Project: CMake
Issue ID: 14891
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-04-18 14:13 EDT
Last Modified: 2014-04-18 14:13 EDT
======================================================================
Summary: CMake incorrectly handles path to gfortran compiler
containing spaces
Description:
I use cmake_add_fortran_subdirectory to build a Fortran subproject with MinGW
gfortran as described in http://www.kitware.com/blog/home/post/231. 64-bit build
of MinGW obtained from http://mingw-w64.sourceforge.net/ is installed in the
default location "C:\Program
Files\mingw-builds\x64-4.8.1-posix-seh-rev5\mingw64". CMake correctly generates
Visual Studio solution and project files, but when running the build the
following error is reported:
CUSTOMBUILD : CMake error : your Fortran compiler: "C:/Program" was not found.
Please set CMAKE_Fortran_COMPILER to a valid compiler path or name.
[C:\fortran-test\SUB1_build.vcxproj]
CUSTOMBUILD : CMake error : Internal CMake error, TryCompile configure of cmake
failed [C:\fortran-test\SUB1_build.vcxproj]
-- Check for working Fortran compiler: C:/Program -- broken
See the attached log for the full output.
It seems that CMake is confused by space in the compiler path.
Steps to Reproduce:
1. Install MinGW from http://mingw-w64.sourceforge.net/ in "C:\Program Files".
2. Get a copy of the test repository:
git clone https://github.com/vitaut/fortran-test
3. Generate Visual Studio solution and project files:
cmake -G "Visual Studio 10 Win64" .
4. Try building the solution:
msbuild TEST.sln
5. Observe the error.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-04-18 14:13 vitaut New Issue
2014-04-18 14:13 vitaut File Added: build-log.txt
======================================================================
More information about the cmake-developers
mailing list