From dce682258d141e2edaeb4fc701adfd875049a341 Mon Sep 17 00:00:00 2001 From: liuyujun Date: Thu, 8 Nov 2018 10:04:04 +0800 Subject: [PATCH] Force execute compile time --- libraries/eosiolib/name.hpp | 3 ++- modules/EosioWasmToolchain.cmake.in | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/eosiolib/name.hpp b/libraries/eosiolib/name.hpp index 8e1a007aff..e3d9cac2a4 100644 --- a/libraries/eosiolib/name.hpp +++ b/libraries/eosiolib/name.hpp @@ -218,5 +218,6 @@ namespace eosio { */ template inline constexpr eosio::name operator""_n() { - return eosio::name{std::string_view{eosio::detail::to_const_char_arr::value, sizeof...(Str)}}; + constexpr auto x = eosio::name{std::string_view{eosio::detail::to_const_char_arr::value, sizeof...(Str)}}; + return x; } diff --git a/modules/EosioWasmToolchain.cmake.in b/modules/EosioWasmToolchain.cmake.in index b60cd9ca4c..b42224029e 100644 --- a/modules/EosioWasmToolchain.cmake.in +++ b/modules/EosioWasmToolchain.cmake.in @@ -37,7 +37,6 @@ include_directories( macro(add_contract CONTRACT_NAME TARGET) add_executable( ${TARGET}.wasm ${ARGN} ) target_compile_options( ${TARGET}.wasm PUBLIC -abigen ) - set_target_properties( ${TARGET}.wasm PROPERTIES LINKER_LANGUAGE C ) get_target_property(BINOUTPUT ${TARGET}.wasm BINARY_DIR) target_compile_options( ${TARGET}.wasm PUBLIC -abigen_output=${BINOUTPUT}/${TARGET}.abi ) target_compile_options( ${TARGET}.wasm PUBLIC -contract ${CONTRACT_NAME} )