diff --git a/CMakeLists.txt b/CMakeLists.txt index ab41f5fa..c36c873d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ check_c_source_compiles(" find_package(Threads) if(Threads_FOUND) if(CMAKE_USE_PTHREADS_INIT) - list(APPEND CMAKE_C_FLAGS "-pthread") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") endif() foreach(PTHREAD_TEST HAVE_PTHREAD_PRIO_INHERIT PTHREAD_CREATE_UNDETACHED) check_c_source_compiles(" @@ -177,7 +177,7 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE}) include(CheckCCompilerFlag) check_c_compiler_flag(${SIMD_COMPILE_FLAG} HAS_COMPILE_FLAG) if(HAS_COMPILE_FLAG) - list(APPEND CMAKE_C_FLAGS ${SIMD_COMPILE_FLAG}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SIMD_COMPILE_FLAG}") endif() endif() endif()