View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012220CMakeCMakepublic2011-05-24 08:282011-10-03 09:54
ReporterMagnus Osterlind 
Assigned ToDavid Cole 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product VersionCMake 2.8.4 
Target VersionFixed in VersionCMake 2.8.4 
Summary0012220: /INCREMENTAL flag interferes with include directory parsing for Visual Studio 2010
DescriptionThe /INCREMENTAL flag will incorrectly by identified and parsed as an include directory (/I), so the generated project file will contain a <AdditionalIncludeDirectories>NCREMENTAL</AdditionalIncludeDirectories> tag.
Steps To Reproduce1) Create a CMakeLists.txt containing an /INCREMENTAL flag, ex:

---
cmake_minimum_required (VERSION 2.6)
project (Tutorial)
SET(CMAKE_CXX_FLAGS_DEBUG "/INCREMENTAL")
add_executable(Tutorial tutorial.cxx)
---

2) Run cmake with Visual Studio 2010 as the generator.
Additional InformationAs far as I can tell, include directories as separated from the /I switch with a space, so I solved this locally by including a space as part of the AdditionalIncludeDirectories rule in cmVS10CLFlagTable.h.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0026575)
David Cole (manager)
2011-05-24 11:58
edited on: 2011-05-24 11:59

This is not really a bug in CMake. You are trying to use /INCREMENTAL as a compiler flag, but in reality, it is a linker flag.

Try one of these instead (for exes, modules and shared libs, respectively):

  set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/INCREMENTAL")
  set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "/INCREMENTAL")
  set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "/INCREMENTAL")

(0027505)
David Cole (manager)
2011-10-03 09:54

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2011-05-24 08:28 Magnus Osterlind New Issue
2011-05-24 11:56 David Cole Assigned To => David Cole
2011-05-24 11:56 David Cole Status new => assigned
2011-05-24 11:58 David Cole Note Added: 0026575
2011-05-24 11:58 David Cole Status assigned => resolved
2011-05-24 11:58 David Cole Fixed in Version => CMake 2.8.4
2011-05-24 11:58 David Cole Resolution open => no change required
2011-05-24 11:59 David Cole Note Edited: 0026575
2011-10-03 09:54 David Cole Note Added: 0027505
2011-10-03 09:54 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team