You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/c-blosc/files/c-blosc-1.11.1-fix-build-sy...

31 lines
1.2 KiB

Make the build system respect CFLAGS
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -195,7 +195,7 @@
CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64)
if(CMAKE_C_COMPILER_ID STREQUAL GNU)
# We need C99 (GNU99 more exactly)
- SET(CMAKE_C_FLAGS "-std=gnu99")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
set(COMPILER_SUPPORT_SSE2 TRUE)
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.7 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.7)
set(COMPILER_SUPPORT_AVX2 TRUE)
@@ -244,16 +244,6 @@
endif()
# flags
-# @TODO: set -Wall
-# @NOTE: -O3 is enabled in Release mode (CMAKE_BUILD_TYPE="Release")
-
-# Set the "-msse2" build flag only if the CMAKE_C_FLAGS is not already set.
-# Probably "-msse2" should be appended to CMAKE_C_FLAGS_RELEASE.
-if(CMAKE_C_COMPILER_ID STREQUAL GNU OR CMAKE_C_COMPILER_ID STREQUAL Clang OR CMAKE_C_COMPILER_ID STREQUAL Intel)
- if(NOT CMAKE_C_FLAGS AND COMPILER_SUPPORT_SSE2)
- set(CMAKE_C_FLAGS -msse2 CACHE STRING "C flags." FORCE)
- endif(NOT CMAKE_C_FLAGS AND COMPILER_SUPPORT_SSE2)
-endif(CMAKE_C_COMPILER_ID STREQUAL GNU OR CMAKE_C_COMPILER_ID STREQUAL Clang OR CMAKE_C_COMPILER_ID STREQUAL Intel)
if(MSVC)
if(NOT CMAKE_C_FLAGS)