diff options
author | Brad King <brad.king@kitware.com> | 2020-11-05 12:56:20 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-11-05 12:56:30 (GMT) |
commit | d416b0996acf880617fb28f7a0eb97cc459ee8ae (patch) | |
tree | 1a61a4ed28a485b3fce5f59fce4c290ffc64ad38 /Tests/RunCMake | |
parent | a9e2b18bf38a1c1d427b40ff12cf9f5bc517650a (diff) | |
parent | a61007b3b0d7e70f48521e6e35c98f7c7b8b259c (diff) | |
download | CMake-d416b0996acf880617fb28f7a0eb97cc459ee8ae.zip CMake-d416b0996acf880617fb28f7a0eb97cc459ee8ae.tar.gz CMake-d416b0996acf880617fb28f7a0eb97cc459ee8ae.tar.bz2 |
Merge topic 'GNUInstallDirs-dir'
a61007b3b0 Tests: Add RunCMake.GNUInstallDirs case for get_absolute_install_dir
229b5ee994 GNUInstallDirs: Add dir argument to GNUInstallDirs_get_absolute_install_dir
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5450
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/GetAbs-stderr.txt | 12 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/GetAbs.cmake | 11 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake | 1 |
3 files changed, 24 insertions, 0 deletions
diff --git a/Tests/RunCMake/GNUInstallDirs/GetAbs-stderr.txt b/Tests/RunCMake/GNUInstallDirs/GetAbs-stderr.txt new file mode 100644 index 0000000..ec9a2dd --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/GetAbs-stderr.txt @@ -0,0 +1,12 @@ +^PROJ1_FULL_BINDIR='/usr/bin' +CMake Warning \(dev\) at [^ +]*/Modules/GNUInstallDirs.cmake:[0-9]+ \(message\): + GNUInstallDirs_get_absolute_install_dir called without third argument. + Using \${dir} from the caller's scope for compatibility with CMake 3.19 and + below. +Call Stack \(most recent call first\): + GetAbs.cmake:10 \(GNUInstallDirs_get_absolute_install_dir\) + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. ++ +PROJ2_FULL_BINDIR='/usr/bin'$ diff --git a/Tests/RunCMake/GNUInstallDirs/GetAbs.cmake b/Tests/RunCMake/GNUInstallDirs/GetAbs.cmake new file mode 100644 index 0000000..7d5bfc8 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/GetAbs.cmake @@ -0,0 +1,11 @@ +set(CMAKE_SIZEOF_VOID_P 8) +set(CMAKE_LIBRARY_ARCHITECTURE "arch") +set(CMAKE_INSTALL_PREFIX /usr) +include(GNUInstallDirs) + +GNUInstallDirs_get_absolute_install_dir(PROJ1_FULL_BINDIR CMAKE_INSTALL_BINDIR BINDIR) +message("PROJ1_FULL_BINDIR='${PROJ1_FULL_BINDIR}'") + +set(dir BINDIR) +GNUInstallDirs_get_absolute_install_dir(PROJ2_FULL_BINDIR CMAKE_INSTALL_BINDIR) +message("PROJ2_FULL_BINDIR='${PROJ2_FULL_BINDIR}'") diff --git a/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake index 529e10a..395ff30 100644 --- a/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake +++ b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake @@ -21,4 +21,5 @@ foreach(case unset(RunCMake-stderr-file) endforeach() +run_cmake(GetAbs) run_cmake(NoSystem) |