[CMake] pgf90 error
John Vines (CISD/CIV)
jvines at arl.army.mil
Fri Nov 20 10:11:07 EST 2009
I am trying to compile a simple fortran "Hello World!" program with the
Portland Group compilers (version 8.0) and am running in to a problems.
I am using with CMake (ver 2.8.0-rc5).
My helloworld.f90 code:
program HelloWorldF90
write(*,*) "Greeting, Hello World!"
end program HelloWorldF90
My CMakeLists.txt file:
cmake_minimum_required(VERSION 2.6)
project(HelloWorldFortran Fortran)
add_executable(HelloWorld helloworld.f90)
Using the command line, ( pgf90 helloworld.f90 -o helloworld-f90-pgi ),
the program compiles without issue. It runs and prints the text as
expected.
Using CMake I get the following error:
CMake Error at
/mnt/gpfs/usrcta/CSE.111809/Release/cmake-2.8.0.5/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:38
(MESSAGE):
The Fortran compiler "/opt/compiler/pgi/linux86-64/8.0/bin/pgf90" is not
able to compile a simple test program.
It fails with the following output:
Change Dir:
/usr/people/jvines/Devel/CoreXMDDevel10/Tests/HelloWorld/build/CMakeFiles/CMakeTmp
Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory
`/mnt/gpfs/usrpeople/jvines/Devel/CoreXMDDevel10/Tests/HelloWorld/build/CMakeFiles/CMakeTmp'
/mnt/gpfs/usrcta/CSE.111809/Release/cmake-2.8.0.5/bin/cmake -E
cmake_progress_report
/usr/people/jvines/Devel/CoreXMDDevel10/Tests/HelloWorld/build/CMakeFiles/CMakeTmp/CMakeFiles
1
Building Fortran object
CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o
/opt/compiler/pgi/linux86-64/8.0/bin/pgf90 -o
CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o -c
/usr/people/jvines/Devel/CoreXMDDevel10/Tests/HelloWorld/build/CMakeFiles/CMakeTmp/testFortranCompiler.f
Linking Fortran executable cmTryCompileExec
/mnt/gpfs/usrcta/CSE.111809/Release/cmake-2.8.0.5/bin/cmake -E
cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
/opt/compiler/pgi/linux86-64/8.0/bin/pgf90
CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o -o
cmTryCompileExec
-rdynamic
pgf90-Error-Unknown switch: -rdynamic
gmake[1]: *** [cmTryCompileExec] Error 1
gmake[1]: Leaving directory
`/mnt/gpfs/usrpeople/jvines/Devel/CoreXMDDevel10/Tests/HelloWorld/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
What am I missing???
Thanks in advance,
John
CMakeLists.txt:2 (project)
More information about the CMake
mailing list