[cmake-developers] [CMake 0014037]: target_compile_definitions empty $<CONFIGURATION> generator

Mantis Bug Tracker mantis at public.kitware.com
Fri Mar 22 12:07:06 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14037 
====================================================================== 
Reported By:                Andreas Stahl
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14037
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-03-22 18:07 WAST
Last Modified:              2013-03-22 18:07 WAST
====================================================================== 
Summary:                    target_compile_definitions empty $<CONFIGURATION>
generator
Description: 
I came across weird behaviour in the 2.8.11rc1. 

target_compile_definitions(test PUBLIC $<$<CONFIG:Debug>:TEST_DEBUG>
$<CONFIG:Debug> $<CONFIGURATION>)

Only adds "0" to the compile definitions in every Visual Studio configuration,
including "Debug", leading me to believe that $<CONFIGURATION> is not set
correctly. 

Steps to Reproduce: 
cmake_minimum_required(VERSION 2.8.11)
project(test)

file(WRITE test.cpp "#include <stdio.h>")

add_library(test test.cpp)

target_compile_definitions(test PUBLIC $<$<CONFIG:Debug>:TEST_DEBUG>
$<CONFIG:Debug> $<CONFIGURATION>)

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-03-22 18:07 Andreas Stahl  New Issue                                    
======================================================================




More information about the cmake-developers mailing list