fix: set C/C++ versions to make unit tests compile on systems where gnu++11 (or higher) is not default

pull/94/head
Falk Werner 4 years ago
parent f1a910b14f
commit 77ede52c92

@ -1,4 +1,5 @@
project('webfuse', 'c', 'cpp', version: '0.7.0', license: 'LGPL-3.0+')
project('webfuse', 'c', 'cpp', version: '0.7.0', license: 'LGPL-3.0+',
default_options: ['c_std=gnu99', 'cpp_std=gnu++14'])
without_tests = get_option('without_tests')
@ -96,7 +97,7 @@ pkg_config.generate(
if not without_tests
gtest_dep = dependency('gtest', version: '>=1.10.0', fallback: ['gtest', 'gtest_dep'])
gtest_dep = dependency('gtest', version: '>=1.10.0', fallback: ['gtest', 'gtest_dep'])
gmock_main_dep = dependency('gmock_main', version: '>=1.10.0', fallback: ['gtest', 'gmock_main_dep'])
fscheck = executable('fs_check',

@ -145,7 +145,7 @@ public:
lws_cancel_service(context);
lock.lock();
convar.wait_for(lock, TIMEOUT, [&]() {
convar.wait_for(lock, TIMEOUT, [&]() {
return (conn_state != connection_state::connecting);
});
@ -162,7 +162,7 @@ public:
lws_cancel_service(context);
lock.lock();
convar.wait_for(lock, TIMEOUT, [&]() {
convar.wait_for(lock, TIMEOUT, [&]() {
return (conn_state != connection_state::disconnecting);
});
@ -239,7 +239,7 @@ public:
{
std::string result_text = handler_.Invoke(wf_impl_json_string_get(method), params);
if (result_text.empty()) { throw std::runtime_error("empty"); }
response << "\"result\": " << result_text;
response << "\"result\": " << result_text;
}
catch (...)
{
@ -351,7 +351,7 @@ private:
if (nullptr != wsi)
{
lws_callback_on_writable(wsi);
}
}
}
break;
default:
@ -364,14 +364,14 @@ private:
{
std::unique_lock<std::mutex> lock(mutex);
command command = command::run;
command actual_command = command::run;
if (!commands.empty())
{
command = commands.front();
actual_command = commands.front();
commands.pop();
}
return command;
return actual_command;
}
lws * wsi_;
@ -424,4 +424,4 @@ std::string WsClient::Invoke(std::string const & message)
}
}
}

Loading…
Cancel
Save