[cmake-developers] [CMake 0014109]: Target property INCLUDE_DIRECTORIES is ignored in Visual Studio Generator

Mantis Bug Tracker mantis at public.kitware.com
Tue Apr 23 22:22:25 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14109 
====================================================================== 
Reported By:                Tim Patterson
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14109
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-04-23 22:22 EDT
Last Modified:              2013-04-23 22:22 EDT
====================================================================== 
Summary:                    Target property INCLUDE_DIRECTORIES is ignored in
Visual Studio Generator
Description: 
The INCLUDE_DIRECTORIES property on a target appears to be ignored by the VS
generator.  Setting the property on the directory works fine.

Steps to Reproduce: 
CMakeLists.txt:

PROJECT(SomeProject)
cmake_minimum_required(VERSION 2.8)

ADD_LIBRARY(HelloWorld HelloWorld.cpp)

IF(TRUE)
	# This doesn't work (despite being set correctly):
	SET_PROPERTY(TARGET HelloWorld APPEND PROPERTY INCLUDE_DIRECTORIES
"ThisIsATest")
	GET_TARGET_PROPERTY(_includeDirs HelloWorld INCLUDE_DIRECTORIES)
	MESSAGE("_includeDirs = ${_includeDirs}")
ELSE()
	# This works:
	SET_PROPERTY(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES "ThisIsATest")
ENDIF()

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-04-23 22:22 Tim Patterson  New Issue                                    
======================================================================




More information about the cmake-developers mailing list