mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Fix for old gcc
This commit is contained in:
parent
771fbf1365
commit
026e0f5c1b
@ -74,6 +74,21 @@ if(has_rotl)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(USE_GENERIC_LAMBDAS)
|
||||||
|
set(has_generic_lambdas HAS_GENERIC_LAMBDA=1)
|
||||||
|
set(no_has_generic_lambdas HAS_GENERIC_LAMBDA=0)
|
||||||
|
target_compile_definitions(telemetry_decoder_gr_blocks
|
||||||
|
PRIVATE
|
||||||
|
"$<$<COMPILE_FEATURES:cxx_generic_lambdas>:${has_generic_lambdas}>"
|
||||||
|
"$<$<NOT:$<COMPILE_FEATURES:cxx_generic_lambdas>>:${no_has_generic_lambdas}>"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(telemetry_decoder_gr_blocks
|
||||||
|
PRIVATE
|
||||||
|
-DHAS_GENERIC_LAMBDA=0
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CLANG_TIDY)
|
if(ENABLE_CLANG_TIDY)
|
||||||
if(CLANG_TIDY_EXE)
|
if(CLANG_TIDY_EXE)
|
||||||
set_target_properties(telemetry_decoder_gr_blocks
|
set_target_properties(telemetry_decoder_gr_blocks
|
||||||
|
@ -39,8 +39,16 @@ namespace my_rotl = std;
|
|||||||
#else
|
#else
|
||||||
namespace my_rotl
|
namespace my_rotl
|
||||||
{
|
{
|
||||||
auto rotl = [](auto x, auto n) { return (((x) << (n)) ^ ((x) >> (32 - (n)))); }; // Used in the parity check algorithm
|
#ifndef _rotl
|
||||||
}
|
#if HAS_GENERIC_LAMBDA
|
||||||
|
auto rotl = [](auto x, auto n) { return (((x) << (n)) ^ ((x) >> (32 - (n)))); };
|
||||||
|
#else
|
||||||
|
#define rotl(X, N) (((X) << (N)) ^ ((X) >> (32 - (N))))
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define rotl _rotl
|
||||||
|
#endif
|
||||||
|
} // namespace my_rotl
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user