[CMake] Windows ifort problems, possible bug

Dunlavy, Daniel M dmdunla at sandia.gov
Tue Dec 4 13:15:48 EST 2007


Alin,

Have you checked that your environment is set properly for ifort? Can
you build from "cmd" or are you building from the shell provided with
the Intel compiler. You can also check the Environment Variables from
the System Control Panel?

Have you added the path to your ifort libraries to Windows-ifort.cmake?
>From my previous message, this is by including the following line to
that file: 

LINK_DIRECTORIES(<Path to "Lib" directory>)

Have you installed ifort in a directory path that does not contain
spaces?

Once I did those three things I was able to build using ifort ion
Windows.

--Danny

> -----Original Message-----
> From: cmake-bounces+dmdunla=sandia.gov at cmake.org 
> [mailto:cmake-bounces+dmdunla=sandia.gov at cmake.org] On Behalf 
> Of Alin M Elena
> Sent: Tuesday, December 04, 2007 10:59 AM
> To: cmake at cmake.org
> Subject: [CMake] Windows ifort problems, possible bug
> 
> Hi,
> 
> Thank you Alan.
> I have reduced the problem to a simpler one. I tend to think 
> that is a bug.
> It may be connected with the one found by Daniel Dunalvy.
> 
> If I create a fortran project with a single file. It 
> compiles, links and everything is ok.
> I have checked with nmake and Visual Studio 8 2005 generators 
> When I create a fortran project with two files it fails for 
> both generators
> with:
> Visual studio
> Error	1	error PRJ0019: A tool returned an error code 
> from "Building
> Fortran object test.obj"	hello	
> 
> PS C:\Users\Alin M Elena\testFortran> nmake
> 
> Microsoft (R) Program Maintenance Utility Version 
> 8.00.50727.762 Copyright (C) Microsoft Corporation.  All 
> rights reserved.
> 
> Scanning dependencies of target hello
> [ 50%] Building Fortran object CMakeFiles/hello.dir/constants.obj
> 'touch' is not recognized as an internal or external command, 
> operable program or batch file.
> NMAKE : fatal error U1077: 'touch' : return code '0x1'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft 
> Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft 
> Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft 
> Visual Studio 8\VC\BIN\nmake.exe"' : return code '0x2'
> Stop.
> 
> If I compile and link by hand in shell everything is ok.
> 
> Here is the listing of the files.
> 
> 
> 
> CMakeLists.txt
> 
> Project(hello Fortran)
> add_executable(hello
> constants.f90
> test.f90)
> 
> 
> test.f90
> program test
> use m_constants
> implicit none
> print *,one
> print *, "hello world"
> end program test
> 
> constants.f90
> module m_constants
> implicit none
> private
> integer, parameter, public :: one=1
> 
> end module m_constants
> 
> ____________________________________________________________________
> "...if the universities will not study useless subjects, who will?"
>                            G. F. Fitzgerald, Nature, 45/46, 
> 392 (1892) 
> ______________________________________________________________________
> Mr. Alin M. ELENA
> Atomistic Simulation Centre
> School of Mathematics and Physics
> Queen's University Belfast
> Office: +44 (0)28 9097 1428
> Fax: +44 (0)28 9097 5359
> http://titus.phy.qub.ac.uk/group/Alin/
> alin.elena at yahoo.co.uk
> alin.elena at qub.ac.uk
> ______________________________________________________________________
> 
> 
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
> 
> 



More information about the CMake mailing list