summaryrefslogtreecommitdiff
path: root/Modules/UseEcos.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-02-07 14:50:45 -0500
committerAlexander Neundorf <neundorf@kde.org>2007-02-07 14:50:45 -0500
commit5586c6f41bdc94691c12c7eadf818d90c147cf13 (patch)
treee55f53efe799c3fc42714f0c019f609607a499c7 /Modules/UseEcos.cmake
parent8b567083da868ede87ec675b641fc0fd43b4864a (diff)
downloadcmake-5586c6f41bdc94691c12c7eadf818d90c147cf13.tar.gz
ENH: now also the "ecosclean" target works with MS nmake
Alex
Diffstat (limited to 'Modules/UseEcos.cmake')
-rw-r--r--Modules/UseEcos.cmake9
1 files changed, 4 insertions, 5 deletions
diff --git a/Modules/UseEcos.cmake b/Modules/UseEcos.cmake
index c23b2369de..73d3f2a1e0 100644
--- a/Modules/UseEcos.cmake
+++ b/Modules/UseEcos.cmake
@@ -151,6 +151,8 @@ MACRO(ECOS_ADD_TARGET_LIB)
ADD_CUSTOM_TARGET( ecos make -C ${CMAKE_CURRENT_BINARY_DIR}/ecos/ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ecos/makefile )
ENDMACRO(ECOS_ADD_TARGET_LIB)
+# get the directory of the current file, used later on in the file
+GET_FILENAME_COMPONENT( ECOS_CMAKE_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
#macro for creating an executable ecos application
#the first parameter is the name of the executable,
@@ -204,13 +206,10 @@ MACRO(ECOS_ADD_EXECUTABLE _exe_NAME )
ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.bin;${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.srec;${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst;"
)
-#cd $1; ls -a | grep --invert-match -e "\(.*CVS\)\|\(.*ecos\.ecc\)" | xargs rm -rf; touch ecos.ecc
- ADD_CUSTOM_TARGET(ecosclean sh -c \"cd ${CMAKE_CURRENT_BINARY_DIR}/ecos\; ls | grep --invert-match -e \\\"\\\(.*CVS\\\)\\|\\\(.*ecos\\.ecc\\\)\\\" |xargs rm -rf\; touch ${ECOS_CONFIG_FILE} \")
- ADD_CUSTOM_TARGET(normalclean ${CMAKE_MAKE_PROGRAM} clean -C ${CMAKE_CURRENT_BINARY_DIR})
+ ADD_CUSTOM_TARGET(ecosclean ${CMAKE_COMMAND} -DECOS_DIR=${CMAKE_CURRENT_BINARY_DIR}/ecos/ -P ${ECOS_CMAKE_MODULE_DIR}/ecos_clean.cmake )
+ ADD_CUSTOM_TARGET(normalclean ${CMAKE_MAKE_PROGRAM} clean WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
ADD_DEPENDENCIES (ecosclean normalclean)
- ADD_DEPENDENCIES(ecosclean clean)
-
ADD_CUSTOM_TARGET( listing
COMMAND echo -e \"\\n--- Symbols sorted by address ---\\n\" > ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst