[cmake-developers] [CMake 0015750]: setting COMPILE_DEFINITIONS_<CONFIG> is broken

Mantis Bug Tracker mantis at public.kitware.com
Thu Sep 17 10:13:42 EDT 2015


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15750 
====================================================================== 
Reported By:                CarlPoirier
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15750
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-09-17 10:13 EDT
Last Modified:              2015-09-17 10:13 EDT
====================================================================== 
Summary:                    setting COMPILE_DEFINITIONS_<CONFIG> is broken
Description: 
Setting the compile definitions for a particular configuration does not work
using the following command, which should according to
http://www.cmake.org/Wiki/CMake_2.6_Notes:

set_property(TARGET ${PrjName0} PROPERTY COMPILE_DEFINITIONS_DEBUG SOMEDEFINE)

Steps to Reproduce: 
1. Unzip the included hello world project.
2. Run "cmake -G "Visual Studio 9 2008" .
3. Open the project in Visual Studio 2008.
4. Go to project properties -> C/C++ -> Preprocessor and see that the definition
did not apply.

Additional Information: 
Setting the compile definitions for all configurations does work, though:

set_property(TARGET ${PrjName0} PROPERTY COMPILE_DEFINITIONS SOMEDEFINE) 
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-09-17 10:13 CarlPoirier    New Issue                                    
2015-09-17 10:13 CarlPoirier    File Added: CMakeTest.zip                    
======================================================================



More information about the cmake-developers mailing list