summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-18 13:43:20 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-03-18 13:43:20 (GMT)
commit1bcdc4db1bcfc75cf9813bc279840b975e74892d (patch)
tree4eafa010c6684bb866adbf55978305aad9976f03 /Modules
parentb7eb7e0f78f37b6a7dfc6f9f300286472b7f3499 (diff)
parent6a6e5d89b5665508276d65de4c82f0b4daa2dcfd (diff)
downloadCMake-1bcdc4db1bcfc75cf9813bc279840b975e74892d.zip
CMake-1bcdc4db1bcfc75cf9813bc279840b975e74892d.tar.gz
CMake-1bcdc4db1bcfc75cf9813bc279840b975e74892d.tar.bz2
Merge topic 'GenerateExportHeader-fix-name-leak'
6a6e5d89 GenerateExportHeader: Allow common NO_DEPRECATED_MACRO_NAME for multiple libs be5a8973 GenerateExportHeader: Do not define DEFINE_NO_DEPRECATED (#16022)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/GenerateExportHeader.cmake4
-rw-r--r--Modules/exportheader.cmake.in7
2 files changed, 7 insertions, 4 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index 4f4efbc..6389d30 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -341,7 +341,9 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
string(MAKE_C_IDENTIFIER ${STATIC_DEFINE} STATIC_DEFINE)
if(_GEH_DEFINE_NO_DEPRECATED)
- set(DEFINE_NO_DEPRECATED TRUE)
+ set(DEFINE_NO_DEPRECATED 1)
+ else()
+ set(DEFINE_NO_DEPRECATED 0)
endif()
if(_GEH_NO_DEPRECATED_MACRO_NAME)
diff --git a/Modules/exportheader.cmake.in b/Modules/exportheader.cmake.in
index 118de16..7cfbcbd 100644
--- a/Modules/exportheader.cmake.in
+++ b/Modules/exportheader.cmake.in
@@ -33,9 +33,10 @@
# define @DEPRECATED_MACRO_NAME@_NO_EXPORT @NO_EXPORT_MACRO_NAME@ @DEPRECATED_MACRO_NAME@
#endif
-#cmakedefine01 DEFINE_NO_DEPRECATED
-#if DEFINE_NO_DEPRECATED
-# define @NO_DEPRECATED_MACRO_NAME@
+#if @DEFINE_NO_DEPRECATED@ /* DEFINE_NO_DEPRECATED */
+# ifndef @NO_DEPRECATED_MACRO_NAME@
+# define @NO_DEPRECATED_MACRO_NAME@
+# endif
#endif
#endif