mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Clarify source definition
This commit is contained in:
parent
e946cd0519
commit
dcf9bc52c4
@ -275,6 +275,25 @@ if(CMAKE_VERSION VERSION_GREATER 3.1 AND NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "G
|
|||||||
set(USE_GENERIC_LAMBDAS ON)
|
set(USE_GENERIC_LAMBDAS ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Determine if we use lambdas
|
||||||
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
||||||
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
|
||||||
|
set(DO_NOT_USE_LAMBDAS ON)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
|
if(CLANG_VERSION VERSION_LESS "600")
|
||||||
|
set(DO_NOT_USE_LAMBDAS ON)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
|
||||||
|
set(DO_NOT_USE_LAMBDAS ON)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Determine if we are using make or ninja
|
# Determine if we are using make or ninja
|
||||||
if(CMAKE_MAKE_PROGRAM MATCHES "make")
|
if(CMAKE_MAKE_PROGRAM MATCHES "make")
|
||||||
set(CMAKE_MAKE_PROGRAM_PRETTY_NAME "make")
|
set(CMAKE_MAKE_PROGRAM_PRETTY_NAME "make")
|
||||||
|
@ -149,28 +149,10 @@ target_compile_definitions(algorithms_libs
|
|||||||
PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
|
PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
if(DO_NOT_USE_LAMBDAS)
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.1.1")
|
target_compile_definitions(algorithms_libs
|
||||||
target_compile_definitions(algorithms_libs
|
PRIVATE -DDO_NOT_USE_LAMBDAS=1
|
||||||
PRIVATE -DOLDCOMPILER=1
|
)
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
|
||||||
if(CLANG_VERSION VERSION_LESS "600")
|
|
||||||
target_compile_definitions(algorithms_libs
|
|
||||||
PRIVATE -DOLDCOMPILER=1
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
|
|
||||||
target_compile_definitions(algorithms_libs
|
|
||||||
PRIVATE -DOLDCOMPILER=1
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_property(TARGET algorithms_libs
|
set_property(TARGET algorithms_libs
|
||||||
|
@ -177,7 +177,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
if (input_type == output_type)
|
if (input_type == output_type)
|
||||||
{
|
{
|
||||||
size_t input_size = item_type_size(input_type);
|
size_t input_size = item_type_size(input_type);
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2,
|
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2,
|
||||||
std::placeholders::_3, input_size);
|
std::placeholders::_3, input_size);
|
||||||
#else
|
#else
|
||||||
@ -189,7 +189,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
{
|
{
|
||||||
if (output_type == "short")
|
if (output_type == "short")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_8i_16i, std::placeholders::_1,
|
return std::bind(convert_8i_16i, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -198,7 +198,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
}
|
}
|
||||||
else if (output_type == "float")
|
else if (output_type == "float")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_8i_32f, std::placeholders::_1,
|
return std::bind(convert_8i_32f, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -211,7 +211,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
if (output_type == "ibyte")
|
if (output_type == "ibyte")
|
||||||
{
|
{
|
||||||
size_t input_size = item_type_size(input_type);
|
size_t input_size = item_type_size(input_type);
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2,
|
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2,
|
||||||
std::placeholders::_3, input_size);
|
std::placeholders::_3, input_size);
|
||||||
#else
|
#else
|
||||||
@ -220,7 +220,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
}
|
}
|
||||||
if (output_type == "cshort" or output_type == "ishort")
|
if (output_type == "cshort" or output_type == "ishort")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_8ic_16ic, std::placeholders::_1,
|
return std::bind(convert_8ic_16ic, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -229,7 +229,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
}
|
}
|
||||||
else if (output_type == "gr_complex")
|
else if (output_type == "gr_complex")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_8ic_32fc, std::placeholders::_1,
|
return std::bind(convert_8ic_32fc, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -242,7 +242,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
if (output_type == "cbyte")
|
if (output_type == "cbyte")
|
||||||
{
|
{
|
||||||
size_t input_size = item_type_size(input_type);
|
size_t input_size = item_type_size(input_type);
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2,
|
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2,
|
||||||
std::placeholders::_3, input_size);
|
std::placeholders::_3, input_size);
|
||||||
#else
|
#else
|
||||||
@ -251,7 +251,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
}
|
}
|
||||||
else if (output_type == "cshort" or output_type == "ishort")
|
else if (output_type == "cshort" or output_type == "ishort")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_8i_16i, std::placeholders::_1,
|
return std::bind(convert_8i_16i, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -260,7 +260,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
}
|
}
|
||||||
else if (output_type == "gr_complex")
|
else if (output_type == "gr_complex")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_8i_32f, std::placeholders::_1,
|
return std::bind(convert_8i_32f, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -272,7 +272,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
{
|
{
|
||||||
if (output_type == "byte")
|
if (output_type == "byte")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_16i_8i, std::placeholders::_1,
|
return std::bind(convert_16i_8i, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -281,7 +281,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
}
|
}
|
||||||
else if (output_type == "float")
|
else if (output_type == "float")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_16i_32f, std::placeholders::_1,
|
return std::bind(convert_16i_32f, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -293,7 +293,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
{
|
{
|
||||||
if (output_type == "cbyte" or output_type == "ibyte")
|
if (output_type == "cbyte" or output_type == "ibyte")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_16ic_8ic, std::placeholders::_1,
|
return std::bind(convert_16ic_8ic, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -303,7 +303,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
if (output_type == "ishort")
|
if (output_type == "ishort")
|
||||||
{
|
{
|
||||||
size_t input_size = item_type_size(input_type);
|
size_t input_size = item_type_size(input_type);
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2,
|
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2,
|
||||||
std::placeholders::_3, input_size);
|
std::placeholders::_3, input_size);
|
||||||
#else
|
#else
|
||||||
@ -312,7 +312,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
}
|
}
|
||||||
else if (output_type == "gr_complex")
|
else if (output_type == "gr_complex")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_16ic_32fc, std::placeholders::_1,
|
return std::bind(convert_16ic_32fc, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -324,7 +324,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
{
|
{
|
||||||
if (output_type == "cbyte" or output_type == "ibyte")
|
if (output_type == "cbyte" or output_type == "ibyte")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_16i_8i, std::placeholders::_1,
|
return std::bind(convert_16i_8i, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -334,7 +334,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
if (output_type == "cshort")
|
if (output_type == "cshort")
|
||||||
{
|
{
|
||||||
size_t input_size = item_type_size(input_type);
|
size_t input_size = item_type_size(input_type);
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2,
|
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2,
|
||||||
std::placeholders::_3, input_size);
|
std::placeholders::_3, input_size);
|
||||||
#else
|
#else
|
||||||
@ -343,7 +343,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
}
|
}
|
||||||
else if (output_type == "gr_complex")
|
else if (output_type == "gr_complex")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_16i_32f, std::placeholders::_1,
|
return std::bind(convert_16i_32f, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -355,7 +355,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
{
|
{
|
||||||
if (output_type == "byte")
|
if (output_type == "byte")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_32f_8i, std::placeholders::_1,
|
return std::bind(convert_32f_8i, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -364,7 +364,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
}
|
}
|
||||||
else if (output_type == "short")
|
else if (output_type == "short")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_32f_16i, std::placeholders::_1,
|
return std::bind(convert_32f_16i, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -376,7 +376,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
{
|
{
|
||||||
if (output_type == "cbyte" or output_type == "ibyte")
|
if (output_type == "cbyte" or output_type == "ibyte")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_32fc_8ic, std::placeholders::_1,
|
return std::bind(convert_32fc_8ic, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
@ -385,7 +385,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
|
|||||||
}
|
}
|
||||||
else if (output_type == "cshort" or output_type == "ishort")
|
else if (output_type == "cshort" or output_type == "ishort")
|
||||||
{
|
{
|
||||||
#ifdef OLDCOMPILER
|
#ifdef DO_NOT_USE_LAMBDAS
|
||||||
return std::bind(convert_32fc_16ic, std::placeholders::_1,
|
return std::bind(convert_32fc_16ic, std::placeholders::_1,
|
||||||
std::placeholders::_2, std::placeholders::_3);
|
std::placeholders::_2, std::placeholders::_3);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user