فهرست منبع

Added JPH_DEBUG_SYMBOL_FORMAT option (#1315)

This allows switching from the default dwarf symbol format to e.g. the source-map format for emscripten, which speeds up compilation.
Jorrit Rouwe 9 ماه پیش
والد
کامیت
9c718ebb02
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      Build/CMakeLists.txt

+ 4 - 1
Build/CMakeLists.txt

@@ -11,6 +11,9 @@ option(DOUBLE_PRECISION "Use double precision math" OFF)
 # When turning this option on, the library will be compiled with debug symbols
 # When turning this option on, the library will be compiled with debug symbols
 option(GENERATE_DEBUG_SYMBOLS "Generate debug symbols" ON)
 option(GENERATE_DEBUG_SYMBOLS "Generate debug symbols" ON)
 
 
+# Which type of debug symbols to generate, e.g. using source-map when compiling with emscripten makes compilation a lot faster
+set(JPH_DEBUG_SYMBOL_FORMAT "" CACHE STRING "Which type of debug symbols to generate")
+
 # When turning this option on, the library will override the default CMAKE_CXX_FLAGS_DEBUG/RELEASE values, otherwise they will use the platform defaults
 # When turning this option on, the library will override the default CMAKE_CXX_FLAGS_DEBUG/RELEASE values, otherwise they will use the platform defaults
 option(OVERRIDE_CXX_FLAGS "Override CMAKE_CXX_FLAGS_DEBUG/RELEASE" ON)
 option(OVERRIDE_CXX_FLAGS "Override CMAKE_CXX_FLAGS_DEBUG/RELEASE" ON)
 
 
@@ -191,7 +194,7 @@ else()
 
 
 	# Optionally generate debug symbols
 	# Optionally generate debug symbols
 	if (GENERATE_DEBUG_SYMBOLS)
 	if (GENERATE_DEBUG_SYMBOLS)
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g${JPH_DEBUG_SYMBOL_FORMAT}")
 	endif()
 	endif()
 
 
 	if (NOT CPP_RTTI_ENABLED)
 	if (NOT CPP_RTTI_ENABLED)