diff options
author | Brad King <brad.king@kitware.com> | 2016-06-29 13:07:33 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-06-29 13:07:33 (GMT) |
commit | cb93dc048f80d2724fa22881327d92a4b7e3f503 (patch) | |
tree | bb191995ef48b708e7c17ef94c72483b1126a2ef /Tests | |
parent | db4ba61f3974258ad972a1594ee7b0d5b6f7a68c (diff) | |
parent | 843402b04a72ec1f99f0f712c4eb73abbcb67cba (diff) | |
download | CMake-cb93dc048f80d2724fa22881327d92a4b7e3f503.zip CMake-cb93dc048f80d2724fa22881327d92a4b7e3f503.tar.gz CMake-cb93dc048f80d2724fa22881327d92a4b7e3f503.tar.bz2 |
Merge topic 'GenerateExportHeader-custom-content'
843402b0 GenerateExportHeader: Add option to specify custom content
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Module/GenerateExportHeader/lib_shared_and_static/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp | 4 |
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; |