From 978a64049cb5667b1c8339913b63dd68738801c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 27 Aug 2018 22:13:33 +0200 Subject: [PATCH] Fix compatibility with C++98 --- include/evmc/evmc.h | 2 +- test/integration/compilation/CMakeLists.txt | 8 ++++++++ test/integration/compilation/compilation_test.cpp | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 test/integration/compilation/compilation_test.cpp diff --git a/include/evmc/evmc.h b/include/evmc/evmc.h index 4c0a838c12..489a1a18bf 100644 --- a/include/evmc/evmc.h +++ b/include/evmc/evmc.h @@ -447,7 +447,7 @@ enum evmc_storage_status /** * A storage item has been deleted: X -> 0. */ - EVMC_STORAGE_DELETED = 3, + EVMC_STORAGE_DELETED = 3 }; diff --git a/test/integration/compilation/CMakeLists.txt b/test/integration/compilation/CMakeLists.txt index 161873b6ee..62e0b31c93 100644 --- a/test/integration/compilation/CMakeLists.txt +++ b/test/integration/compilation/CMakeLists.txt @@ -9,3 +9,11 @@ set_target_properties(test-compile-c99 PROPERTIES C_STANDARD 99 C_EXTENSIONS OFF add_library(test-compile-c11 STATIC ${PROJECT_SOURCE_DIR}/include/evmc/evmc.h compilation_test.c) target_link_libraries(test-compile-c11 PRIVATE evmc) set_target_properties(test-compile-c11 PROPERTIES C_STANDARD 11 C_EXTENSIONS OFF) + +add_library(test-compile-cxx98 STATIC compilation_test.cpp) +target_link_libraries(test-compile-cxx98 PRIVATE evmc) +set_target_properties(test-compile-cxx98 PROPERTIES CXX_STANDARD 98 CXX_EXTENSIONS OFF) + +add_library(test-compile-cxx11 STATIC compilation_test.cpp) +target_link_libraries(test-compile-cxx11 PRIVATE evmc) +set_target_properties(test-compile-cxx11 PROPERTIES CXX_STANDARD 11 CXX_EXTENSIONS OFF) diff --git a/test/integration/compilation/compilation_test.cpp b/test/integration/compilation/compilation_test.cpp new file mode 100644 index 0000000000..15ab3fdd1e --- /dev/null +++ b/test/integration/compilation/compilation_test.cpp @@ -0,0 +1,8 @@ +/* EVMC: Ethereum Client-VM Connector API. + * Copyright 2018 The EVMC Authors. + * Licensed under the Apache License, Version 2.0. See the LICENSE file. + */ + +#include +#include +