From 84711b2ec38f552b436f6707bcdaa3cf456f8e74 Mon Sep 17 00:00:00 2001 From: Marcel Walter Date: Tue, 27 Jun 2023 05:10:19 -0300 Subject: [PATCH] Fixed compilation issues on MSVC compilers (#612) --- experiments/experiments.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/experiments/experiments.hpp b/experiments/experiments.hpp index 979c3ca8d..8bc084cd3 100644 --- a/experiments/experiments.hpp +++ b/experiments/experiments.hpp @@ -30,6 +30,8 @@ \author Mathias Soeken */ +#pragma once + #include #include #include @@ -517,7 +519,11 @@ inline bool abc_cec_impl( Ntk const& ntk, std::string const& benchmark_fullpath std::array buffer; std::string result; +#if WIN32 + std::unique_ptr pipe( _popen( command.c_str(), "r" ), _pclose ); +#else std::unique_ptr pipe( popen( command.c_str(), "r" ), pclose ); +#endif if ( !pipe ) { throw std::runtime_error( "popen() failed" ); @@ -547,4 +553,4 @@ inline bool abc_cec( Ntk const& ntk, std::string const& benchmark ) return abc_cec_impl( ntk, benchmark_path( benchmark ) ); } -} // namespace experiments \ No newline at end of file +} // namespace experiments