From e878d6f2035b325e240652b75e222e107da467d5 Mon Sep 17 00:00:00 2001 From: merlinthered Date: Tue, 27 Sep 2016 08:40:10 +0200 Subject: [PATCH] Export BACKWARD_[...] CMake variables as cache variables If we do not export the variables set in BackwardMacros.cmake as cache variables, they will not be visible wherever add_backward() is called, and the macro will do nothing. Also, fix typo `BACKWARD_INCLUDE_DIR` -> `BACKWARD_INCLUDE_DIRS` --- BackwardMacros.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BackwardMacros.cmake b/BackwardMacros.cmake index ec5aac3..8bf054e 100644 --- a/BackwardMacros.cmake +++ b/BackwardMacros.cmake @@ -118,4 +118,7 @@ macro(add_backward target) set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${BACKWARD_DEFINITIONS}) set_property(TARGET ${target} APPEND PROPERTY LINK_LIBRARIES ${BACKWARD_LIBRARIES}) endmacro() -mark_as_advanced(BACKWARD_INCLUDE_DIR BACKWARD_DEFINITIONS BACKWARD_LIBRARIES) +set(BACKWARD_INCLUDE_DIRS ${BACKWARD_INCLUDE_DIRS} CACHE INTERNAL "BACKWARD_INCLUDE_DIRS") +set(BACKWARD_DEFINITIONS ${BACKWARD_DEFINITIONS} CACHE INTERNAL "BACKWARD_DEFINITIONS") +set(BACKWARD_LIBRARIES ${BACKWARD_LIBRARIES} CACHE INTERNAL "BACKWARD_LIBRARIES") +mark_as_advanced(BACKWARD_INCLUDE_DIRS BACKWARD_DEFINITIONS BACKWARD_LIBRARIES)