View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014891CMakeCMakepublic2014-04-18 14:132016-06-10 14:31
Reportervitaut 
Assigned ToBill Hoffman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
Platformx86_64 (amd64)OSWindowsOS Version7
Product VersionCMake 2.8.11.2 
Target VersionFixed in Version 
Summary0014891: cmake_add_fortran_subdirectory incorrectly handles path to gfortran compiler containing spaces
DescriptionI 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 Reproduce1. 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.
TagsNo tags attached.
Attached Filestxt file icon build-log.txt [^] (6,956 bytes) 2014-04-18 14:13 [Show Content]

 Relationships

  Notes
(0042539)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 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
2014-04-18 14:35 Brad King Assigned To => Bill Hoffman
2014-04-18 14:35 Brad King Status new => assigned
2014-04-18 14:36 Brad King Summary CMake incorrectly handles path to gfortran compiler containing spaces => cmake_add_fortran_subdirectory incorrectly handles path to gfortran compiler containing spaces
2016-06-10 14:29 Kitware Robot Note Added: 0042539
2016-06-10 14:29 Kitware Robot Status assigned => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team