[CMake] Using CMake with ifort compiler
Vivek Venugopal
vivek.v80 at gmail.com
Wed May 2 11:38:52 EDT 2012
I am using CMake 2.8.7 on a Linux machine with Intel 11.0 compilers. I am
trying to use CMake for the first time as I would like to build this
project on both Windows and Linux machines.
I though of using a simple approach first and used a standard Hello World
example: My src/HelloWorld.f90:
!Test helloworld in Fortran using Cmake
program hello
print *, "Hello World!"
end program hello
My main CMakeLists.txt:
# States that CMake required version must be greater than 2.8.7
cmake_minimum_required(VERSION 2.8.7)
enable_language (Fortran)
project(helloworld Fortran)
add_subdirectory(src)
SET_TARGET_PROPERTIES(helloworld PROPERTIES LINKER_LANGUAGE FORTRAN)
My src/CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.7)
# Include the directory itself as a path to include directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# For a large number of source files you can create it in a simpler way
# using file() function:
file(GLOB helloworld_SOURCES *.f90)
I still get an error which says CMAKE_FORTRAN_LINK_EXECUTABLE variable
missing. I looked at Abinader's CMake
tutorial#1<http://www.abinader.com.br/bruno/how-cmake-simplifies-the-build-process-part-1-basic-build-system/>,
but haven't had success so far.
any suggestions?? Thanks in advance !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120502/0fee44b3/attachment-0001.htm>
More information about the CMake
mailing list