Re: [CMake] Incremental linking and Intel fortan
Sorry for delay... I checked that setting CMAKE_EXE_LINKER_FLAGS without CACHE attribute doesnt make a change. But if I switched to NMake then all things started to work. Incremental linking is turned off, traceback works. Exactly the same CMakeLists.txt produces wrong project for VS. What do you think about different lines that I see in vfproj file? I mean LinkIncremental=1 and LinkIncremental=linkIncrementalNo. I searched the internet and found both options. For me CMake produces vfproj with 1 but Intel Fortran - with linkIncrementalNo... Thanks, Alexander 2012/9/4 Petr Kmoch petr.km...@gmail.com One more thing I noticed - CMAKE_EXE_LINKER_FLAGS is normally not a cache variable, and having both a cache and non-cache var of the same name can have weird consequences. Maybe try just setting it without CACHE STRING ... If that doesn't help, can you generate a different buildsystem (perhaps NMake) and see what the command line looks like there? Perhaps a flag turning incremental linking on comes from a different variable (there's a lot of cmake vars which make up the final command line). Petr On Mon, Sep 3, 2012 at 6:34 PM, Alexander Ivanov alexander.nik.iva...@gmail.com wrote: Hi Petr, Unfortunately it doesn't. I changed the sample as following but intel fortran ignores incremental linking setting. cmake_minimum_required(VERSION 2.8) project(TestF90 Fortran) set(CMAKE_EXE_LINKER_FLAGS /INCREMENTAL:NO CACHE STRING EXE_LINKER_FLAGS FORCE) add_executable(TestF90_EXE main.f90) Thanks, Alexander 2012/9/3 Petr Kmoch petr.km...@gmail.com Hi Alexander. CMAKE_EXE_LINKER_FLAGS and similar variables can only be modified after a call to PROJECT() (the PROJECT() calls sets them up to some defaults). See if this fixes your issue. Petr -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Incremental linking and Intel fortan
One more thing I noticed - CMAKE_EXE_LINKER_FLAGS is normally not a cache variable, and having both a cache and non-cache var of the same name can have weird consequences. Maybe try just setting it without CACHE STRING ... If that doesn't help, can you generate a different buildsystem (perhaps NMake) and see what the command line looks like there? Perhaps a flag turning incremental linking on comes from a different variable (there's a lot of cmake vars which make up the final command line). Petr On Mon, Sep 3, 2012 at 6:34 PM, Alexander Ivanov alexander.nik.iva...@gmail.com wrote: Hi Petr, Unfortunately it doesn't. I changed the sample as following but intel fortran ignores incremental linking setting. cmake_minimum_required(VERSION 2.8) project(TestF90 Fortran) set(CMAKE_EXE_LINKER_FLAGS /INCREMENTAL:NO CACHE STRING EXE_LINKER_FLAGS FORCE) add_executable(TestF90_EXE main.f90) Thanks, Alexander 2012/9/3 Petr Kmoch petr.km...@gmail.com Hi Alexander. CMAKE_EXE_LINKER_FLAGS and similar variables can only be modified after a call to PROJECT() (the PROJECT() calls sets them up to some defaults). See if this fixes your issue. Petr -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Incremental linking and Intel fortan
Hi Alexander. CMAKE_EXE_LINKER_FLAGS and similar variables can only be modified after a call to PROJECT() (the PROJECT() calls sets them up to some defaults). See if this fixes your issue. Petr On Fri, Aug 31, 2012 at 8:47 PM, Alexander Ivanov alexander.nik.iva...@gmail.com wrote: Hello all! I am trying to adopt cmake for fortran based project. This is my first CMakeLists.txt for fortran. CMAKE_MINIMUM_REQUIRED(VERSION 2.8) SET(CMAKE_EXE_LINKER_FLAGS /INCREMENTAL:NO CACHE STRING EXE_LINKER_FLAGS FORCE) PROJECT(TestF90 Fortran) ADD_EXECUTABLE (TestF90_EXE main.f90) main.f90 looks like the following program TestF90 implicit none integer :: I = 1 I = I / 0 end program TestF90 Actually I would like to use /traceback option of the Intel compiler and it requires to turn off incremental linking for the traceback. The above (I mean setting of CMAKE_EXE_LINKER_FLAGS) works well for the similar C project, but Intel fortran ignores the option. I noticed that TestF90.vfproj file contains different settings depending on what I put in CMAKE_EXE_LINKER_FLAGS: LinkIncremental=1 - for /INCREMENTAL:NO LinkIncremental=2 - for /INCREMENTAL:YES. Anyway linker property list shows Default. After some experiments I found that if I change TestF90.vfproj manually and put LinkIncremental=linkIncrementalNo then Intel fortran accepts the option. So how can I achieve the desirable behaviour? I use visual studio 2010, fortran 2011.9 and cmake 2.8.9. Thanks, Alexander -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Incremental linking and Intel fortan
Hi Petr, Unfortunately it doesn't. I changed the sample as following but intel fortran ignores incremental linking setting. cmake_minimum_required(VERSION 2.8) project(TestF90 Fortran) set(CMAKE_EXE_LINKER_FLAGS /INCREMENTAL:NO CACHE STRING EXE_LINKER_FLAGS FORCE) add_executable(TestF90_EXE main.f90) Thanks, Alexander 2012/9/3 Petr Kmoch petr.km...@gmail.com Hi Alexander. CMAKE_EXE_LINKER_FLAGS and similar variables can only be modified after a call to PROJECT() (the PROJECT() calls sets them up to some defaults). See if this fixes your issue. Petr -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake