summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPack
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CPack')
-rw-r--r--Tests/RunCMake/CPack/DEBUGINFO.cmake8
-rw-r--r--Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake4
2 files changed, 10 insertions, 2 deletions
diff --git a/Tests/RunCMake/CPack/DEBUGINFO.cmake b/Tests/RunCMake/CPack/DEBUGINFO.cmake
index 2a65b7f..d98b682 100644
--- a/Tests/RunCMake/CPack/DEBUGINFO.cmake
+++ b/Tests/RunCMake/CPack/DEBUGINFO.cmake
@@ -1,5 +1,11 @@
set(CMAKE_BUILD_WITH_INSTALL_RPATH 1)
+# PGI compiler doesn't add build id to binaries by default
+if(CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
+ string(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--build-id")
+ string(APPEND CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id")
+endif()
+
set(CPACK_RPM_COMPONENT_INSTALL "ON")
set(CMAKE_BUILD_TYPE Debug)
@@ -23,4 +29,6 @@ set(CPACK_RPM_APPLICATIONS_FILE_NAME "RPM-DEFAULT")
set(CPACK_RPM_APPLICATIONS_DEBUGINFO_PACKAGE ON)
set(CPACK_RPM_LIBS_DEBUGINFO_PACKAGE ON)
+set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/src")
+
set(CPACK_PACKAGE_NAME "debuginfo")
diff --git a/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake
index 265ca92..9e62a62 100644
--- a/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake
+++ b/Tests/RunCMake/CPack/RPM/DEBUGINFO-ExpectedFiles.cmake
@@ -9,6 +9,6 @@ set(EXPECTED_FILE_3 "debuginfo*-libs.rpm")
set(EXPECTED_FILE_CONTENT_3 "^/usr/bas${whitespaces_}/usr/bas/libtest_lib.so$")
set(EXPECTED_FILE_4 "debuginfo-applications-debuginfo*.rpm")
-set(EXPECTED_FILE_CONTENT_4 ".*")
+set(EXPECTED_FILE_CONTENT_4 ".*/src/src_1/main.cpp.*")
set(EXPECTED_FILE_5 "debuginfo-libs-debuginfo*.rpm")
-set(EXPECTED_FILE_CONTENT_5 ".*")
+set(EXPECTED_FILE_CONTENT_5 ".*/src/src_1/test_lib.cpp.*")