[cmake-developers] [CMake 0015922]: Unable to configure Fortan through minGW with Visual Studio 14
Mantis Bug Tracker
mantis at public.kitware.com
Sat Jan 16 20:49:14 EST 2016
The following issue has been SUBMITTED.
======================================================================
https://cmake.org/Bug/view.php?id=15922
======================================================================
Reported By: Alex Ghosh
Assigned To:
======================================================================
Project: CMake
Issue ID: 15922
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-01-16 20:49 EST
Last Modified: 2016-01-16 20:49 EST
======================================================================
Summary: Unable to configure Fortan through minGW with Visual
Studio 14
Description:
I am trying to compile a fortran/c++ code to build SNOPT for windows. I have
extracted all the C++ related issues and are still having problems with the core
Fortran compilation using Visual Studio and minGW. The sub-project is valid and
will configure and make a minGW makefile just fine. When I try to then use the
cmake_add_fortran_subdirectory() features, at the configuration level I receive
the error output shown in the additional information. All attempts for for an
win64 target.
Steps to Reproduce:
1) Install Visual Studio 2015 (tested with Enterprise, but also occured with VS
2013 Community)
2) Install mingw-64 from sourceforge
3) See the attached CMakeList for the root directory. Substitute any fortran
project for the sub-directory, which has a valid, functional CMakeLists.txt
project.
4) Attempt to configure.
Additional Information:
The Fortran compiler identification is unknown
The CXX compiler identification is MSVC 19.0.23506.0
Check for working Fortran compiler using: Visual Studio 14 2015 Win64
Check for working Fortran compiler using: Visual Studio 14 2015 Win64 -- broken
CMake Error at C:/Program Files
(x86)/CMake/share/cmake-3.4/Modules/CMakeTestFortranCompiler.cmake:54 (message):
The Fortran compiler "C:/mingw-64/mingw64/bin/gfortran.exe" is not able to
compile a simple test program.
It fails with the following output:
Change Dir: C:/snopt74/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/Microsoft Visual Studio
14.0/Common7/IDE/devenv.com" "CMAKE_TRY_COMPILE.sln" "/build" "Debug"
"/project" "cmTC_f832e"
Microsoft Visual Studio 2015 Version 14.0.24720.0.
Copyright (C) Microsoft Corp. All rights reserved.
Some errors occurred during migration. For more information, see the
migration report:
C:\snopt74\build\CMakeFiles\CMakeTmp\UpgradeLog.htm
The operation could not be completed
Use:
devenv [solutionfile | projectfile | anyfile.ext] [switches]
The first argument for devenv is usually a solution file or project file.
You can also use any other file as the first argument if you want to have
the
file open automatically in an editor. When you enter a project file, the
IDE
looks for an .sln file with the same base name as the project file in the
parent directory for the project file. If no such .sln file exists, then
the
IDE looks for a single .sln file that references the project. If no such
single
.sln file exists, then the IDE creates an unsaved solution with a default
.sln
file name that has the same base name as the project file.
Command line builds:
devenv solutionfile.sln /build [ solutionconfig ] [ /project
projectnameorfile [ /projectconfig name ] ]
Available command line switches:
/Build Builds the solution or project with the specified solution
configuration. For example "Debug". If multiple platforms
are possible, the configuration name must be enclosed in quotes
and contain platform name. For example: "Debug|Win32".
/Clean Deletes build outputs.
/Command Starts the IDE and executes the command.
/Deploy Builds and then deploys the specified build configuration.
/Edit Opens the specified files in a running instance of this
application. If there are no running instances, it will
start a new instance with a simplified window layout.
/LCID Sets the default language in the IDE for the UI.
/Log Logs IDE activity to the specified file for troubleshooting.
/NoVSIP Disables the VSIP developer's license key for VSIP testing.
/Out Appends the build log to a specified file.
/Project Specifies the project to build, clean, or deploy.
Must be used with /Build, /Rebuild, /Clean, or /Deploy.
/ProjectConfig Overrides the project configuration specified in the
solution
configuration. For example "Debug". If multiple platforms are
possible, the configuration name must be enclosed in quotes
and contain platform name. For example: "Debug|Win32".
Must be used with /Project.
/Rebuild Cleans and then builds the solution or project with the
specified configuration.
/ResetSettings Restores the IDE's default settings, optionally resets to
the specified VSSettings file.
/ResetSkipPkgs Clears all SkipLoading tags added to VSPackages.
/Run Compiles and runs the specified solution.
/RunExit Compiles and runs the specified solution then closes the IDE.
/SafeMode Launches the IDE in safe mode loading minimal windows.
/Upgrade Upgrades the project or the solution and all projects in it.
A backup of these files will be created as appropriate. Please
see Help on 'Visual Studio Conversion Wizard' for more
information on the backup process.
Product-specific switches:
/componentsDiff Compares two component folders. Requires three arguments:
OptionalTfsServerCollectionUri SourceVersionedServerFolderPath
TargetVersionedServerFolderPath
If OptionalTfsServerCollectionUri is not provided, then an
attempt is made to use the current TFS project collection.
/debugexe Open the specified executable to be debugged. The remainder of
the command line is passed to this executable as its arguments.
/diff Compares two files. Takes four parameters:
SourceFile, TargetFile, SourceDisplayName(optional),
TargetDisplayName(optional)
/openProjects /scc:git Opens committed project from git.
Arguments:
/repositoryUrl (/repo):<RequiredRepositoryUrl>
/commitId (/id):<RequiredCommitId>
/project:<RequiredProjectItemPath>
/solution (/sln):<OptionalSolutionItemPath>
/displayId:<OptionalCommitDisplayId>
/timestamp:<OptionalCommitTimestamp>
/comment:<OptionalCommitComment>
/author:<OptionalCommitAuthor>
/openProjects /scc:tfs Opens versioned project from tfs.
Arguments:
/collection (/col):<OptionalTfsServerCollectionUri>
/version:<RequiredTfsVersionSpec>
/project:<RequiredProjectServerItemPath>
/solution (/sln):<OptionalSolutionServerItemPath>
If OptionalTfsServerCollectionUri is not provided, then an
attempt is made to use the current TFS project collection.
/TfsLink Opens Team Explorer and launches a viewer for the
provided artifact URI if one is registered.
/useenv Use PATH, INCLUDE, LIBPATH, and LIB environment variables
instead of IDE paths for VC++ builds.
To attach the debugger from the command line, use:
VsJITDebugger.exe -p <pid>
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:8 (project)
Configuring incomplete, errors occurred!
See also "C:/snopt74/build/CMakeFiles/CMakeOutput.log".
See also "C:/snopt74/build/CMakeFiles/CMakeError.log".
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-01-16 20:49 Alex Ghosh New Issue
2016-01-16 20:49 Alex Ghosh File Added: CMakeLists.txt
======================================================================
More information about the cmake-developers
mailing list