<div>Hello all!</div><div> </div><div>I am trying to adopt cmake for fortran based project. This is my first CMakeLists.txt for </div><div>fortran.</div><div> </div><div>CMAKE_MINIMUM_REQUIRED(VERSION 2.8)<br>SET(CMAKE_EXE_LINKER_FLAGS &quot;/INCREMENTAL:NO&quot; <br>
    CACHE STRING &quot;EXE_LINKER_FLAGS&quot; FORCE)<br>PROJECT(TestF90 Fortran)<br>ADD_EXECUTABLE (TestF90_EXE main.f90)</div><div> </div><div>main.f90 looks like the following</div><div> </div><div>program TestF90<br>    implicit none<br>
    integer :: I = 1<br>    I = I / 0</div><div>end program TestF90</div><div><br>Actually I would like to use /traceback option of the Intel compiler and it requires to turn off </div><div>incremental linking for the traceback. The above (I mean setting of CMAKE_EXE_LINKER_FLAGS) </div>
<div>works well for the similar C project, but Intel fortran ignores the option. I noticed that TestF90.vfproj </div><div>file contains different settings depending on what I put in CMAKE_EXE_LINKER_FLAGS: </div><div>LinkIncremental=&quot;1&quot; - for &quot;/INCREMENTAL:NO&quot; </div>
<div>LinkIncremental=&quot;2&quot; - for &quot;/INCREMENTAL:YES&quot;. </div><div> </div><div>Anyway linker property list shows &quot;Default&quot;. After some experiments I found that if I change </div><div>TestF90.vfproj manually and put LinkIncremental=&quot;linkIncrementalNo&quot; then Intel fortran accepts </div>
<div>the option.</div><div> </div><div>So how can I achieve the desirable behaviour?</div><div> </div><div>I use visual studio 2010, fortran 2011.9 and cmake 2.8.9.</div><div> </div><div>Thanks,</div><div>Alexander </div>