![]() Adjust CMAKE_ECLIPSE_VERSION if this is wrong.ĭrwxr-xr-x 8 lindemann staff 272 Aug 29 20:07. Could not determine Eclipse version, assuming at least 3.6 (Helios). $ cmake -G "Eclipse CDT4 - Unix Makefiles". The following list is produced on a Mac OS X based Supported generators in CMake can be listed by running the -command Project files for a number of graphical development environments. If ( Fortran_COMPILER_NAME STREQUAL "gfortran" ) set ( CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -O3" ) set ( CMAKE_Fortran_FLAGS_DEBUG "-fno-f2c -O0 -g" ) elseif ( Fortran_COMPILER_NAME STREQUAL "ifort" ) set ( CMAKE_Fortran_FLAGS_RELEASE "-f77rtl -O3" ) set ( CMAKE_Fortran_FLAGS_DEBUG "-f77rtl -O0 -g" ) elseif ( Fortran_COMPILER_NAME STREQUAL "g77" ) set ( CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -O3 -m32" ) set ( CMAKE_Fortran_FLAGS_DEBUG "-fno-f2c -O0 -g -m32" ) else ( Fortran_COMPILER_NAME STREQUAL "gfortran" ) message ( "No optimized Fortran compiler flags are known, we just try -O2." ) set ( CMAKE_Fortran_FLAGS_RELEASE "-O2" ) set ( CMAKE_Fortran_FLAGS_DEBUG "-O0 -g" ) endif ( Fortran_COMPILER_NAME STREQUAL "gfortran" ) Generating project files for development environments ¶ĬMake is not limited to generating makefiles, it can also generate ![]() Build files have been written to: /Users/./simpleĬMakeCache.txt CMakeLists.txt cmake_install.cmakeĪs show in the above output, cmake, has generated a lot of files one of Checking whether /opt/local/bin/gfortran supports Fortran 90 - yes Checking whether /opt/local/bin/gfortran supports Fortran 90 Detecting Fortran compiler ABI info - done Check for working Fortran compiler: /opt/local/bin/gfortran - works Check for working Fortran compiler: /opt/local/bin/gfortran The Fortran compiler identification is GNU Check for working CXX compiler: /usr/bin/c++ - works Check for working CXX compiler: /usr/bin/c++ Check for working C compiler: /usr/bin/gcc - works Check for working C compiler: /usr/bin/gcc Checking whether C compiler supports OSX deployment target flag - yes Checking whether C compiler supports OSX deployment target flag Checking whether C compiler has -isysroot - yes Checking whether C compiler has -isysroot The CXX compiler identification is Clang 4.0.0 The C compiler identification is GNU 4.2.1 The first actual statement is usually -function defining This prevents the CMakeLists.txt file to be used by a Text files with special CMake statements in it. To use CMake, a CMakeLists.txt file has to be created. Makefiles and project files for most existing development environments.ĬMake works by parsing special files, CMakeLists.txt, and generating the CMake is a tool that can generate targeted This is often due to the fact that different OSĮnvironments needs to be handled in different ways and this has to be When projects become large the time needed for maintaining the build ![]() Gfortran mymodule.o myprog.o myutils.o -o myprogįor more advanced make file use, the CMake tool is a better tool. To enable this dependency an additional rule is added to our Mymodule.f90 needs the myutils.mod file created when myutils.f90 isĬompiled. To build this example, we need to build myutils.f90 first as the ![]() Self contained module without dependencies. Uses the myutils module in the myutils.f90 source ![]() TheĮasiest way of handling module dependencies are to explicitly express Please note that when using pattern rules the is not needed.Įven if the described makefile automatically can compile all sourceįiles, dependencies between Fortran 90 modules are not handled. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |