Skip to content

Commit dfcf927

Browse files
committed
Added comment and fixed embedded debug symbols
1 parent 8191f63 commit dfcf927

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

complete/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# $ cmake --version
66
cmake_minimum_required(VERSION 3.25 FATAL_ERROR)
77

8+
# Enable setting CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
89
set(CMAKE_POLICY_DEFAULT_CMP0141 NEW CACHE STRING "" FORCE)
910

1011
# Sets the minimum deployment target
@@ -27,7 +28,7 @@ if(PROJECT_IS_TOP_LEVEL)
2728
# Links to C++ runtime statically
2829
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
2930
# Embeds debug information
30-
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded CACHE STRING "" FORCE)
31+
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>" CACHE STRING "" FORCE)
3132
endif()
3233

3334
# I like to download the dependencies to the same folder as the project.

todo/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# $ cmake --version
66
cmake_minimum_required(VERSION 3.25 FATAL_ERROR)
77

8+
# Enable setting CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
89
set(CMAKE_POLICY_DEFAULT_CMP0141 NEW CACHE STRING "" FORCE)
910

1011
# Sets the minimum deployment target
@@ -27,7 +28,7 @@ if(PROJECT_IS_TOP_LEVEL)
2728
# Links to C++ runtime statically
2829
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
2930
# Embeds debug information
30-
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT Embedded CACHE STRING "" FORCE)
31+
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>" CACHE STRING "" FORCE)
3132
endif()
3233

3334
# I like to download the dependencies to the same folder as the project.

0 commit comments

Comments
 (0)