diff options
author | Brad King <brad.king@kitware.com> | 2015-06-19 12:51:45 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-06-19 12:51:45 (GMT) |
commit | 41cd8547c4780e4db383591307c9330dd9775703 (patch) | |
tree | 5bb70265e898ff1ec9b054b3139b7e3d2f635e91 /Tests | |
parent | a53f1af79f5b602751d2a3a68e3eb36deba53c23 (diff) | |
parent | 8bcec4d22993614e746fdbae54ba66862a85dfe1 (diff) | |
download | CMake-41cd8547c4780e4db383591307c9330dd9775703.zip CMake-41cd8547c4780e4db383591307c9330dd9775703.tar.gz CMake-41cd8547c4780e4db383591307c9330dd9775703.tar.bz2 |
Merge topic 'GNUInstallDirs-special-prefixes'
8bcec4d2 Help: Add notes for topic 'GNUInstallDirs-special-prefixes'
c8bd37ec GNUInstallDirs: Add special cases for certain prefixes
5f30f175 GNUInstallDirs: Add test cases
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/Common.cmake | 28 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/Opt-stderr.txt | 28 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/Opt.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/Root-stderr.txt | 28 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/Root.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake | 6 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/Usr-stderr.txt | 28 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/Usr.cmake | 2 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/UsrLocal-stderr.txt | 28 | ||||
-rw-r--r-- | Tests/RunCMake/GNUInstallDirs/UsrLocal.cmake | 2 |
12 files changed, 158 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 4543908..bc706d3 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -128,6 +128,7 @@ add_RunCMake_test(FPHSA) add_RunCMake_test(GeneratorExpression) add_RunCMake_test(GeneratorPlatform) add_RunCMake_test(GeneratorToolset) +add_RunCMake_test(GNUInstallDirs) add_RunCMake_test(TargetPropertyGeneratorExpressions) add_RunCMake_test(Languages) add_RunCMake_test(ObjectLibrary) diff --git a/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt b/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt new file mode 100644 index 0000000..74b3ff8 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.3) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) 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() diff --git a/Tests/RunCMake/GNUInstallDirs/Opt-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Opt-stderr.txt new file mode 100644 index 0000000..aee8552 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Opt-stderr.txt @@ -0,0 +1,28 @@ +^CMAKE_INSTALL_BINDIR='bin' +CMAKE_INSTALL_DATADIR='share' +CMAKE_INSTALL_DATAROOTDIR='share' +CMAKE_INSTALL_DOCDIR='share/doc/Opt' +CMAKE_INSTALL_INCLUDEDIR='include' +CMAKE_INSTALL_INFODIR='share/info' +CMAKE_INSTALL_LIBDIR='(lib|lib64)' +CMAKE_INSTALL_LIBEXECDIR='libexec' +CMAKE_INSTALL_LOCALEDIR='share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_MANDIR='share/man' +CMAKE_INSTALL_SBINDIR='sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/opt/Opt/bin' +CMAKE_INSTALL_FULL_DATADIR='/opt/Opt/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/opt/Opt/share' +CMAKE_INSTALL_FULL_DOCDIR='/opt/Opt/share/doc/Opt' +CMAKE_INSTALL_FULL_INCLUDEDIR='/opt/Opt/include' +CMAKE_INSTALL_FULL_INFODIR='/opt/Opt/share/info' +CMAKE_INSTALL_FULL_LIBDIR='/opt/Opt/(lib|lib64)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/opt/Opt/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/opt/Opt/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var/opt/Opt' +CMAKE_INSTALL_FULL_MANDIR='/opt/Opt/share/man' +CMAKE_INSTALL_FULL_SBINDIR='/opt/Opt/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/opt/Opt/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/etc/opt/Opt'$ diff --git a/Tests/RunCMake/GNUInstallDirs/Opt.cmake b/Tests/RunCMake/GNUInstallDirs/Opt.cmake new file mode 100644 index 0000000..49eab0e --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Opt.cmake @@ -0,0 +1,2 @@ +set(CMAKE_INSTALL_PREFIX "/opt/${PROJECT_NAME}") +include(Common.cmake) diff --git a/Tests/RunCMake/GNUInstallDirs/Root-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Root-stderr.txt new file mode 100644 index 0000000..a95400e --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Root-stderr.txt @@ -0,0 +1,28 @@ +^CMAKE_INSTALL_BINDIR='usr/bin' +CMAKE_INSTALL_DATADIR='usr/share' +CMAKE_INSTALL_DATAROOTDIR='usr/share' +CMAKE_INSTALL_DOCDIR='usr/share/doc/Root' +CMAKE_INSTALL_INCLUDEDIR='usr/include' +CMAKE_INSTALL_INFODIR='usr/share/info' +CMAKE_INSTALL_LIBDIR='usr/(lib|lib64)' +CMAKE_INSTALL_LIBEXECDIR='usr/libexec' +CMAKE_INSTALL_LOCALEDIR='usr/share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_MANDIR='usr/share/man' +CMAKE_INSTALL_SBINDIR='usr/sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='usr/com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/usr/bin' +CMAKE_INSTALL_FULL_DATADIR='/usr/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/share' +CMAKE_INSTALL_FULL_DOCDIR='/usr/share/doc/Root' +CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/include' +CMAKE_INSTALL_FULL_INFODIR='/usr/share/info' +CMAKE_INSTALL_FULL_LIBDIR='/usr/(lib|lib64)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var' +CMAKE_INSTALL_FULL_MANDIR='/usr/share/man' +CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$ diff --git a/Tests/RunCMake/GNUInstallDirs/Root.cmake b/Tests/RunCMake/GNUInstallDirs/Root.cmake new file mode 100644 index 0000000..f8cc641 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Root.cmake @@ -0,0 +1,2 @@ +set(CMAKE_INSTALL_PREFIX "/") +include(Common.cmake) diff --git a/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake new file mode 100644 index 0000000..f88569a --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake @@ -0,0 +1,6 @@ +include(RunCMake) + +run_cmake(Opt) +run_cmake(Root) +run_cmake(Usr) +run_cmake(UsrLocal) diff --git a/Tests/RunCMake/GNUInstallDirs/Usr-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Usr-stderr.txt new file mode 100644 index 0000000..e10c4c5 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Usr-stderr.txt @@ -0,0 +1,28 @@ +^CMAKE_INSTALL_BINDIR='bin' +CMAKE_INSTALL_DATADIR='share' +CMAKE_INSTALL_DATAROOTDIR='share' +CMAKE_INSTALL_DOCDIR='share/doc/Usr' +CMAKE_INSTALL_INCLUDEDIR='include' +CMAKE_INSTALL_INFODIR='share/info' +CMAKE_INSTALL_LIBDIR='(lib|lib64|lib/arch)' +CMAKE_INSTALL_LIBEXECDIR='libexec' +CMAKE_INSTALL_LOCALEDIR='share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_MANDIR='share/man' +CMAKE_INSTALL_SBINDIR='sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/usr/bin' +CMAKE_INSTALL_FULL_DATADIR='/usr/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/share' +CMAKE_INSTALL_FULL_DOCDIR='/usr/share/doc/Usr' +CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/include' +CMAKE_INSTALL_FULL_INFODIR='/usr/share/info' +CMAKE_INSTALL_FULL_LIBDIR='/usr/(lib|lib64|lib/arch)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var' +CMAKE_INSTALL_FULL_MANDIR='/usr/share/man' +CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$ diff --git a/Tests/RunCMake/GNUInstallDirs/Usr.cmake b/Tests/RunCMake/GNUInstallDirs/Usr.cmake new file mode 100644 index 0000000..62b7288 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Usr.cmake @@ -0,0 +1,2 @@ +set(CMAKE_INSTALL_PREFIX "/usr") +include(Common.cmake) diff --git a/Tests/RunCMake/GNUInstallDirs/UsrLocal-stderr.txt b/Tests/RunCMake/GNUInstallDirs/UsrLocal-stderr.txt new file mode 100644 index 0000000..8dcf25b --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/UsrLocal-stderr.txt @@ -0,0 +1,28 @@ +^CMAKE_INSTALL_BINDIR='bin' +CMAKE_INSTALL_DATADIR='share' +CMAKE_INSTALL_DATAROOTDIR='share' +CMAKE_INSTALL_DOCDIR='share/doc/UsrLocal' +CMAKE_INSTALL_INCLUDEDIR='include' +CMAKE_INSTALL_INFODIR='share/info' +CMAKE_INSTALL_LIBDIR='(lib|lib64)' +CMAKE_INSTALL_LIBEXECDIR='libexec' +CMAKE_INSTALL_LOCALEDIR='share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_MANDIR='share/man' +CMAKE_INSTALL_SBINDIR='sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/usr/local/bin' +CMAKE_INSTALL_FULL_DATADIR='/usr/local/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/local/share' +CMAKE_INSTALL_FULL_DOCDIR='/usr/local/share/doc/UsrLocal' +CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/local/include' +CMAKE_INSTALL_FULL_INFODIR='/usr/local/share/info' +CMAKE_INSTALL_FULL_LIBDIR='/usr/local/(lib|lib64)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/local/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/usr/local/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/usr/local/var' +CMAKE_INSTALL_FULL_MANDIR='/usr/local/share/man' +CMAKE_INSTALL_FULL_SBINDIR='/usr/local/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/local/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/usr/local/etc'$ diff --git a/Tests/RunCMake/GNUInstallDirs/UsrLocal.cmake b/Tests/RunCMake/GNUInstallDirs/UsrLocal.cmake new file mode 100644 index 0000000..59d9331 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/UsrLocal.cmake @@ -0,0 +1,2 @@ +set(CMAKE_INSTALL_PREFIX "/usr/local") +include(Common.cmake) |