Fix #403 HAVE_${VAR} not passed to makefile (#404)

Add definition of ${VAR} to makefiles if specified as part of cmake
parameter.
This commit is contained in:
Jern-Kuan Leong 2017-06-16 21:46:11 +00:00 committed by Dominic Hamon
parent b8a2206fb2
commit 710c2b89d8
3 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,7 @@ Felix Homann <linuxaudio@showlabor.de>
Google Inc. Google Inc.
International Business Machines Corporation International Business Machines Corporation
Ismael Jimenez Martinez <ismael.jimenez.martinez@gmail.com> Ismael Jimenez Martinez <ismael.jimenez.martinez@gmail.com>
Jern-Kuan Leong <jernkuan@gmail.com>
Joao Paulo Magalhaes <joaoppmagalhaes@gmail.com> Joao Paulo Magalhaes <joaoppmagalhaes@gmail.com>
JianXiong Zhou <zhoujianxiong2@gmail.com> JianXiong Zhou <zhoujianxiong2@gmail.com>
Jussi Knuuttila <jussi.knuuttila@gmail.com> Jussi Knuuttila <jussi.knuuttila@gmail.com>

View File

@ -34,6 +34,7 @@ Eugene Zhuk <eugene.zhuk@gmail.com>
Evgeny Safronov <division494@gmail.com> Evgeny Safronov <division494@gmail.com>
Felix Homann <linuxaudio@showlabor.de> Felix Homann <linuxaudio@showlabor.de>
Ismael Jimenez Martinez <ismael.jimenez.martinez@gmail.com> Ismael Jimenez Martinez <ismael.jimenez.martinez@gmail.com>
Jern-Kuan Leong <jernkuan@gmail.com>
Joao Paulo Magalhaes <joaoppmagalhaes@gmail.com> Joao Paulo Magalhaes <joaoppmagalhaes@gmail.com>
JianXiong Zhou <zhoujianxiong2@gmail.com> JianXiong Zhou <zhoujianxiong2@gmail.com>
Jussi Knuuttila <jussi.knuuttila@gmail.com> Jussi Knuuttila <jussi.knuuttila@gmail.com>

View File

@ -22,6 +22,8 @@ function(cxx_feature_check FILE)
string(TOUPPER ${FILE} VAR) string(TOUPPER ${FILE} VAR)
string(TOUPPER "HAVE_${VAR}" FEATURE) string(TOUPPER "HAVE_${VAR}" FEATURE)
if (DEFINED HAVE_${VAR}) if (DEFINED HAVE_${VAR})
set(HAVE_${VAR} 1 CACHE INTERNAL "Feature test for ${FILE}" PARENT_SCOPE)
add_definitions(-DHAVE_${VAR})
return() return()
endif() endif()
message("-- Performing Test ${FEATURE}") message("-- Performing Test ${FEATURE}")