summaryrefslogtreecommitdiffstats
path: root/Tests/SimpleInstall
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-03-08 19:02:30 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-03-08 19:02:30 (GMT)
commit3d44b9a354edacff4b87ccf2a950ec698798591d (patch)
tree9d34b77c305a83e66e8ba2e47f21a9bfbc4076d5 /Tests/SimpleInstall
parentc14a06c8e0087e649661e9ca445261be59729f0c (diff)
downloadCMake-3d44b9a354edacff4b87ccf2a950ec698798591d.zip
CMake-3d44b9a354edacff4b87ccf2a950ec698798591d.tar.gz
CMake-3d44b9a354edacff4b87ccf2a950ec698798591d.tar.bz2
ENH: Add additional subdirectory to improve testing and to allow cleanup when testing cpack
Diffstat (limited to 'Tests/SimpleInstall')
-rw-r--r--Tests/SimpleInstall/CMakeLists.txt26
-rw-r--r--Tests/SimpleInstall/InstallScript2.cmake2
-rw-r--r--Tests/SimpleInstall/TestSubDir/CMakeLists.txt4
3 files changed, 16 insertions, 16 deletions
diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt
index a02556e..bc42e40 100644
--- a/Tests/SimpleInstall/CMakeLists.txt
+++ b/Tests/SimpleInstall/CMakeLists.txt
@@ -10,7 +10,7 @@ SET(LIBRARY_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}")
SET(CMAKE_SKIP_BUILD_RPATH 1)
# Make sure the executable can run from the install tree.
-SET(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)
+SET(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/MyTest/lib)
# Skip the dependency that causes a build when installing. This
# avoids infinite loops when the post-build rule below installs.
@@ -22,14 +22,14 @@ SET(EXTRA_INSTALL_FLAGS)
MESSAGE("Extra install: ${EXTRA_INSTALL_FLAGS}")
IF(STAGE2)
- SET(LIBPATHS "${CMAKE_INSTALL_PREFIX}/lib")
+ SET(LIBPATHS "${CMAKE_INSTALL_PREFIX}/MyTest/lib")
SET(t1NAMES test1 test1${CMAKE_DEBUG_POSTFIX})
SET(t2NAMES test2 test2${CMAKE_DEBUG_POSTFIX})
SET(t4NAMES test4 test4${CMAKE_DEBUG_POSTFIX})
# Make sure the install script ran.
SET(CMAKE_INSTALL_SCRIPT_DID_RUN 0)
- INCLUDE(${CMAKE_INSTALL_PREFIX}/InstallScriptOut.cmake OPTIONAL)
+ INCLUDE(${CMAKE_INSTALL_PREFIX}/MyTest/InstallScriptOut.cmake OPTIONAL)
IF(CMAKE_INSTALL_SCRIPT_DID_RUN)
MESSAGE(STATUS "Stage 1 did run install script 2.")
ELSE(CMAKE_INSTALL_SCRIPT_DID_RUN)
@@ -37,7 +37,7 @@ IF(STAGE2)
ENDIF(CMAKE_INSTALL_SCRIPT_DID_RUN)
IF(CYGWIN OR MINGW)
- SET(LIBPATHS ${LIBPATHS} "${CMAKE_INSTALL_PREFIX}/bin")
+ SET(LIBPATHS ${LIBPATHS} "${CMAKE_INSTALL_PREFIX}/MyTest/bin")
ENDIF(CYGWIN OR MINGW)
MESSAGE("Search for library in: ${LIBPATHS}")
@@ -58,16 +58,16 @@ IF(STAGE2)
PATHS ${LIBPATHS}
DOC "Fourth library")
- INCLUDE_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/include)
+ INCLUDE_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/MyTest/include)
ADD_EXECUTABLE (SimpleInstallS2 inst2.cxx foo.c foo.h)
TARGET_LINK_LIBRARIES(SimpleInstallS2 ${TEST1_LIBRARY} ${TEST2_LIBRARY} ${TEST4_LIBRARY})
SET(install_target SimpleInstallS2)
# Make sure the test executable can run from the install tree.
SET_TARGET_PROPERTIES(SimpleInstallS2 PROPERTIES
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/MyTest/lib)
- INSTALL_TARGETS(/bin SimpleInstallS2)
+ INSTALL_TARGETS(/MyTest/bin SimpleInstallS2)
ELSE(STAGE2)
# this is stage 1, so create libraries and modules and install everything
ADD_LIBRARY(test1 STATIC lib1.cxx)
@@ -81,7 +81,7 @@ ELSE(STAGE2)
# Make sure the test executable can run from the install tree.
SET_TARGET_PROPERTIES(SimpleInstall PROPERTIES
- INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
+ INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/MyTest/lib)
IF(CMAKE_GENERATOR MATCHES "Makefiles")
ADD_SUBDIRECTORY(TestSubDir)
@@ -93,16 +93,16 @@ ELSE(STAGE2)
ADD_DEPENDENCIES(test4 test2)
INSTALL(TARGETS SimpleInstall test1 test2 test3
- RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
+ RUNTIME DESTINATION MyTest/bin LIBRARY DESTINATION MyTest/lib)
INSTALL(TARGETS test4 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
- RUNTIME DESTINATION bin LIBRARY DESTINATION lib)
- INSTALL(FILES lib1.h DESTINATION include/foo)
+ RUNTIME DESTINATION MyTest/bin LIBRARY DESTINATION MyTest/lib)
+ INSTALL(FILES lib1.h DESTINATION MyTest/include/foo)
INSTALL(FILES lib2.h
- DESTINATION include/foo
+ DESTINATION MyTest/include/foo
PERMISSIONS OWNER_READ OWNER_WRITE
RENAME lib2renamed.h
)
- INSTALL_FILES(/include FILES lib3.h)
+ INSTALL_FILES(/MyTest/include FILES lib3.h)
# Test user-specified install scripts.
INSTALL(
diff --git a/Tests/SimpleInstall/InstallScript2.cmake b/Tests/SimpleInstall/InstallScript2.cmake
index fdbce81..acc4f73 100644
--- a/Tests/SimpleInstall/InstallScript2.cmake
+++ b/Tests/SimpleInstall/InstallScript2.cmake
@@ -4,6 +4,6 @@ IF(INSTALL_SCRIPT_1_DID_RUN)
ELSE(INSTALL_SCRIPT_1_DID_RUN)
MESSAGE(FATAL_ERROR "Install script 1 did not run before install script 2.")
ENDIF(INSTALL_SCRIPT_1_DID_RUN)
-FILE(WRITE "${CMAKE_INSTALL_PREFIX}/InstallScriptOut.cmake"
+FILE(WRITE "${CMAKE_INSTALL_PREFIX}/MyTest/InstallScriptOut.cmake"
"SET(CMAKE_INSTALL_SCRIPT_DID_RUN 1)\n"
)
diff --git a/Tests/SimpleInstall/TestSubDir/CMakeLists.txt b/Tests/SimpleInstall/TestSubDir/CMakeLists.txt
index a99711d..4f62953 100644
--- a/Tests/SimpleInstall/TestSubDir/CMakeLists.txt
+++ b/Tests/SimpleInstall/TestSubDir/CMakeLists.txt
@@ -1,3 +1,3 @@
ADD_EXECUTABLE(TSD TSD.cxx TSD_utils.cxx)
-INSTALL_FILES(/include FILES TSD.h)
-INSTALL_TARGETS(/bin TSD)
+INSTALL_FILES(/MyTest/include FILES TSD.h)
+INSTALL_TARGETS(/MyTest/bin TSD)