Skip to content

Commit

Permalink
Added an option to compile release with debug symbols for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
aglowacki committed May 2, 2024
1 parent 1c7e804 commit 4def929
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
option(AVX2 "Compule with arch AVX2 on MSVC" OFF)
option(AVX "Compule with arch AVX on MSVC" OFF)
option(SSE2 "Compule with arch SSE2 on MSVC" OFF)
option(MSVC_DEBUG_INFO_REL "Compule with debug info in Release build for MSVC" OFF)

IF (UNIX)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake/linux)
Expand Down Expand Up @@ -156,6 +157,11 @@ ENDIF()
ENDIF()
ENDIF()

IF(MSVC_DEBUG_INFO_REL)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi ")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /ASSEMBLYDEBUG /DEBUG:FULL")
ENDIF()

# Compile with compiler warnings turned on
IF(MSVC)
IF(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
Expand Down

0 comments on commit 4def929

Please sign in to comment.