diff options
author | Brad King <brad.king@kitware.com> | 2003-06-11 13:45:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-06-11 13:45:07 (GMT) |
commit | 6effa1c7b0e4bc405fee2ff82160e52f52114fb1 (patch) | |
tree | efedc5bfe20134653bee8dd585153c6852a4d776 /Source | |
parent | bd2590ddb5a4f1b495b007ba33c8b9a05b50c751 (diff) | |
download | CMake-6effa1c7b0e4bc405fee2ff82160e52f52114fb1.zip CMake-6effa1c7b0e4bc405fee2ff82160e52f52114fb1.tar.gz CMake-6effa1c7b0e4bc405fee2ff82160e52f52114fb1.tar.bz2 |
ERR: Added custom command that takes advantage of new syntax.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index d68e816..6dca8fa 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -130,23 +130,31 @@ IF(NOT UNIX) SET(CMD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}EncodeExecutable.exe) SET(FWD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}ProcessFwd9x.exe) - - # Dependency work-around for cmake 1.6.7 bug. - SET(DEP ${CMD} ${FWD}) - IF(NOT EXECUTABLE_OUTPUT_PATH) - IF(CMAKE_GENERATOR MATCHES "Borland Makefiles") - SET(DEP ${KWSYS_NAMESPACE}EncodeExecutable.exe ${KWSYS_NAMESPACE}ProcessFwd9x.exe) - ENDIF(CMAKE_GENERATOR MATCHES "Borland Makefiles") - ENDIF(NOT EXECUTABLE_OUTPUT_PATH) - - ADD_CUSTOM_COMMAND( - TARGET ${KWSYS_NAMESPACE} - SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/ProcessFwd9x.c - COMMAND ${CMD} - ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c - ${KWSYS_NAMESPACE} ProcessFwd9x - OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c - DEPENDS ${DEP}) + IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6) + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c + COMMAND ${CMD} + ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c + ${KWSYS_NAMESPACE} ProcessFwd9x + DEPENDS ${CMD} ${FWD}) + ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6) + # Dependency work-around for cmake 1.6.7 bug. + SET(DEP ${CMD} ${FWD}) + IF(NOT EXECUTABLE_OUTPUT_PATH) + IF(CMAKE_GENERATOR MATCHES "Borland Makefiles") + SET(DEP ${KWSYS_NAMESPACE}EncodeExecutable.exe ${KWSYS_NAMESPACE}ProcessFwd9x.exe) + ENDIF(CMAKE_GENERATOR MATCHES "Borland Makefiles") + ENDIF(NOT EXECUTABLE_OUTPUT_PATH) + + ADD_CUSTOM_COMMAND( + TARGET ${KWSYS_NAMESPACE} + SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/ProcessFwd9x.c + COMMAND ${CMD} + ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c + ${KWSYS_NAMESPACE} ProcessFwd9x + OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c + DEPENDS ${DEP}) + ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6) ADD_DEPENDENCIES(${KWSYS_NAMESPACE} ${KWSYS_NAMESPACE}ProcessFwd9x ${KWSYS_NAMESPACE}EncodeExecutable) ENDIF(NOT UNIX) |