From 42ded335a90632a5f7a18a26f2727d149afb0511 Mon Sep 17 00:00:00 2001 From: Stefan Radomski Date: Tue, 25 Oct 2016 14:29:12 +0200 Subject: Trying to fix the build on all platforms --- src/uscxml/plugins/datamodel/promela/PromelaParser.cpp | 3 ++- 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 +#include // 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}) -- cgit v0.12