From ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kate/tests/highlight.cmake | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 kate/tests/highlight.cmake (limited to 'kate/tests/highlight.cmake') diff --git a/kate/tests/highlight.cmake b/kate/tests/highlight.cmake new file mode 100644 index 000000000..cb8eaaa51 --- /dev/null +++ b/kate/tests/highlight.cmake @@ -0,0 +1,48 @@ +#this CMakeLists.txt doesn't do anything useful, but it shoudl demonstrate the cmake syntax highlighting +#Alexander Neundorf + +#ok this is a comment +#and another line +#a built-in command, it's bold black +ADD_DEFINITIONS(-Wall -Wctor-dtor-privacy -Woverloaded-virtual -Wno-long-long -pipe -fno-builtin -fno-exceptions) + +#and another function +INCLUDE_DIRECTORIES( +#comments are also highlighted inside function parameters +#variables are blue +${CMAKE_CURRENT_SOURCE_DIR}/../../lib/qt4/include/Qt +) + +# BEGIN defining a macro +MACRO(ECOS_ADD_EXECUTABLE _exe_NAME ) + +#special parameters are italic, see the STATIC in the next line +ADD_LIBRARY(${_exe_NAME} STATIC ${ARGN}) +#but not in the following line ? + ADD_LIBRARY(${_exe_NAME} STATIC ${ARGN}) + + +#another command with a bunch of variables and special parameters + ADD_CUSTOM_COMMAND( + TARGET ${_exe_NAME} + PRE_LINK + COMMAND ${CMAKE_C_COMPILER} + ARGS -o ${_exe_NAME} +$\(${_exe_NAME}_SRC_OBJS\) -nostdlib -nostartfiles -Lecos/install/lib -Ttarget.ld + ) + +#add the created files to the make_clean_files + SET(ECOS_ADD_MAKE_CLEAN_FILES ${ECOS_ADD_MAKE_CLEAN_FILES};${_exe_NAME};) +#and another command... + SET_DIRECTORY_PROPERTIES( + PROPERTIES + ADDITIONAL_MAKE_CLEAN_FILES "${ECOS_ADD_MAKE_CLEAN_FILES}" + ) +ENDMACRO(ECOS_ADD_EXECUTABLE) +# END of macro + +#calling a self-defined function, variables are also blue here +ECOS_ADD_EXECUTABLE(${PROJECT_NAME} ${the_sources} ${qt4_moc_SRCS}) + + + -- cgit v1.2.3