commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 01/04: cmake: adds a NoOptWithASM build typ


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/04: cmake: adds a NoOptWithASM build type for building with assembly output and no optimizations for better debugging.
Date: Wed, 23 Jul 2014 16:14:42 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch master
in repository gnuradio.

commit 1adb086a400ae1448f368d738aafd05efc10de67
Author: Tom Rondeau <address@hidden>
Date:   Sun Jul 6 15:44:36 2014 -0400

    cmake: adds a NoOptWithASM build type for building with assembly output and 
no optimizations for better debugging.
---
 CMakeLists.txt | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 935669d..f5b4cd8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,6 +29,39 @@ cmake_minimum_required(VERSION 2.6)
 project(gnuradio CXX C)
 enable_testing()
 
+########################################################################
+# For GCC and Clang, we can set a build type:
+#
+# -DCMAKE_BUILD_TYPE=NoOptWithASM
+#
+# This type uses no optimization (-O0), outputs debug symbols (-g) and
+# outputs all intermediary files the build system produces, including
+# all assembly (.s) files. Look in the build directory for these
+# files.
+# NOTE: This is not defined on Windows systems.
+########################################################################
+if(NOT WIN32)
+  SET( CMAKE_CXX_FLAGS_NOOPTWITHASM "-Wall -save-temps -g -O0" CACHE STRING
+    "Flags used by the C++ compiler during NoOptWithASM builds."
+    FORCE )
+  SET( CMAKE_C_FLAGS_NOOPTWITHASM "-Wall -save-temps -g -O0" CACHE STRING
+    "Flags used by the C compiler during NoOptWithASM builds."
+    FORCE )
+  SET( CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
+    "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
+    "Flags used for linking binaries during NoOptWithASM builds."
+    FORCE )
+  SET( CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM
+    "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
+    "Flags used by the shared libraries linker during NoOptWithASM builds."
+    FORCE )
+  MARK_AS_ADVANCED(
+    CMAKE_CXX_FLAGS_NOOPTWITHASM
+    CMAKE_C_FLAGS_NOOPTWITHASM
+    CMAKE_EXE_LINKER_FLAGS_NOOPTWITHASM
+    CMAKE_SHARED_LINKER_FLAGS_NOOPTWITHASM)
+endif(NOT WIN32)
+
 #select the release build type by default to get optimization flags
 if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE "Release")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]