From 1632c9a8940c598bae0599e4a405410a20f10557 Mon Sep 17 00:00:00 2001 From: Joakim Soderberg Date: Wed, 26 Nov 2014 01:22:50 +0800 Subject: [PATCH] CLang gives an error on -O4 clang: error: -O4 is equivalent to -O3 --- CMakeLists.txt | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93d2200..77015cf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -361,9 +361,9 @@ endif(UNIX) if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) if (UNIX) - set( CMAKE_C_FLAGS "-Wall -Werror -O4 -fvisibility=hidden ${CMAKE_C_FLAGS}" ) + set( CMAKE_C_FLAGS "-Wall -Werror -O3 -fvisibility=hidden ${CMAKE_C_FLAGS}" ) else(UNIX) - set( CMAKE_C_FLAGS "-Wall -O4 -fvisibility=hidden ${CMAKE_C_FLAGS}" ) + set( CMAKE_C_FLAGS "-Wall -O3 -fvisibility=hidden ${CMAKE_C_FLAGS}" ) endif(UNIX) endif () @@ -685,9 +685,7 @@ if (NOT LWS_WITHOUT_TESTAPPS) add_custom_command(TARGET test-server POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E make_directory "$/../share/libwebsockets-test-server" - COMMENT "Creating test-server $ share directory" - VERBATIM) + COMMAND "${CMAKE_COMMAND}" -E make_directory "$/../share/libwebsockets-test-server") # Copy the file needed to run the server so that the test apps can # reach them from their default output location @@ -695,9 +693,7 @@ if (NOT LWS_WITHOUT_TESTAPPS) if (EXISTS ${TEST_FILE}) add_custom_command(TARGET test-server POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy "${TEST_FILE}" "$/../share/libwebsockets-test-server" - COMMENT "Copying test-server files" - VERBATIM) + COMMAND "${CMAKE_COMMAND}" -E copy "${TEST_FILE}" "$/../share/libwebsockets-test-server" VERBATIM) endif() endforeach() endif(NOT LWS_WITHOUT_SERVER) -- 2.7.4