Tests: Add RunCMake.GNUInstallDirs case for get_absolute_install_dir

This commit is contained in:
Brad King
2020-11-04 15:05:51 -05:00
parent 229b5ee994
commit a61007b3b0
3 changed files with 24 additions and 0 deletions

View File

@@ -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'$

View File

@@ -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}'")

View File

@@ -21,4 +21,5 @@ foreach(case
unset(RunCMake-stderr-file)
endforeach()
run_cmake(GetAbs)
run_cmake(NoSystem)