Re: [PATCH 1/2] kernel-shark-qt: Add "-O2" compiler flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 17 Sep 2018 17:29:41 +0300
"Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote:

> "-O2" compiler option is added to both C and C++ compiler flags.

Can you add -g as well. I know that somewhat contradicts the -O2 flag,
but it is also useful for debugging (even with optimization).

We can also add a debug option to not compile with -O2, but that can be
dealt with later.

-- Steve

> 
> Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx>
> ---
>  kernel-shark-qt/CMakeLists.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel-shark-qt/CMakeLists.txt b/kernel-shark-qt/CMakeLists.txt
> index 0187eb4..7769604 100644
> --- a/kernel-shark-qt/CMakeLists.txt
> +++ b/kernel-shark-qt/CMakeLists.txt
> @@ -23,8 +23,8 @@ find_package(GLUT)
>  set(LIBRARY_OUTPUT_PATH    "${KS_DIR}/lib")
>  set(EXECUTABLE_OUTPUT_PATH "${KS_DIR}/bin")
>  
> -set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wall -pthread")
> -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -pthread")
> +set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -Wall -O2 -pthread")
> +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -std=c++11 -pthread")
>  
>  include_directories(${KS_DIR}/src/
>                      ${KS_DIR}/build/src/




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux