Changeset View
Changeset View
Standalone View
Standalone View
autotests/folding/highlight.cmake.fold
1 | #this CMakeLists.txt doesn't do anything useful, but it shoudl demonstrate the cmake syntax highlighting | 1 | #this CMakeLists.txt doesn't do anything useful, but it shoudl demonstrate the cmake syntax highlighting | ||
---|---|---|---|---|---|
2 | #Alexander Neundorf <neundorf@kde.org> | 2 | #Alexander Neundorf <neundorf@kde.org> | ||
3 | 3 | | |||
4 | #ok this is a comment | 4 | #ok this is a comment | ||
5 | #and another line | 5 | #and another line | ||
6 | #a built-in command, it's bold black | 6 | #a built-in command, it's bold black | ||
7 | ADD_DEFINITIONS(-Wall -Wctor-dtor-privacy -Woverloaded-virtual -Wno-long-long -pipe -fno-builtin -fno-exceptions) | 7 | ADD_DEFINITIONS(-Wall -Wctor-dtor-privacy -Woverloaded-virtual -Wno-long-long -pipe -fno-builtin -fno-exceptions) | ||
8 | 8 | | |||
9 | #and another function | 9 | #and another function | ||
10 | INCLUDE_DIRECTORIES( | 10 | INCLUDE_DIRECTORIES( | ||
11 | #comments are also highlighted inside function parameters | 11 | #comments are also highlighted inside function parameters | ||
12 | #variables are Qt::blue | 12 | #variables are Qt::blue | ||
13 | ${CMAKE_CURRENT_SOURCE_DIR}/../../lib/qt4/include/Qt | 13 | ${CMAKE_CURRENT_SOURCE_DIR}/../../lib/qt4/include/Qt | ||
14 | ) | 14 | ) | ||
15 | 15 | | |||
16 | <beginfold id='5'># BEGIN defining a macro</beginfold id='5'> | 16 | <beginfold id='5'># BEGIN defining a macro</beginfold id='5'> | ||
17 | MACRO(ECOS_ADD_EXECUTABLE _exe_NAME ) | 17 | <beginfold id='2'>MACRO</beginfold id='2'>(ECOS_ADD_EXECUTABLE _exe_NAME ) | ||
18 | 18 | | |||
19 | #special parameters are italic, see the STATIC in the next line | 19 | #special parameters are italic, see the STATIC in the next line | ||
20 | ADD_LIBRARY(${_exe_NAME} STATIC ${ARGN}) | 20 | ADD_LIBRARY(${_exe_NAME} STATIC ${ARGN}) | ||
21 | #but not in the following line ? | 21 | #but not in the following line ? | ||
22 | ADD_LIBRARY(${_exe_NAME} STATIC ${ARGN}) | 22 | ADD_LIBRARY(${_exe_NAME} STATIC ${ARGN}) | ||
23 | # it seems the kate highlighting file could need some love, Alex | 23 | # it seems the kate highlighting file could need some love, Alex | ||
24 | 24 | | |||
25 | 25 | | |||
26 | #another command with a bunch of variables and special parameters | 26 | #another command with a bunch of variables and special parameters | ||
27 | ADD_CUSTOM_COMMAND( | 27 | ADD_CUSTOM_COMMAND( | ||
28 | TARGET ${_exe_NAME} | 28 | TARGET ${_exe_NAME} | ||
29 | PRE_LINK | 29 | PRE_LINK | ||
30 | COMMAND ${CMAKE_C_COMPILER} | 30 | COMMAND ${CMAKE_C_COMPILER} | ||
31 | ARGS -o ${_exe_NAME} | 31 | ARGS -o ${_exe_NAME} | ||
32 | $\(${_exe_NAME}_SRC_OBJS\) -nostdlib -nostartfiles -Lecos/install/lib -Ttarget.ld | 32 | $\(${_exe_NAME}_SRC_OBJS\) -nostdlib -nostartfiles -Lecos/install/lib -Ttarget.ld | ||
33 | ) | 33 | ) | ||
34 | 34 | | |||
35 | #add the created files to the make_clean_files | 35 | #add the created files to the make_clean_files | ||
36 | SET(ECOS_ADD_MAKE_CLEAN_FILES ${ECOS_ADD_MAKE_CLEAN_FILES};${_exe_NAME};) | 36 | SET(ECOS_ADD_MAKE_CLEAN_FILES ${ECOS_ADD_MAKE_CLEAN_FILES};${_exe_NAME};) | ||
37 | #and another command... | 37 | #and another command... | ||
38 | SET_DIRECTORY_PROPERTIES( | 38 | SET_DIRECTORY_PROPERTIES( | ||
39 | PROPERTIES | 39 | PROPERTIES | ||
40 | ADDITIONAL_MAKE_CLEAN_FILES "${ECOS_ADD_MAKE_CLEAN_FILES}" | 40 | ADDITIONAL_MAKE_CLEAN_FILES "${ECOS_ADD_MAKE_CLEAN_FILES}" | ||
41 | ) | 41 | ) | ||
42 | ENDMACRO(ECOS_ADD_EXECUTABLE) | 42 | <endfold id='2'>ENDMACRO</endfold id='2'>(ECOS_ADD_EXECUTABLE) | ||
43 | <endfold id='5'># END of macro</endfold id='5'> | 43 | <endfold id='5'># END of macro</endfold id='5'> | ||
44 | 44 | | |||
45 | #calling a self-defined function, variables are also Qt::blue here | 45 | #calling a self-defined function, variables are also Qt::blue here | ||
46 | ECOS_ADD_EXECUTABLE(${PROJECT_NAME} ${the_sources} ${qt4_moc_SRCS}) | 46 | ECOS_ADD_EXECUTABLE(${PROJECT_NAME} ${the_sources} ${qt4_moc_SRCS}) | ||
47 | 47 | | |||
48 | <beginfold id='1'>if</beginfold id='1'>((A AND B) OR C) | 48 | <beginfold id='1'>if</beginfold id='1'>((A AND B) OR C) | ||
49 | <endfold id='1'>endif</endfold id='1'>() | 49 | <endfold id='1'>endif</endfold id='1'>() | ||
50 | 50 | | |||
51 | 51 | |