summaryrefslogtreecommitdiffstats
path: root/Tests/Module
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-06-28 13:42:08 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-28 13:43:52 (GMT)
commit843402b04a72ec1f99f0f712c4eb73abbcb67cba (patch)
treea6c4fac3136b9d50a670d70ac62adb1341229383 /Tests/Module
parent4bbfea17510d25c950747c4b0f877e5d5b1f528e (diff)
downloadCMake-843402b04a72ec1f99f0f712c4eb73abbcb67cba.zip
CMake-843402b04a72ec1f99f0f712c4eb73abbcb67cba.tar.gz
CMake-843402b04a72ec1f99f0f712c4eb73abbcb67cba.tar.bz2
GenerateExportHeader: Add option to specify custom content
Diffstat (limited to 'Tests/Module')
-rw-r--r--Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt3
-rw-r--r--Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp4
2 files changed, 7 insertions, 0 deletions
diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt b/Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt
index c1be125..a057746 100644
--- a/Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt
+++ b/Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt
@@ -25,9 +25,12 @@ add_library(shared_variant SHARED ${lib_SRCS})
set_target_properties(shared_variant PROPERTIES DEFINE_SYMBOL SHARED_VARIANT_MAKEDLL)
add_library(static_variant ${lib_SRCS})
+set(MY_CUSTOM_CONTENT "#define MY_CUSTOM_CONTENT_ADDED")
+
generate_export_header(shared_variant
BASE_NAME libshared_and_static
PREFIX_NAME MYPREFIX_
+ CUSTOM_CONTENT_FROM_VARIABLE MY_CUSTOM_CONTENT
)
set_target_properties(static_variant PROPERTIES COMPILE_FLAGS -DLIBSHARED_AND_STATIC_STATIC_DEFINE)
diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp b/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
index 2764905..83b8f98 100644
--- a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
+++ b/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
@@ -1,6 +1,10 @@
#include "libshared_and_static.h"
+#ifndef MY_CUSTOM_CONTENT_ADDED
+# error "MY_CUSTOM_CONTENT_ADDED not defined!"
+#endif
+
int LibsharedAndStatic::libshared_and_static() const
{
return 0;