summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPack
diff options
context:
space:
mode:
authorTin Huynh <ahuynh@nvidia.com>2021-01-27 08:00:58 (GMT)
committerBrad King <brad.king@kitware.com>2021-01-27 14:53:02 (GMT)
commit4de28ba4e6348f99de57bd2961b00dcd4cda213b (patch)
treed847cafc0c0816e3827fbe73d555316410a48232 /Tests/RunCMake/CPack
parent90502d76b7259fb8b417b1a81b504061ce592465 (diff)
downloadCMake-4de28ba4e6348f99de57bd2961b00dcd4cda213b.zip
CMake-4de28ba4e6348f99de57bd2961b00dcd4cda213b.tar.gz
CMake-4de28ba4e6348f99de57bd2961b00dcd4cda213b.tar.bz2
Tests: Update tests for NVHPC compiler
Treat it just like PGI.
Diffstat (limited to 'Tests/RunCMake/CPack')
-rw-r--r--Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
index d270005..04b44f6 100644
--- a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
+++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake
@@ -1,7 +1,7 @@
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")
+# Some compilers do not add build id to binaries by default.
+if(CMAKE_CXX_COMPILER_ID MATCHES "^(PGI|NVHPC)$")
string(APPEND CMAKE_EXE_LINKER_FLAGS "-Wl,--build-id")
string(APPEND CMAKE_SHARED_LINKER_FLAGS "-Wl,--build-id")
endif()