mirror of
https://github.com/falk-werner/webfuse
synced 2024-10-27 20:34:10 +00:00
fix: set C/C++ versions to make unit tests compile on systems where gnu++11 (or higher) is not default
This commit is contained in:
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')
|
without_tests = get_option('without_tests')
|
||||||
|
|
||||||
@ -96,7 +97,7 @@ pkg_config.generate(
|
|||||||
|
|
||||||
if not without_tests
|
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'])
|
gmock_main_dep = dependency('gmock_main', version: '>=1.10.0', fallback: ['gtest', 'gmock_main_dep'])
|
||||||
|
|
||||||
fscheck = executable('fs_check',
|
fscheck = executable('fs_check',
|
||||||
|
@ -145,7 +145,7 @@ public:
|
|||||||
lws_cancel_service(context);
|
lws_cancel_service(context);
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
|
||||||
convar.wait_for(lock, TIMEOUT, [&]() {
|
convar.wait_for(lock, TIMEOUT, [&]() {
|
||||||
return (conn_state != connection_state::connecting);
|
return (conn_state != connection_state::connecting);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ public:
|
|||||||
lws_cancel_service(context);
|
lws_cancel_service(context);
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
|
||||||
convar.wait_for(lock, TIMEOUT, [&]() {
|
convar.wait_for(lock, TIMEOUT, [&]() {
|
||||||
return (conn_state != connection_state::disconnecting);
|
return (conn_state != connection_state::disconnecting);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ public:
|
|||||||
{
|
{
|
||||||
std::string result_text = handler_.Invoke(wf_impl_json_string_get(method), params);
|
std::string result_text = handler_.Invoke(wf_impl_json_string_get(method), params);
|
||||||
if (result_text.empty()) { throw std::runtime_error("empty"); }
|
if (result_text.empty()) { throw std::runtime_error("empty"); }
|
||||||
response << "\"result\": " << result_text;
|
response << "\"result\": " << result_text;
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
@ -351,7 +351,7 @@ private:
|
|||||||
if (nullptr != wsi)
|
if (nullptr != wsi)
|
||||||
{
|
{
|
||||||
lws_callback_on_writable(wsi);
|
lws_callback_on_writable(wsi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -364,14 +364,14 @@ private:
|
|||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(mutex);
|
std::unique_lock<std::mutex> lock(mutex);
|
||||||
|
|
||||||
command command = command::run;
|
command actual_command = command::run;
|
||||||
if (!commands.empty())
|
if (!commands.empty())
|
||||||
{
|
{
|
||||||
command = commands.front();
|
actual_command = commands.front();
|
||||||
commands.pop();
|
commands.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
return command;
|
return actual_command;
|
||||||
}
|
}
|
||||||
|
|
||||||
lws * wsi_;
|
lws * wsi_;
|
||||||
@ -424,4 +424,4 @@ std::string WsClient::Invoke(std::string const & message)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user