File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 32
32
# Ensure relative source locations in debug entries
33
33
#
34
34
35
- foreach (LANG C CXX )
36
- foreach (TYPE DEBUG RELWITHDEBINFO )
37
- set (CMAKE_${LANG}_FLAGS_${TYPE}
38
- "-fdebug-prefix-map=${CMAKE_SOURCE_DIR} =. ${CMAKE_${LANG} _FLAGS_${TYPE} }"
39
- )
40
- endforeach (TYPE )
41
- endforeach (LANG )
35
+ option (DEBUG_PREFIX_MAP
36
+ "Set -fdebug-prefix-map option to ensure relative source locations in debug entries."
37
+ ON
38
+ )
39
+
40
+ if (DEBUG_PREFIX_MAP )
41
+
42
+ foreach (LANG C CXX )
43
+ foreach (TYPE DEBUG RELWITHDEBINFO )
44
+ set (CMAKE_${LANG}_FLAGS_${TYPE}
45
+ "-fdebug-prefix-map=${CMAKE_SOURCE_DIR} =. ${CMAKE_${LANG} _FLAGS_${TYPE} }"
46
+ )
47
+ endforeach (TYPE )
48
+ endforeach (LANG )
49
+
50
+ endif (DEBUG_PREFIX_MAP )
42
51
43
52
#
44
53
# Deal with broken optimization in gcc 4.8.
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ test suite for MySQL Connector/C++
130
130
%endif
131
131
132
132
%global __cmake_explicit_opts -DCMAKE_INSTALL_PREFIX="%_prefix" -DCMAKE_C_FLAGS:STRING="%optflags" -DCMAKE_CXX_FLAGS:STRING="%optflags"
133
- %global __cmake_common_opts -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/mysql-cppconn-8 -DWITH_JDBC=ON -DWITH_SSL=system %{__cmake_test_opts} %{?mysql_opt}
133
+ %global __cmake_common_opts -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/mysql-cppconn-8 -DWITH_JDBC=ON -DWITH_SSL=system %{__cmake_test_opts} %{?mysql_opt} -DDEBUG_PREFIX_MAP=OFF
134
134
135
135
%if 0%{?rhel}
136
136
%global __cmake_cmd cmake3 %{__cmake_common_opts} %{__cmake_explicit_opts} ..
You can’t perform that action at this time.
0 commit comments