summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-03-03 23:44:32 (GMT)
committerBrad King <brad.king@kitware.com>2006-03-03 23:44:32 (GMT)
commita2e136fd17b693765a4961220433bdf207930583 (patch)
treeb785101e7a9fe7bed52a05e3d483216b500a4d70 /Tests
parent5792dc8da8a567ece9fd231e9844a5b1cd30ddc2 (diff)
downloadCMake-a2e136fd17b693765a4961220433bdf207930583.zip
CMake-a2e136fd17b693765a4961220433bdf207930583.tar.gz
CMake-a2e136fd17b693765a4961220433bdf207930583.tar.bz2
ENH: Added PERMISSIONS and RENAME options to the INSTALL command's FILES and PROGRAMS mode, and corresponding support to FILE(INSTALL). Default permissions for shared libraries on non-Windows/non-OSX platforms no longer has the execute bit set.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/SimpleInstall/CMakeLists.txt10
-rw-r--r--Tests/SimpleInstall/inst.cxx10
-rw-r--r--Tests/SimpleInstall/inst2.cxx2
-rw-r--r--Tests/SimpleInstallS2/CMakeLists.txt10
-rw-r--r--Tests/SimpleInstallS2/inst.cxx10
-rw-r--r--Tests/SimpleInstallS2/inst2.cxx2
6 files changed, 36 insertions, 8 deletions
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index 14beef3..fc5c861 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -58,7 +58,8 @@ IF(STAGE2)
PATHS ${LIBPATHS}
DOC "Fourth library")
- ADD_EXECUTABLE (SimpleInstallS2 inst.cxx foo.c foo.h)
+ INCLUDE_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/include)
+ ADD_EXECUTABLE (SimpleInstallS2 inst2.cxx foo.c foo.h)
TARGET_LINK_LIBRARIES(SimpleInstallS2 ${TEST1_LIBRARY} ${TEST2_LIBRARY} ${TEST4_LIBRARY})
SET(install_target SimpleInstallS2)
@@ -93,7 +94,12 @@ ELSE(STAGE2)
INSTALL(TARGETS SimpleInstall test1 test2 test3 test4
RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
- INSTALL(FILES lib1.h lib2.h DESTINATION include)
+ INSTALL(FILES lib1.h DESTINATION include/foo)
+ INSTALL(FILES lib2.h
+ DESTINATION include/foo
+ PERMISSIONS OWNER_READ OWNER_WRITE
+ RENAME lib2renamed.h
+ )
INSTALL_FILES(/include FILES lib3.h)
# Test user-specified install scripts.
diff --git a/Tests/SimpleInstall/inst.cxx b/Tests/SimpleInstall/inst.cxx
index 241a296..53082dc 100644
--- a/Tests/SimpleInstall/inst.cxx
+++ b/Tests/SimpleInstall/inst.cxx
@@ -1,7 +1,13 @@
#include "foo.h"
-#include "lib1.h"
-#include "lib2.h"
+#ifdef STAGE_2
+# include <foo/lib1.h>
+# include <foo/lib2renamed.h>
+#else
+# include "lib1.h"
+# include "lib2.h"
+#endif
+
#include "lib4.h"
#include <stdio.h>
diff --git a/Tests/SimpleInstall/inst2.cxx b/Tests/SimpleInstall/inst2.cxx
new file mode 100644
index 0000000..c70b93a
--- /dev/null
+++ b/Tests/SimpleInstall/inst2.cxx
@@ -0,0 +1,2 @@
+#define STAGE_2
+#include "inst.cxx"
diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt
index 14beef3..fc5c861 100644
--- a/Tests/SimpleInstallS2/CMakeLists.txt
+++ b/Tests/SimpleInstallS2/CMakeLists.txt
@@ -58,7 +58,8 @@ IF(STAGE2)
PATHS ${LIBPATHS}
DOC "Fourth library")
- ADD_EXECUTABLE (SimpleInstallS2 inst.cxx foo.c foo.h)
+ INCLUDE_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/include)
+ ADD_EXECUTABLE (SimpleInstallS2 inst2.cxx foo.c foo.h)
TARGET_LINK_LIBRARIES(SimpleInstallS2 ${TEST1_LIBRARY} ${TEST2_LIBRARY} ${TEST4_LIBRARY})
SET(install_target SimpleInstallS2)
@@ -93,7 +94,12 @@ ELSE(STAGE2)
INSTALL(TARGETS SimpleInstall test1 test2 test3 test4
RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
- INSTALL(FILES lib1.h lib2.h DESTINATION include)
+ INSTALL(FILES lib1.h DESTINATION include/foo)
+ INSTALL(FILES lib2.h
+ DESTINATION include/foo
+ PERMISSIONS OWNER_READ OWNER_WRITE
+ RENAME lib2renamed.h
+ )
INSTALL_FILES(/include FILES lib3.h)
# Test user-specified install scripts.
diff --git a/Tests/SimpleInstallS2/inst.cxx b/Tests/SimpleInstallS2/inst.cxx
index 241a296..53082dc 100644
--- a/Tests/SimpleInstallS2/inst.cxx
+++ b/Tests/SimpleInstallS2/inst.cxx
@@ -1,7 +1,13 @@
#include "foo.h"
-#include "lib1.h"
-#include "lib2.h"
+#ifdef STAGE_2
+# include <foo/lib1.h>
+# include <foo/lib2renamed.h>
+#else
+# include "lib1.h"
+# include "lib2.h"
+#endif
+
#include "lib4.h"
#include <stdio.h>
diff --git a/Tests/SimpleInstallS2/inst2.cxx b/Tests/SimpleInstallS2/inst2.cxx
new file mode 100644
index 0000000..c70b93a
--- /dev/null
+++ b/Tests/SimpleInstallS2/inst2.cxx
@@ -0,0 +1,2 @@
+#define STAGE_2
+#include "inst.cxx"