[CMake] Fortran project fails for Release but works for Debug

Kelly (KT) Thompson kt at transpireinc.com
Fri Sep 26 17:57:03 EDT 2008


Hi,

I have a simple Fortran CMake project that fails to build for "Release"
build types but works for "Debug."  Can someone tell me what is wrong with
the following?

! file main.f90
program main
  print *, "Hello"
end program main

# CMakeLists.txt
cmake_minimum_required( VERSION 2.6 FATAL_ERROR )
project( f90bin Fortran )
add_executable( main main.f90 )
set_target_properties( main PROPERTIES LINKER_LANGUAGE Fortran )

> cmake c:\f90bin -G"Visual Studio 9 2008"
> devenv f90bin.sln /build Debug --> works
> devenv f90bin.sln /build Release --> Fails with "LINK : fatal error
LNK1561: entry point must be defined"

BTW - I am using Intel Visual Fortran 10.1 with Microsoft Visual Studio 2008
SP1 and CMake version 2.6-patch 2 RC-6

Any thoughts?

-kt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080926/b7b8d883/attachment.htm>


More information about the CMake mailing list