haikuwebkit/CMakeLists.txt

49 lines
2.0 KiB
CMake
Raw Permalink Normal View History

# -----------------------------------------------------------------------------
# Determine CMake version and build type.
# -----------------------------------------------------------------------------
[CMake] Use builtin FindICU https://bugs.webkit.org/show_bug.cgi?id=197934 Reviewed by Michael Catanzaro. .: Update CMake minimum required to 3.7. 3.7 has a FindICU module so the WebKit one is removed. For non-Apple ports this just requires adding individual components of ICU to find_package(ICU). For Apple ports the module does not work so the targets created in FindICU are mirrored in target/icu.cmake. * CMakeLists.txt: * Source/cmake/FindICU.cmake: Removed. * Source/cmake/OptionsAppleWin.cmake: * Source/cmake/OptionsGTK.cmake: * Source/cmake/OptionsJSCOnly.cmake: * Source/cmake/OptionsMac.cmake: * Source/cmake/OptionsPlayStation.cmake: * Source/cmake/OptionsWPE.cmake: * Source/cmake/OptionsWin.cmake: * Source/cmake/OptionsWinCairo.cmake: * Source/cmake/target/icu.cmake: Added. Source/JavaScriptCore: Remove uses of ICU_INCLUDE_DIRS and ICU_LIBRARIES. * CMakeLists.txt: * PlatformWin.cmake: Source/WebCore: Remove uses of ICU_INCLUDE_DIRS and ICU_LIBRARIES. * CMakeLists.txt: * PlatformPlayStation.cmake: * PlatformWPE.cmake: Source/WebCore/PAL: Remove uses of ICU_INCLUDE_DIRS and ICU_LIBRARIES. * pal/CMakeLists.txt: Source/WebDriver: Remove uses of ICU_INCLUDE_DIRS and ICU_LIBRARIES. * PlatformWPE.cmake: Source/WebKit: Remove uses of ICU_INCLUDE_DIRS and ICU_LIBRARIES. * CMakeLists.txt: Source/WebKitLegacy: Remove uses of ICU_INCLUDE_DIRS and ICU_LIBRARIES. * CMakeLists.txt: * PlatformWin.cmake: Source/WTF: Remove uses of ICU_INCLUDE_DIRS and ICU_LIBRARIES. Use ICU:: targets which end up propagating to all consumers of WTF. * wtf/CMakeLists.txt: * wtf/PlatformPlayStation.cmake: Tools: Remove uses of ICU_INCLUDE_DIRS and ICU_LIBRARIES. * TestWebKitAPI/PlatformMac.cmake: * TestWebKitAPI/PlatformPlayStation.cmake: * TestWebKitAPI/PlatformWin.cmake: * WebKitTestRunner/CMakeLists.txt: Canonical link: https://commits.webkit.org/212113@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-05-18 02:38:38 +00:00
# NOTE: cmake_minimum_required() and project() *MUST* be the two first commands
# used, see https://cmake.org/cmake/help/v3.3/command/project.html -- the
# latter in particular handles loading a bunch of shared CMake definitions
# and loading the cross-compilation settings from CMAKE_TOOLCHAIN_FILE.
#
# cmake_minimum_required is also set inside Source/${FRAMEWORK}/CMakeLists.txt
# in support of the AppleWin internal build so this version should be kept in
# sync across those files.
#
cmake_minimum_required(VERSION 3.12)
project(WebKit)
# -----------------------------------------------------------------------------
# Common configuration
#------------------------------------------------------------------------------
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Source/cmake")
include(WebKitCommon)
# -----------------------------------------------------------------------------
# Enable API unit tests and create a target for the test runner
# -----------------------------------------------------------------------------
[CMake] Unify coding style for CMake files https://bugs.webkit.org/show_bug.cgi?id=103605 Patch by Halton Huo <halton.huo@intel.com> on 2012-12-05 Reviewed by Laszlo Gombos. Update cmake files(.cmake, CMakeLists.txt) with following style rules: 1. Indentation 1.1 Use spaces, not tabs. 1.2 Four spaces as indent. 2. Spacing 2.1 Place one space between control statements and their parentheses. For eg, if (), else (), elseif (), endif (), foreach (), endforeach (), while (), endwhile (), break (). 2.2 Do not place spaces between function and macro statements and their parentheses. For eg, macro(), endmacro(), function(), endfunction(). 2.3 Do not place spaces between a command or function or macro and its parentheses, or between a parenthesis and its content. For eg, message("testing") not message( "testing") or message ("testing" ) 2.4 No space at line ending. 3. Lowercase when call commands macros and functions. For eg, add_executable() not ADD_EXECUTABLE(), set() not SET(). .: * CMakeLists.txt: * Source/CMakeLists.txt: * Source/PlatformEfl.cmake: * Source/cmake/EFLHelpers.cmake: * Source/cmake/FindATK.cmake: * Source/cmake/FindCFLite.cmake: * Source/cmake/FindCairo.cmake: * Source/cmake/FindDBus.cmake: * Source/cmake/FindDirectX.cmake: * Source/cmake/FindE_DBus.cmake: * Source/cmake/FindEcore.cmake: * Source/cmake/FindEdje.cmake: * Source/cmake/FindEet.cmake: * Source/cmake/FindEeze.cmake: * Source/cmake/FindEfreet.cmake: * Source/cmake/FindEina.cmake: * Source/cmake/FindElementary.cmake: * Source/cmake/FindEnchant.cmake: * Source/cmake/FindEvas.cmake: * Source/cmake/FindFontconfig.cmake: * Source/cmake/FindGLIB.cmake: * Source/cmake/FindGStreamer.cmake: * Source/cmake/FindGperf.cmake: * Source/cmake/FindHarfBuzz.cmake: * Source/cmake/FindICU.cmake: * Source/cmake/FindLibSoup.cmake: * Source/cmake/FindQuickTimeSDK.cmake: * Source/cmake/FindSqlite.cmake: * Source/cmake/OptionsBlackBerry.cmake: * Source/cmake/OptionsCommon.cmake: * Source/cmake/OptionsEfl.cmake: * Source/cmake/OptionsWinCE.cmake: * Source/cmake/OptionsWindows.cmake: * Source/cmake/WebKitFS.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitHelpers.cmake: * Source/cmake/WebKitMacros.cmake: * Source/cmake/WebKitPackaging.cmake: * Source/cmake/gtest/CMakeLists.txt: Source/JavaScriptCore: * CMakeLists.txt: * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * PlatformWinCE.cmake: * shell/CMakeLists.txt: * shell/PlatformBlackBerry.cmake: * shell/PlatformEfl.cmake: * shell/PlatformWinCE.cmake: Source/WebCore: * CMakeLists.txt: * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * PlatformWinCE.cmake: * UseJSC.cmake: * UseV8.cmake: Source/WebKit: * CMakeLists.txt: * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * PlatformWinCE.cmake: Source/WebKit/efl: * DefaultTheme/CMakeLists.txt: Source/WebKit2: * CMakeLists.txt: * PlatformEfl.cmake: * win/WebKit2ExportGenerator.vcproj: * win/WebKit2ExportGeneratorCommon.vsprops: Source/WTF: * CMakeLists.txt: * wtf/CMakeLists.txt: * wtf/PlatformBlackBerry.cmake: * wtf/PlatformEfl.cmake: * wtf/PlatformWinCE.cmake: Tools: * CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/efl/CMakeLists.txt: * EWebLauncher/CMakeLists.txt: * EWebLauncher/ControlTheme/CMakeLists.txt: * MiniBrowser/efl/CMakeLists.txt: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformEfl.cmake: * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/PlatformEfl.cmake: * WinCELauncher/CMakeLists.txt: * clang/ReportMemoryUsagePlugin/CMakeLists.txt: Canonical link: https://commits.webkit.org/122367@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-06 03:10:13 +00:00
if (ENABLE_API_TESTS)
enable_testing()
endif ()
# -----------------------------------------------------------------------------
# Add module directories
# -----------------------------------------------------------------------------
[CMake] Unify coding style for CMake files https://bugs.webkit.org/show_bug.cgi?id=103605 Patch by Halton Huo <halton.huo@intel.com> on 2012-12-05 Reviewed by Laszlo Gombos. Update cmake files(.cmake, CMakeLists.txt) with following style rules: 1. Indentation 1.1 Use spaces, not tabs. 1.2 Four spaces as indent. 2. Spacing 2.1 Place one space between control statements and their parentheses. For eg, if (), else (), elseif (), endif (), foreach (), endforeach (), while (), endwhile (), break (). 2.2 Do not place spaces between function and macro statements and their parentheses. For eg, macro(), endmacro(), function(), endfunction(). 2.3 Do not place spaces between a command or function or macro and its parentheses, or between a parenthesis and its content. For eg, message("testing") not message( "testing") or message ("testing" ) 2.4 No space at line ending. 3. Lowercase when call commands macros and functions. For eg, add_executable() not ADD_EXECUTABLE(), set() not SET(). .: * CMakeLists.txt: * Source/CMakeLists.txt: * Source/PlatformEfl.cmake: * Source/cmake/EFLHelpers.cmake: * Source/cmake/FindATK.cmake: * Source/cmake/FindCFLite.cmake: * Source/cmake/FindCairo.cmake: * Source/cmake/FindDBus.cmake: * Source/cmake/FindDirectX.cmake: * Source/cmake/FindE_DBus.cmake: * Source/cmake/FindEcore.cmake: * Source/cmake/FindEdje.cmake: * Source/cmake/FindEet.cmake: * Source/cmake/FindEeze.cmake: * Source/cmake/FindEfreet.cmake: * Source/cmake/FindEina.cmake: * Source/cmake/FindElementary.cmake: * Source/cmake/FindEnchant.cmake: * Source/cmake/FindEvas.cmake: * Source/cmake/FindFontconfig.cmake: * Source/cmake/FindGLIB.cmake: * Source/cmake/FindGStreamer.cmake: * Source/cmake/FindGperf.cmake: * Source/cmake/FindHarfBuzz.cmake: * Source/cmake/FindICU.cmake: * Source/cmake/FindLibSoup.cmake: * Source/cmake/FindQuickTimeSDK.cmake: * Source/cmake/FindSqlite.cmake: * Source/cmake/OptionsBlackBerry.cmake: * Source/cmake/OptionsCommon.cmake: * Source/cmake/OptionsEfl.cmake: * Source/cmake/OptionsWinCE.cmake: * Source/cmake/OptionsWindows.cmake: * Source/cmake/WebKitFS.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitHelpers.cmake: * Source/cmake/WebKitMacros.cmake: * Source/cmake/WebKitPackaging.cmake: * Source/cmake/gtest/CMakeLists.txt: Source/JavaScriptCore: * CMakeLists.txt: * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * PlatformWinCE.cmake: * shell/CMakeLists.txt: * shell/PlatformBlackBerry.cmake: * shell/PlatformEfl.cmake: * shell/PlatformWinCE.cmake: Source/WebCore: * CMakeLists.txt: * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * PlatformWinCE.cmake: * UseJSC.cmake: * UseV8.cmake: Source/WebKit: * CMakeLists.txt: * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * PlatformWinCE.cmake: Source/WebKit/efl: * DefaultTheme/CMakeLists.txt: Source/WebKit2: * CMakeLists.txt: * PlatformEfl.cmake: * win/WebKit2ExportGenerator.vcproj: * win/WebKit2ExportGeneratorCommon.vsprops: Source/WTF: * CMakeLists.txt: * wtf/CMakeLists.txt: * wtf/PlatformBlackBerry.cmake: * wtf/PlatformEfl.cmake: * wtf/PlatformWinCE.cmake: Tools: * CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/efl/CMakeLists.txt: * EWebLauncher/CMakeLists.txt: * EWebLauncher/ControlTheme/CMakeLists.txt: * MiniBrowser/efl/CMakeLists.txt: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformEfl.cmake: * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/PlatformEfl.cmake: * WinCELauncher/CMakeLists.txt: * clang/ReportMemoryUsagePlugin/CMakeLists.txt: Canonical link: https://commits.webkit.org/122367@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-06 03:10:13 +00:00
add_subdirectory(Source)
# -----------------------------------------------------------------------------
# Add tools
# -----------------------------------------------------------------------------
[CMake] Unify coding style for CMake files https://bugs.webkit.org/show_bug.cgi?id=103605 Patch by Halton Huo <halton.huo@intel.com> on 2012-12-05 Reviewed by Laszlo Gombos. Update cmake files(.cmake, CMakeLists.txt) with following style rules: 1. Indentation 1.1 Use spaces, not tabs. 1.2 Four spaces as indent. 2. Spacing 2.1 Place one space between control statements and their parentheses. For eg, if (), else (), elseif (), endif (), foreach (), endforeach (), while (), endwhile (), break (). 2.2 Do not place spaces between function and macro statements and their parentheses. For eg, macro(), endmacro(), function(), endfunction(). 2.3 Do not place spaces between a command or function or macro and its parentheses, or between a parenthesis and its content. For eg, message("testing") not message( "testing") or message ("testing" ) 2.4 No space at line ending. 3. Lowercase when call commands macros and functions. For eg, add_executable() not ADD_EXECUTABLE(), set() not SET(). .: * CMakeLists.txt: * Source/CMakeLists.txt: * Source/PlatformEfl.cmake: * Source/cmake/EFLHelpers.cmake: * Source/cmake/FindATK.cmake: * Source/cmake/FindCFLite.cmake: * Source/cmake/FindCairo.cmake: * Source/cmake/FindDBus.cmake: * Source/cmake/FindDirectX.cmake: * Source/cmake/FindE_DBus.cmake: * Source/cmake/FindEcore.cmake: * Source/cmake/FindEdje.cmake: * Source/cmake/FindEet.cmake: * Source/cmake/FindEeze.cmake: * Source/cmake/FindEfreet.cmake: * Source/cmake/FindEina.cmake: * Source/cmake/FindElementary.cmake: * Source/cmake/FindEnchant.cmake: * Source/cmake/FindEvas.cmake: * Source/cmake/FindFontconfig.cmake: * Source/cmake/FindGLIB.cmake: * Source/cmake/FindGStreamer.cmake: * Source/cmake/FindGperf.cmake: * Source/cmake/FindHarfBuzz.cmake: * Source/cmake/FindICU.cmake: * Source/cmake/FindLibSoup.cmake: * Source/cmake/FindQuickTimeSDK.cmake: * Source/cmake/FindSqlite.cmake: * Source/cmake/OptionsBlackBerry.cmake: * Source/cmake/OptionsCommon.cmake: * Source/cmake/OptionsEfl.cmake: * Source/cmake/OptionsWinCE.cmake: * Source/cmake/OptionsWindows.cmake: * Source/cmake/WebKitFS.cmake: * Source/cmake/WebKitFeatures.cmake: * Source/cmake/WebKitHelpers.cmake: * Source/cmake/WebKitMacros.cmake: * Source/cmake/WebKitPackaging.cmake: * Source/cmake/gtest/CMakeLists.txt: Source/JavaScriptCore: * CMakeLists.txt: * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * PlatformWinCE.cmake: * shell/CMakeLists.txt: * shell/PlatformBlackBerry.cmake: * shell/PlatformEfl.cmake: * shell/PlatformWinCE.cmake: Source/WebCore: * CMakeLists.txt: * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * PlatformWinCE.cmake: * UseJSC.cmake: * UseV8.cmake: Source/WebKit: * CMakeLists.txt: * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * PlatformWinCE.cmake: Source/WebKit/efl: * DefaultTheme/CMakeLists.txt: Source/WebKit2: * CMakeLists.txt: * PlatformEfl.cmake: * win/WebKit2ExportGenerator.vcproj: * win/WebKit2ExportGeneratorCommon.vsprops: Source/WTF: * CMakeLists.txt: * wtf/CMakeLists.txt: * wtf/PlatformBlackBerry.cmake: * wtf/PlatformEfl.cmake: * wtf/PlatformWinCE.cmake: Tools: * CMakeLists.txt: * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: * DumpRenderTree/efl/CMakeLists.txt: * EWebLauncher/CMakeLists.txt: * EWebLauncher/ControlTheme/CMakeLists.txt: * MiniBrowser/efl/CMakeLists.txt: * TestWebKitAPI/CMakeLists.txt: * TestWebKitAPI/PlatformEfl.cmake: * WebKitTestRunner/CMakeLists.txt: * WebKitTestRunner/PlatformEfl.cmake: * WinCELauncher/CMakeLists.txt: * clang/ReportMemoryUsagePlugin/CMakeLists.txt: Canonical link: https://commits.webkit.org/122367@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-12-06 03:10:13 +00:00
if (ENABLE_TOOLS)
add_subdirectory(Tools)
endif ()
if (DEVELOPER_MODE)
add_subdirectory(PerformanceTests)
endif ()
[Linux] Port MallocBench https://bugs.webkit.org/show_bug.cgi?id=177856 Reviewed by Filip Pizlo. .: * CMakeLists.txt: PerformanceTests: We would like to optimize locking in bmalloc in Linux by using futex APIs. So we should have the way to ensure this actually improves / does not regress the performance. This patch ports MallocBench to Linux to measure/ensure the effect of bmalloc patch in Linux. While we replace the dispatch serial queue in message.cpp, we still use libdispatch in Benchmark.cpp since we do not have priority mechanism in C++11 threading implementation. We also extend run-malloc-benchmarks to accept cmake style layout of build product directory. And we also support building MallocBench in CMake environment including CMake Mac ports. Currently, we do not support Windows yet. Based on the measurement, we can say the following observation. glibc's malloc performance is not so bad. While bmalloc shows 3.8x (in geomean) performance improvement, bmalloc in Linux shows 2.0x improvement. Since both numbers in bmalloc are similar, we can think that bmalloc's optimization is actually working in Linux too. And even though glibc's malloc perofmrnace is not so bad, bmalloc still offers performance improvement. * CMakeLists.txt: Added. * MallocBench/CMakeLists.txt: Added. * MallocBench/MallocBench.xcodeproj/project.pbxproj: * MallocBench/MallocBench/Benchmark.cpp: (Benchmark::Benchmark): (Benchmark::runOnce): (Benchmark::currentMemoryBytes): Deleted. * MallocBench/MallocBench/Benchmark.h: (Benchmark::Memory::Memory): Deleted. (Benchmark::Memory::operator-): Deleted. * MallocBench/MallocBench/CMakeLists.txt: Added. * MallocBench/MallocBench/CPUCount.cpp: (cpuCount): * MallocBench/MallocBench/Interpreter.cpp: (Interpreter::doMallocOp): * MallocBench/MallocBench/Memory.cpp: Added. (currentMemoryBytes): * MallocBench/MallocBench/Memory.h: Copied from PerformanceTests/MallocBench/MallocBench/CPUCount.cpp. (Memory::Memory): (Memory::operator-): * MallocBench/MallocBench/balloon.cpp: (benchmark_balloon): * MallocBench/MallocBench/mbmalloc.cpp: * MallocBench/MallocBench/message.cpp: (WorkQueue::WorkQueue): (WorkQueue::~WorkQueue): (WorkQueue::dispatchAsync): (WorkQueue::dispatchSync): (benchmark_message_one): (benchmark_message_many): * MallocBench/MallocBench/nimlang.cpp: (benchmark_nimlang): * MallocBench/MallocBench/stress.cpp: (SizeStream::next): * MallocBench/MallocBench/stress_aligned.cpp: * MallocBench/run-malloc-benchmarks: Source/bmalloc: * CMakeLists.txt: Canonical link: https://commits.webkit.org/194175@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-10-05 07:05:44 +00:00
# -----------------------------------------------------------------------------
# Print the features list last, for maximum visibility.
# -----------------------------------------------------------------------------
PRINT_WEBKIT_OPTIONS()