diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2018-11-13 12:05:09 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2018-11-14 18:21:03 (GMT) |
commit | 83bbfb1d53077176af86d637f713652e3ee01198 (patch) | |
tree | 6b5d14909177349ce444ff27d02f40c4f32fb24c /Tests/QtAutogen | |
parent | 01d5e5c460a2a9cb3962990f8ef278389254f30a (diff) | |
download | CMake-83bbfb1d53077176af86d637f713652e3ee01198.zip CMake-83bbfb1d53077176af86d637f713652e3ee01198.tar.gz CMake-83bbfb1d53077176af86d637f713652e3ee01198.tar.bz2 |
Autogen: Add a definitions test to the MocOnly test
Diffstat (limited to 'Tests/QtAutogen')
-rw-r--r-- | Tests/QtAutogen/MocOnly/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/QtAutogen/MocOnly/main.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Tests/QtAutogen/MocOnly/CMakeLists.txt b/Tests/QtAutogen/MocOnly/CMakeLists.txt index a37a2ae..5377728 100644 --- a/Tests/QtAutogen/MocOnly/CMakeLists.txt +++ b/Tests/QtAutogen/MocOnly/CMakeLists.txt @@ -13,3 +13,5 @@ add_executable(mocOnly ) set_property(TARGET mocOnly PROPERTY AUTOMOC ON) target_link_libraries(mocOnly ${QT_LIBRARIES}) +# Add compile definitions with unusual characters +target_compile_definitions(mocOnly PUBLIC "TOKEN=\"hello\;\"" ) diff --git a/Tests/QtAutogen/MocOnly/main.cpp b/Tests/QtAutogen/MocOnly/main.cpp index 1611f97..b83b806 100644 --- a/Tests/QtAutogen/MocOnly/main.cpp +++ b/Tests/QtAutogen/MocOnly/main.cpp @@ -2,6 +2,7 @@ #include "IncB.hpp" #include "StyleA.hpp" #include "StyleB.hpp" +#include <iostream> int main(int argv, char** args) { @@ -10,5 +11,8 @@ int main(int argv, char** args) IncA incA; IncB incB; - return 0; + // Test the TOKEN definition passed on the command line + std::string token(TOKEN); + std::cout << "std::string(TOKEN): \"" << token << "\"\n"; + return (token == "hello;") ? 0 : -1; } |