On 2007-12-04 12:27-0000 Alin M Elena wrote:
Hi,I try to compile a simple fortran project with cmake, intel fortran compiler and nmake. However I get the following error nmake Scanning dependencies of target print [ 25%] Building Fortran object CMakeFiles/print.dir/source/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. Here is the CMakeLists.txt PROJECT(Hello Fortran) ########################## ###source files set(target_name hell) set(src_dir source) ########################## set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) add_library(print ${src_dir}/constants.f90 ${src_dir}/print.f90 ) add_executable(${target_name} ${src_dir}/constants.f90 ${src_dir}/test.f90 ) ## sets the linking link_directories (${LIBRARY_OUTPUT_PATH}) target_link_libraries(${target_name} print) you can get all files for the project from here. http://titus.phy.qub.ac.uk/group/Alin/hello.rar Any thoughts?
First, I have changed the subject line and got rid of the complete digest.... Second, I suggest you try some variations to help figure this out. For example, does your simple fortran project work for nmake and a different fortran compiler? Does your simple fortran project work for ifort and a non-nmake generator? Does an equivalent C project work for nmake? Third, the behaviour of ifort on windows is controlled by $prefix/share/cmake-2.4/Modules/Platform/Windows-ifort.cmake . You may want to play with that file (and compare it with the equivalent Platform file used in the above variations) to see what is causing the nmake problem. Sorry these thoughts are pretty general, but they are the best help I can give you since I don't have access to windows or nmake. Good luck! Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
