: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<title>CodeMirror: CMake mode</title>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script>
<script src="cmake.js"></script>
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
.cm-s-default span.cm-arrow { color: red; }
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
<li><a href="../../index.html">Home</a>
<li><a href="../../doc/manual.html">Manual</a>
<li><a href="https://github.com/codemirror/codemirror">Code</a>
<li><a href="../index.html">Language modes</a>
<li><a class=active href="#">CMake</a>
<form><textarea id="code" name="code">
# default to Release build for GCC builds
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel."
message(STATUS "cmake version ${CMAKE_VERSION}")
cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang
cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckSymbolExists)
include(CheckCXXCompilerFlag)
# X265_BUILD must be incremented each time the public API is changed
configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
"${PROJECT_BINARY_DIR}/x265.def")
configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
"${PROJECT_BINARY_DIR}/x265_config.h")
SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
# System architecture detection
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
set(X86_ALIASES x86 i386 i686 x86_64 amd64)
list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
message(STATUS "Detected x86 target processor")
add_definitions(-DX265_ARCH_X86=1)
if("${CMAKE_SIZEOF_VOID_P}" MATCHES 8)
add_definitions(-DX86_64=1)
elseif(${SYSPROC} STREQUAL "armv6l")
message(STATUS "Detected ARM target processor")
add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1)
message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown")
message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}")
list(APPEND PLATFORM_LIBS pthread)
list(APPEND PLATFORM_LIBS rt)
list(APPEND CMAKE_REQUIRED_LIBRARIES ${NUMA_LIBRARY})
check_symbol_exists(numa_node_of_cpu numa.h NUMA_V2)
add_definitions(-DHAVE_LIBNUMA)
message(STATUS "libnuma found, building with support for NUMA nodes")
list(APPEND PLATFORM_LIBS ${NUMA_LIBRARY})
link_directories(${NUMA_LIBRARY_DIR})
include_directories(${NUMA_INCLUDE_DIR})
mark_as_advanced(LIBRT NUMA_FOUND)
option(ENABLE_PIC "Enable Position Independent Code" ON)
option(ENABLE_PIC "Enable Position Independent Code" OFF)
if(CMAKE_GENERATOR STREQUAL "Xcode")
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
<p><strong>MIME types defined:</strong> <code>text/x-cmake</code>.</p>