diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-01-04 10:16:23 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-01-04 10:16:23 -0800 |
commit | 3d32b5e9afd1b2df89d769d5eb399ac5b18399ec (patch) | |
tree | e528e3525f045a70138e4a35fcdd88791f06a634 /gr-dtv | |
parent | 83c0b7c0651a1959ac118c67154fce50541755df (diff) |
dtv: cmake: Minor whitespace and formatting fixes
- Reduced line lengths
- Used lower-case CMake commands
- Fixed indentation
Diffstat (limited to 'gr-dtv')
-rw-r--r-- | gr-dtv/lib/CMakeLists.txt | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/gr-dtv/lib/CMakeLists.txt b/gr-dtv/lib/CMakeLists.txt index 61abd10dc2..1cc39a7f9f 100644 --- a/gr-dtv/lib/CMakeLists.txt +++ b/gr-dtv/lib/CMakeLists.txt @@ -110,29 +110,32 @@ list(APPEND dtv_libs include (CheckCCompilerFlag) if (MSVC) - # 64-bit MSVC always supports SSE2 - if (CMAKE_SIZEOF_VOID_P EQUAL 8) - set(SSE2_SUPPORTED true) - else () - CHECK_C_COMPILER_FLAG ("/arch:SSE2" SSE2_SUPPORTED) - endif(CMAKE_SIZEOF_VOID_P EQUAL 8) + # 64-bit MSVC always supports SSE2 + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(SSE2_SUPPORTED true) + else() + check_c_compiler_flag("/arch:SSE2" SSE2_SUPPORTED) + endif(CMAKE_SIZEOF_VOID_P EQUAL 8) else () - # The "correct" way to test this would be to run - # check_c_compiler_flag("-msse2") - # ...but that's not reliable, in particular, on Clang and ARM, it will - # return TRUE when it shouldn't. Hence, we compile this snippet - # manually. - check_c_source_compiles("#include <emmintrin.h>\nint main(){__m128i m0, m1, m2; m0 = _mm_add_epi8(m1, m2);}" SSE2_SUPPORTED) + # The "correct" way to test this would be to run + # check_c_compiler_flag("-msse2") + # ...but that's not reliable, in particular, on Clang and ARM, it will + # return TRUE when it shouldn't. Hence, we compile this snippet + # manually. + check_c_source_compiles( + "#include <emmintrin.h>\nint main(){__m128i m0, m1, m2; m0 = _mm_add_epi8(m1, m2);}" + SSE2_SUPPORTED + ) endif(MSVC) if(SSE2_SUPPORTED) - if (NOT MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2") - else () - if (CMAKE_SIZEOF_VOID_P EQUAL 4) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2") - endif () - endif () + if(NOT MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2") + else() + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2") + endif () + endif() ADD_DEFINITIONS(-DDTV_SSE2) endif(SSE2_SUPPORTED) |