diff options
author | Brad King <brad.king@kitware.com> | 2015-06-16 18:59:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-06-18 12:59:24 (GMT) |
commit | 5f30f1754ac9a701cbd311bab86250dd237d86fd (patch) | |
tree | fffb8200251e5ecf6eaa1e7113ae0971a1a9d3c4 /Tests/RunCMake/GNUInstallDirs/Common.cmake | |
parent | 1199ebf1c53f7f591e412617afdaaf4ccd5bc0ff (diff) | |
download | CMake-5f30f1754ac9a701cbd311bab86250dd237d86fd.zip CMake-5f30f1754ac9a701cbd311bab86250dd237d86fd.tar.gz CMake-5f30f1754ac9a701cbd311bab86250dd237d86fd.tar.bz2 |
GNUInstallDirs: Add test cases
Add a RunCMake.GNUInstallDirs test with cases covering various install
prefixes. Hard-code the architecture information. Tolerate all
platform-specific LIBDIR values.
Currently the root prefix is not handled well, but verify the current
behavior in the test anyway. This can be addressed with a future
change.
Inspired-by: Alex Turbov <i.zaufi@gmail.com>
Diffstat (limited to 'Tests/RunCMake/GNUInstallDirs/Common.cmake')
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/Common.cmake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Tests/RunCMake/GNUInstallDirs/Common.cmake b/Tests/RunCMake/GNUInstallDirs/Common.cmake new file mode 100644 index 0000000..eff2d54 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Common.cmake @@ -0,0 +1,28 @@ +set(CMAKE_SIZEOF_VOID_P 8) +set(CMAKE_LIBRARY_ARCHITECTURE "arch") +if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") + set(CMAKE_SYSTEM_NAME "OpenBSD-Fake") +endif() +include(GNUInstallDirs) +set(dirs + BINDIR + DATADIR + DATAROOTDIR + DOCDIR + INCLUDEDIR + INFODIR + LIBDIR + LIBEXECDIR + LOCALEDIR + LOCALSTATEDIR + MANDIR + SBINDIR + SHAREDSTATEDIR + SYSCONFDIR + ) +foreach(dir ${dirs}) + message("CMAKE_INSTALL_${dir}='${CMAKE_INSTALL_${dir}}'") +endforeach() +foreach(dir ${dirs}) + message("CMAKE_INSTALL_FULL_${dir}='${CMAKE_INSTALL_FULL_${dir}}'") +endforeach() |