File modules/editor/codemirror/mode/cmake/index.html

Last commit: Sun Dec 17 01:14:09 2017 +0100	Jan Dankert	Integration eines weiteren Code-Editors: Codemirror. Demnächst müssen wir hier mal aufräumen und andere Editoren rauswerfen.
1 <!doctype html> 2 3 <title>CodeMirror: CMake mode</title> 4 <meta charset="utf-8"/> 5 <link rel=stylesheet href="../../doc/docs.css"> 6 7 <link rel="stylesheet" href="../../lib/codemirror.css"> 8 <script src="../../lib/codemirror.js"></script> 9 <script src="../../addon/edit/matchbrackets.js"></script> 10 <script src="cmake.js"></script> 11 <style> 12 .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;} 13 .cm-s-default span.cm-arrow { color: red; } 14 </style> 15 <div id=nav> 16 <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a> 17 18 <ul> 19 <li><a href="../../index.html">Home</a> 20 <li><a href="../../doc/manual.html">Manual</a> 21 <li><a href="https://github.com/codemirror/codemirror">Code</a> 22 </ul> 23 <ul> 24 <li><a href="../index.html">Language modes</a> 25 <li><a class=active href="#">CMake</a> 26 </ul> 27 </div> 28 29 <article> 30 <h2>CMake mode</h2> 31 <form><textarea id="code" name="code"> 32 # vim: syntax=cmake 33 if(NOT CMAKE_BUILD_TYPE) 34 # default to Release build for GCC builds 35 set(CMAKE_BUILD_TYPE Release CACHE STRING 36 "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." 37 FORCE) 38 endif() 39 message(STATUS "cmake version ${CMAKE_VERSION}") 40 if(POLICY CMP0025) 41 cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang 42 endif() 43 if(POLICY CMP0042) 44 cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH 45 endif() 46 47 project (x265) 48 cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8 49 include(CheckIncludeFiles) 50 include(CheckFunctionExists) 51 include(CheckSymbolExists) 52 include(CheckCXXCompilerFlag) 53 54 # X265_BUILD must be incremented each time the public API is changed 55 set(X265_BUILD 48) 56 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in" 57 "${PROJECT_BINARY_DIR}/x265.def") 58 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in" 59 "${PROJECT_BINARY_DIR}/x265_config.h") 60 61 SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") 62 63 # System architecture detection 64 string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC) 65 set(X86_ALIASES x86 i386 i686 x86_64 amd64) 66 list(FIND X86_ALIASES "${SYSPROC}" X86MATCH) 67 if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1") 68 message(STATUS "Detected x86 target processor") 69 set(X86 1) 70 add_definitions(-DX265_ARCH_X86=1) 71 if("${CMAKE_SIZEOF_VOID_P}" MATCHES 8) 72 set(X64 1) 73 add_definitions(-DX86_64=1) 74 endif() 75 elseif(${SYSPROC} STREQUAL "armv6l") 76 message(STATUS "Detected ARM target processor") 77 set(ARM 1) 78 add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1) 79 else() 80 message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown") 81 message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}") 82 endif() 83 84 if(UNIX) 85 list(APPEND PLATFORM_LIBS pthread) 86 find_library(LIBRT rt) 87 if(LIBRT) 88 list(APPEND PLATFORM_LIBS rt) 89 endif() 90 find_package(Numa) 91 if(NUMA_FOUND) 92 list(APPEND CMAKE_REQUIRED_LIBRARIES ${NUMA_LIBRARY}) 93 check_symbol_exists(numa_node_of_cpu numa.h NUMA_V2) 94 if(NUMA_V2) 95 add_definitions(-DHAVE_LIBNUMA) 96 message(STATUS "libnuma found, building with support for NUMA nodes") 97 list(APPEND PLATFORM_LIBS ${NUMA_LIBRARY}) 98 link_directories(${NUMA_LIBRARY_DIR}) 99 include_directories(${NUMA_INCLUDE_DIR}) 100 endif() 101 endif() 102 mark_as_advanced(LIBRT NUMA_FOUND) 103 endif(UNIX) 104 105 if(X64 AND NOT WIN32) 106 option(ENABLE_PIC "Enable Position Independent Code" ON) 107 else() 108 option(ENABLE_PIC "Enable Position Independent Code" OFF) 109 endif(X64 AND NOT WIN32) 110 111 # Compiler detection 112 if(CMAKE_GENERATOR STREQUAL "Xcode") 113 set(XCODE 1) 114 endif() 115 if (APPLE) 116 add_definitions(-DMACOS) 117 endif() 118 </textarea></form> 119 <script> 120 var editor = CodeMirror.fromTextArea(document.getElementById("code"), { 121 mode: "text/x-cmake", 122 matchBrackets: true, 123 indentUnit: 4 124 }); 125 </script> 126 127 <p><strong>MIME types defined:</strong> <code>text/x-cmake</code>.</p> 128 129 </article>
Download modules/editor/codemirror/mode/cmake/index.html
History Sun, 17 Dec 2017 01:14:09 +0100 Jan Dankert Integration eines weiteren Code-Editors: Codemirror. Demnächst müssen wir hier mal aufräumen und andere Editoren rauswerfen.