diff options
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) |