endif()
# Dwarf based builds (no rsym)
-if(NOT DEFINED NO_ROSSYM)
+if(CMAKE_BUILD_TYPE STREQUAL "Release")
+ set(NO_ROSSYM TRUE)
+elseif(NOT DEFINED NO_ROSSYM)
set(NO_ROSSYM FALSE)
endif()
# Compiler Core
add_compile_flags("-pipe -fms-extensions -fno-strict-aliasing")
+
+# Prevent GCC from searching any of the default directories
+add_compile_flags("-nostdinc")
+
if(GCC_VERSION VERSION_GREATER 4.7)
add_compile_flags("-mstackrealign")
endif()
endif()
# Debugging
-if(SEPARATE_DBG)
- add_compile_flags("-gdwarf-2 -ggdb")
-else()
- add_compile_flags("-gdwarf-2 -gstrict-dwarf")
- if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
- add_compile_flags("-femit-struct-debug-detailed=none -feliminate-unused-debug-symbols")
+if(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+ if(SEPARATE_DBG)
+ add_compile_flags("-gdwarf-2 -ggdb")
+ else()
+ add_compile_flags("-gdwarf-2 -gstrict-dwarf")
+ if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
+ add_compile_flags("-femit-struct-debug-detailed=none -feliminate-unused-debug-symbols")
+ endif()
endif()
endif()
if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_flags("-Wno-maybe-uninitialized")
- add_compile_flags("-Wno-error=unused-but-set-variable")
endif()
-add_compile_flags("-Wno-error=type-limits")
-
if(ARCH STREQUAL "amd64")
add_compile_flags("-Wno-format")
elseif(ARCH STREQUAL "arm")
endfunction()
function(allow_warnings __module)
- add_target_compile_flags(${__module} "-Wno-error")
+ # We don't allow warnings in trunk, this needs to be reworked. See CORE-6959.
+ #add_target_compile_flags(${__module} "-Wno-error")
endfunction()
macro(add_asm_files _target)