@@ -11,6 +11,13 @@ if(MSVC)
11
11
include (../cmake/public /utils.cmake)
12
12
endif ()
13
13
14
+ # Debug messages - if you want to get a list of source files and examine
15
+ # target information, enable the following by -DPRINT_CMAKE_DEBUG_INFO=ON.
16
+ set (PRINT_CMAKE_DEBUG_INFO FALSE CACHE BOOL "print cmake debug information" )
17
+ if (PRINT_CMAKE_DEBUG_INFO)
18
+ include (../cmake/DebugHelper.cmake)
19
+ endif ()
20
+
14
21
# ATen parallelism settings
15
22
# OMP - OpenMP for intra-op, native thread pool for inter-op parallelism
16
23
# NATIVE - using native thread pool for intra- and inter-op parallelism
@@ -186,9 +193,7 @@ if(BUILD_SPLIT_CUDA)
186
193
endforeach ()
187
194
endif ()
188
195
189
- # Debug messages - if you want to get a list of source files, enable the
190
- # following.
191
- if (FALSE )
196
+ if (PRINT_CMAKE_DEBUG_INFO)
192
197
message (STATUS "CPU sources: " )
193
198
foreach (tmp ${Caffe2_CPU_SRCS} )
194
199
message (STATUS " " ${tmp} )
@@ -1265,6 +1270,11 @@ elseif(USE_ROCM)
1265
1270
target_link_libraries (torch PUBLIC torch_hip_library)
1266
1271
endif ()
1267
1272
1273
+ if (PRINT_CMAKE_DEBUG_INFO)
1274
+ print_target_properties(torch)
1275
+ print_target_properties(torch_cpu)
1276
+ endif ()
1277
+
1268
1278
# Install PDB files for MSVC builds
1269
1279
if (MSVC AND BUILD_SHARED_LIBS )
1270
1280
install (FILES $<TARGET_PDB_FILE:torch_cpu> DESTINATION "${TORCH_INSTALL_LIB_DIR} " OPTIONAL )
0 commit comments