diff options
author | Stefan Radomski <github@mintwerk.de> | 2016-10-25 12:29:12 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2016-10-25 12:29:12 (GMT) |
commit | 42ded335a90632a5f7a18a26f2727d149afb0511 (patch) | |
tree | 3949692d62175fa742238e55026f97cfabdc2f48 | |
parent | e8998364a65c8242663606fd43796b656f490fe6 (diff) | |
download | uscxml-42ded335a90632a5f7a18a26f2727d149afb0511.zip uscxml-42ded335a90632a5f7a18a26f2727d149afb0511.tar.gz uscxml-42ded335a90632a5f7a18a26f2727d149afb0511.tar.bz2 |
Trying to fix the build on all platforms
-rw-r--r-- | src/uscxml/plugins/datamodel/promela/PromelaParser.cpp | 3 | ||||
-rw-r--r-- | test/CMakeLists.txt | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp b/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp index 15eacee..32fbc13 100644 --- a/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp +++ b/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp @@ -22,6 +22,7 @@ #include "uscxml/messages/Event.h" #include <iostream> +#include <string.h> // memcpy struct yy_buffer_state; typedef yy_buffer_state *YY_BUFFER_STATE; @@ -84,7 +85,7 @@ void PromelaParser::init(const std::string& expr) { parseInCompound = 0; input_length = expr.length() + 2; // plus some zero terminators input = (char*) calloc(1, input_length); - std::memcpy(input, expr.c_str(), expr.length()); + memcpy(input, expr.c_str(), expr.length()); promela_lex_init(&scanner); // promela_assign_set_extra(ast, &scanner); diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b0c5114..da70494 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -40,8 +40,11 @@ file(GLOB_RECURSE USCXML_WRAPPERS ) USCXML_TEST_COMPILE(NAME test-bindings LABEL general/test-bindings FILES ${USCXML_WRAPPERS} src/test-bindings.cpp) -USCXML_TEST_COMPILE(NAME test-promela-parser LABEL general/test-promela-parser FILES src/test-promela-parser.cpp) -target_link_libraries(test-promela-parser uscxml_transform) +if (NOT MSVC) + # MSVC does not like to redefine 'protected' + USCXML_TEST_COMPILE(NAME test-promela-parser LABEL general/test-promela-parser FILES src/test-promela-parser.cpp) + target_link_libraries(test-promela-parser uscxml_transform) +endif() # the one binary to test for pass / fail final states add_executable(test-state-pass src/test-state-pass.cpp ${GETOPT_FILES}) |