summaryrefslogtreecommitdiffstats
path: root/kate/tests/highlight.cmake
blob: cb8eaaa511311379ee1b5256ecc3672f0c4ad5e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#this CMakeLists.txt doesn't do anything useful, but it shoudl demonstrate the cmake syntax highlighting
#Alexander Neundorf <neundorf@kde.org>

#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})