mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-14 10:19:56 -06:00
Autogen: Add a definitions test to the MocOnly test
This commit is contained in:
@@ -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\;\"" )
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user