summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-03-23 21:09:46 (GMT)
committerBrad King <brad.king@kitware.com>2011-03-23 21:20:04 (GMT)
commit29487baceadc3c416178d325a9656c9d68c53972 (patch)
treee9c810e8db335df3a5326152190bd8a87c3b14f4 /Source/kwsys/CMakeLists.txt
parent7afcb8103793b6cb4dc3243732cc5cf4aa85c8b9 (diff)
downloadCMake-29487baceadc3c416178d325a9656c9d68c53972.zip
CMake-29487baceadc3c416178d325a9656c9d68c53972.tar.gz
CMake-29487baceadc3c416178d325a9656c9d68c53972.tar.bz2
KWSys: Do not trust EXECUTABLE_OUTPUT_PATH for ProcessFwd9x encoding
Set target property RUNTIME_OUTPUT_DIRECTORY explicitly on ProcessFwd9x and EncodeExecutable so that we know exactly where the executables will exist on disk.
Diffstat (limited to 'Source/kwsys/CMakeLists.txt')
-rw-r--r--Source/kwsys/CMakeLists.txt12
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index f5f317c..0ef4e28 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -847,23 +847,19 @@ IF(KWSYS_USE_Process)
# encode it into a C file.
ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c)
ADD_EXECUTABLE(${KWSYS_NAMESPACE}EncodeExecutable EncodeExecutable.c)
+ SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+ SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}EncodeExecutable PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE})
SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}EncodeExecutable PROPERTY LABELS ${KWSYS_LABELS_EXE})
- # Construct the location of the executable to be encoded.
- SET(BIN_DIR ${CMAKE_CURRENT_BINARY_DIR})
- IF(EXECUTABLE_OUTPUT_PATH)
- SET(BIN_DIR ${EXECUTABLE_OUTPUT_PATH})
- ENDIF(EXECUTABLE_OUTPUT_PATH)
-
SET(CFG_INTDIR "/${CMAKE_CFG_INTDIR}")
IF(CMAKE_BUILD_TOOL MATCHES "make")
SET(CFG_INTDIR "")
ENDIF(CMAKE_BUILD_TOOL MATCHES "make")
# Take advantage of a better custom command syntax if possible.
- SET(CMD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}EncodeExecutable.exe)
- SET(FWD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}ProcessFwd9x.exe)
+ SET(CMD ${CMAKE_CURRENT_BINARY_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}EncodeExecutable.exe)
+ SET(FWD ${CMAKE_CURRENT_BINARY_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}ProcessFwd9x.exe)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c
COMMAND ${CMD}