File: highlight.cmake

package info (click to toggle)
libsyntax-highlight-engine-kate-perl 0.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 3,848 kB
  • sloc: perl: 84,065; ruby: 176; asm: 166; cpp: 144; jsp: 128; haskell: 116; sh: 111; f90: 99; python: 98; ml: 75; xml: 43; yacc: 37; ansic: 32; tcl: 29; lisp: 24; makefile: 14; awk: 13; php: 5
file content (48 lines) | stat: -rw-r--r-- 1,499 bytes parent folder | download | duplicates (10)
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})