BUG: Need to execute sample_script.bat on windows and sample_script otherwise.

This commit is contained in:
Brad King 2006-08-21 17:37:40 -04:00
parent c58777ec47
commit 08398a9f0c
2 changed files with 12 additions and 2 deletions

View File

@ -81,11 +81,16 @@ IF(STAGE2)
ENDIF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/include/Debug/lib1release.h") ENDIF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/include/Debug/lib1release.h")
# Check for failure of directory installation. # Check for failure of directory installation.
IF(WIN32 AND NOT CYGWIN)
SET(BAT .bat)
ELSE(WIN32 AND NOT CYGWIN)
SET(BAT)
ENDIF(WIN32 AND NOT CYGWIN)
IF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/TSD.h") IF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/TSD.h")
MESSAGE(FATAL_ERROR "Directory installation did not install TSD.h") MESSAGE(FATAL_ERROR "Directory installation did not install TSD.h")
ENDIF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/TSD.h") ENDIF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/TSD.h")
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND "${CMAKE_INSTALL_PREFIX}/MyTest/share/sample_script" COMMAND "${CMAKE_INSTALL_PREFIX}/MyTest/share/sample_script${BAT}"
RESULT_VARIABLE SAMPLE_SCRIPT_RESULT RESULT_VARIABLE SAMPLE_SCRIPT_RESULT
OUTPUT_VARIABLE SAMPLE_SCRIPT_OUTPUT OUTPUT_VARIABLE SAMPLE_SCRIPT_OUTPUT
) )

View File

@ -81,11 +81,16 @@ IF(STAGE2)
ENDIF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/include/Debug/lib1release.h") ENDIF(EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/include/Debug/lib1release.h")
# Check for failure of directory installation. # Check for failure of directory installation.
IF(WIN32 AND NOT CYGWIN)
SET(BAT .bat)
ELSE(WIN32 AND NOT CYGWIN)
SET(BAT)
ENDIF(WIN32 AND NOT CYGWIN)
IF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/TSD.h") IF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/TSD.h")
MESSAGE(FATAL_ERROR "Directory installation did not install TSD.h") MESSAGE(FATAL_ERROR "Directory installation did not install TSD.h")
ENDIF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/TSD.h") ENDIF(NOT EXISTS "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/TSD.h")
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND "${CMAKE_INSTALL_PREFIX}/MyTest/share/sample_script" COMMAND "${CMAKE_INSTALL_PREFIX}/MyTest/share/sample_script${BAT}"
RESULT_VARIABLE SAMPLE_SCRIPT_RESULT RESULT_VARIABLE SAMPLE_SCRIPT_RESULT
OUTPUT_VARIABLE SAMPLE_SCRIPT_OUTPUT OUTPUT_VARIABLE SAMPLE_SCRIPT_OUTPUT
) )