mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Tests: Add RunCMake.GNUInstallDirs case for get_absolute_install_dir
This commit is contained in:
12
Tests/RunCMake/GNUInstallDirs/GetAbs-stderr.txt
Normal file
12
Tests/RunCMake/GNUInstallDirs/GetAbs-stderr.txt
Normal 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'$
|
||||
11
Tests/RunCMake/GNUInstallDirs/GetAbs.cmake
Normal file
11
Tests/RunCMake/GNUInstallDirs/GetAbs.cmake
Normal 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}'")
|
||||
@@ -21,4 +21,5 @@ foreach(case
|
||||
unset(RunCMake-stderr-file)
|
||||
endforeach()
|
||||
|
||||
run_cmake(GetAbs)
|
||||
run_cmake(NoSystem)
|
||||
|
||||
Reference in New Issue
Block a user