[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:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@136790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 79c5fa16
This diff is collapsed.
2012-12-05 Halton Huo <halton.huo@intel.com>
[CMake] Unify coding style for CMake files
https://bugs.webkit.org/show_bug.cgi?id=103605
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:
2012-12-05 Yong Li <yoli@rim.com>
[BlackBerry] Build with libjpegturbo
......
# -----------------------------------------------------------------------------
# Add module directories
# -----------------------------------------------------------------------------
ADD_SUBDIRECTORY(WTF)
add_subdirectory(WTF)
ADD_SUBDIRECTORY(JavaScriptCore)
add_subdirectory(JavaScriptCore)
IF (ENABLE_API_TESTS)
ADD_SUBDIRECTORY(cmake/gtest)
ENDIF ()
if (ENABLE_API_TESTS)
add_subdirectory(cmake/gtest)
endif ()
IF (ENABLE_WEBCORE)
ADD_SUBDIRECTORY(WebCore)
ENDIF ()
if (ENABLE_WEBCORE)
add_subdirectory(WebCore)
endif ()
IF (ENABLE_WEBKIT)
ADD_SUBDIRECTORY(WebKit)
ENDIF ()
if (ENABLE_WEBKIT)
add_subdirectory(WebKit)
endif ()
IF (ENABLE_WEBKIT2)
ADD_SUBDIRECTORY(WebKit2)
ENDIF ()
if (ENABLE_WEBKIT2)
add_subdirectory(WebKit2)
endif ()
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
# -----------------------------------------------------------------------------
# Set compiler flags for all targets
# -----------------------------------------------------------------------------
IF (${PORT} STREQUAL "Efl")
SET(ADDITIONAL_FLAGS ENABLE_WERROR)
ENDIF ()
if (${PORT} STREQUAL "Efl")
set(ADDITIONAL_FLAGS ENABLE_WERROR)
endif ()
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${JavaScriptCore_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCoreTestSupport_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
IF (ENABLE_WEBCORE)
if (ENABLE_WEBCORE)
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCore_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
ENDIF ()
endif ()
IF (ENABLE_WEBKIT)
if (ENABLE_WEBKIT)
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
ENDIF ()
endif ()
IF (ENABLE_WEBKIT2)
if (ENABLE_WEBKIT2)
WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit2_LIBRARY_NAME} ${ADDITIONAL_FLAGS})
ENDIF ()
endif ()
# -----------------------------------------------------------------------------
# Create the configuration file
# -----------------------------------------------------------------------------
CONFIGURE_FILE(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)
configure_file(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)
SET(JavaScriptCore_INCLUDE_DIRECTORIES
set(JavaScriptCore_INCLUDE_DIRECTORIES
"${CMAKE_BINARY_DIR}"
"${JAVASCRIPTCORE_DIR}"
"${JAVASCRIPTCORE_DIR}/API"
......@@ -23,7 +23,7 @@ SET(JavaScriptCore_INCLUDE_DIRECTORIES
"${CMAKE_SOURCE_DIR}/Source"
)
SET(JavaScriptCore_SOURCES
set(JavaScriptCore_SOURCES
API/JSBase.cpp
API/JSCallbackConstructor.cpp
API/JSCallbackFunction.cpp
......@@ -36,7 +36,7 @@ SET(JavaScriptCore_SOURCES
API/JSValueRef.cpp
API/JSWeakObjectMapRefPrivate.cpp
API/OpaqueJSString.cpp
assembler/MacroAssembler.cpp
assembler/LinkBuffer.cpp
......@@ -108,7 +108,7 @@ SET(JavaScriptCore_SOURCES
dfg/DFGVariableEventStream.cpp
dfg/DFGValidate.cpp
dfg/DFGVirtualRegisterAllocationPhase.cpp
disassembler/Disassembler.cpp
heap/BlockAllocator.cpp
......@@ -138,7 +138,7 @@ SET(JavaScriptCore_SOURCES
debugger/Debugger.cpp
debugger/DebuggerActivation.cpp
debugger/DebuggerCallFrame.cpp
interpreter/AbstractPC.cpp
interpreter/CallFrame.cpp
interpreter/Interpreter.cpp
......@@ -301,7 +301,7 @@ SET(JavaScriptCore_SOURCES
yarr/YarrSyntaxChecker.cpp
)
SET(JavaScriptCore_LUT_FILES
set(JavaScriptCore_LUT_FILES
runtime/ArrayConstructor.cpp
runtime/ArrayPrototype.cpp
runtime/BooleanPrototype.cpp
......@@ -323,25 +323,25 @@ SET(JavaScriptCore_LUT_FILES
runtime/StringPrototype.cpp
)
SET(JavaScriptCore_LIBRARIES
set(JavaScriptCore_LIBRARIES
${WTF_LIBRARY_NAME}
)
IF (ENABLE_LLINT)
if (ENABLE_LLINT)
# We cannot check for RUBY_FOUND because it is set only when the full package is installed and
# the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
# for finding the only Ruby interpreter.
IF (NOT RUBY_EXECUTABLE)
MESSAGE(FATAL_ERROR "The Ruby interpreter is needed to generate LLInt files.")
ENDIF ()
if (NOT RUBY_EXECUTABLE)
message(FATAL_ERROR "The Ruby interpreter is needed to generate LLInt files.")
endif ()
SET(LLINT_ASM
set(LLINT_ASM
llint/LowLevelInterpreter.asm
llint/LowLevelInterpreter32_64.asm
llint/LowLevelInterpreter64.asm
)
SET(OFFLINE_ASM
set(OFFLINE_ASM
offlineasm/armv7.rb
offlineasm/ast.rb
offlineasm/backends.rb
......@@ -359,7 +359,7 @@ IF (ENABLE_LLINT)
offlineasm/x86.rb
)
ADD_CUSTOM_COMMAND(
add_custom_command(
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb
DEPENDS ${LLINT_ASM} ${OFFLINE_ASM}
......@@ -375,11 +375,11 @@ IF (ENABLE_LLINT)
# Additionally, setting the OBJECT_DEPENDS property will make LLIntDesiredOffsets.h a Makefile
# dependency of both LLIntOffsetsExtractor and LLIntOffsetsExtractor.cpp, so the command will
# actually be run twice!
ADD_EXECUTABLE(LLIntOffsetsExtractor
add_executable(LLIntOffsetsExtractor
${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp
${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
)
TARGET_LINK_LIBRARIES(LLIntOffsetsExtractor ${WTF_LIBRARY_NAME})
target_link_libraries(LLIntOffsetsExtractor ${WTF_LIBRARY_NAME})
# The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
# LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
......@@ -387,7 +387,7 @@ IF (ENABLE_LLINT)
# LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid
# running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
# after every asm.rb run.
ADD_CUSTOM_COMMAND(
add_custom_command(
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM}
......@@ -398,11 +398,11 @@ IF (ENABLE_LLINT)
# The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of
# the .cpp files below is similar to the one in the previous comment. However, since these .cpp
# files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS
# since it is used in the ADD_LIBRARY() call at the end of this file.
LIST(APPEND JavaScriptCore_HEADERS
# since it is used in the add_library() call at the end of this file.
list(APPEND JavaScriptCore_HEADERS
${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
)
LIST(APPEND JavaScriptCore_SOURCES
list(APPEND JavaScriptCore_SOURCES
llint/LLIntCLoop.cpp
llint/LLIntData.cpp
llint/LLIntEntrypoints.cpp
......@@ -411,16 +411,16 @@ IF (ENABLE_LLINT)
llint/LLIntThunks.cpp
llint/LowLevelInterpreter.cpp
)
ENDIF ()
endif ()
# GENERATOR 1-A: LUT creator
FOREACH (_file ${JavaScriptCore_LUT_FILES})
GET_FILENAME_COMPONENT(_name ${_file} NAME_WE)
foreach (_file ${JavaScriptCore_LUT_FILES})
get_filename_component(_name ${_file} NAME_WE)
GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
ENDFOREACH ()
list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
endforeach ()
SET (JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
assembler
bytecode
collector/handles
......@@ -435,7 +435,7 @@ SET (JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
yarr
)
SET (JavaScriptCore_FORWARDING_HEADERS_FILES
set(JavaScriptCore_FORWARDING_HEADERS_FILES
API/APICast.h
API/APIShims.h
API/JavaScript.h
......@@ -460,10 +460,10 @@ SET (JavaScriptCore_FORWARDING_HEADERS_FILES
# GENERATOR 1-B: particular LUT creator (for 1 file only)
GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h MAIN_DEPENDENCY)
LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
#GENERATOR: "RegExpJitTables.h": tables used by Yarr
ADD_CUSTOM_COMMAND(
add_custom_command(
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables
COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
......@@ -472,25 +472,25 @@ ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOU
#GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
ADD_CUSTOM_COMMAND(
add_custom_command(
OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py
COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py ${JAVASCRIPTCORE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
VERBATIM)
ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
IF (WTF_CPU_ARM)
LIST(APPEND JavaScriptCore_SOURCES
if (WTF_CPU_ARM)
list(APPEND JavaScriptCore_SOURCES
assembler/ARMAssembler.cpp
assembler/ARMv7Assembler.cpp
assembler/MacroAssemblerARM.cpp
)
ELSEIF (WTF_CPU_MIPS)
ELSEIF (WTF_CPU_X86)
ELSEIF (WTF_CPU_X86_64)
ELSE ()
MESSAGE(FATAL_ERROR "Unknown CPU")
ENDIF ()
elseif (WTF_CPU_MIPS)
elseif (WTF_CPU_X86)
elseif (WTF_CPU_X86_64)
else ()
message(FATAL_ERROR "Unknown CPU")
endif ()
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
......@@ -498,17 +498,17 @@ WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
WEBKIT_CREATE_FORWARDING_HEADERS(JavaScriptCore DIRECTORIES ${JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES} FILES ${JavaScriptCore_FORWARDING_HEADERS_FILES})
ADD_SUBDIRECTORY(shell)
add_subdirectory(shell)
WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
INCLUDE_DIRECTORIES(${JavaScriptCore_INCLUDE_DIRECTORIES})
ADD_DEFINITIONS(-DBUILDING_JavaScriptCore)
ADD_LIBRARY(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES})
SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
IF (SHARED_CORE)
SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
ENDIF ()
include_directories(${JavaScriptCore_INCLUDE_DIRECTORIES})
add_definitions(-DBUILDING_JavaScriptCore)
add_library(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
target_link_libraries(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES})
set_target_properties(${JavaScriptCore_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
set_target_properties(${JavaScriptCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
if (SHARED_CORE)
set_target_properties(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
install(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
endif ()
2012-12-05 Halton Huo <halton.huo@intel.com>
[CMake] Unify coding style for CMake files
https://bugs.webkit.org/show_bug.cgi?id=103605
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:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
* shell/CMakeLists.txt:
* shell/PlatformBlackBerry.cmake:
* shell/PlatformEfl.cmake:
* shell/PlatformWinCE.cmake:
2012-12-05 Oliver Hunt <oliver@apple.com>
Empty parse cache when receiving a low memory warning
......
LIST(INSERT JavaScriptCore_INCLUDE_DIRECTORIES 0
list(INSERT JavaScriptCore_INCLUDE_DIRECTORIES 0
"${BLACKBERRY_THIRD_PARTY_DIR}/icu"
)
LIST(REMOVE_ITEM JavaScriptCore_SOURCES
list(REMOVE_ITEM JavaScriptCore_SOURCES
runtime/GCActivityCallback.cpp
)
LIST(APPEND JavaScriptCore_SOURCES
list(APPEND JavaScriptCore_SOURCES
runtime/GCActivityCallbackBlackBerry.cpp
runtime/MemoryStatistics.cpp
)
INSTALL(FILES "wtf/Forward.h" DESTINATION usr/include/browser/webkit/wtf)
install(FILES "wtf/Forward.h" DESTINATION usr/include/browser/webkit/wtf)
LIST(APPEND JavaScriptCore_SOURCES
list(APPEND JavaScriptCore_SOURCES
jit/ExecutableAllocatorFixedVMPool.cpp
jit/ExecutableAllocator.cpp
runtime/MemoryStatistics.cpp
)
LIST(APPEND JavaScriptCore_LIBRARIES
list(APPEND JavaScriptCore_LIBRARIES
${ICU_I18N_LIBRARIES}
)
LIST(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
${ICU_INCLUDE_DIRS}
)
IF (ENABLE_GLIB_SUPPORT)
LIST(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
${JAVASCRIPTCORE_DIR}/wtf/gobject
)
ENDIF ()
if (ENABLE_GLIB_SUPPORT)
list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
${JAVASCRIPTCORE_DIR}/wtf/gobject
)
endif ()
LIST(APPEND JavaScriptCore_SOURCES
list(APPEND JavaScriptCore_SOURCES
jit/ExecutableAllocator.cpp
)
IF (ENABLE_JIT AND WTF_CPU_ARM)
ADD_CUSTOM_COMMAND(
if (ENABLE_JIT AND WTF_CPU_ARM)
add_custom_command(
OUTPUT ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm
MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_jit_stubs
DEPENDS ${JAVASCRIPTCORE_DIR}/jit/JITStubs.cpp
COMMAND ${PERL_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_jit_stubs --prefix=MSVC ${JAVASCRIPTCORE_DIR}/jit/JITStubs.cpp > ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm
VERBATIM)
ADD_CUSTOM_COMMAND(
add_custom_command(
OUTPUT ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj
MAIN_DEPENDENCY ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm
COMMAND armasm -nologo ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.asm ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj
VERBATIM)
LIST (APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj)
ENDIF ()
list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/GeneratedJITStubs.obj)
endif ()
SET(JSC_SOURCES
set(JSC_SOURCES
../jsc.cpp
)
SET(JSC_LIBRARIES
set(JSC_LIBRARIES
${WTF_LIBRARY_NAME}
${JavaScriptCore_LIBRARY_NAME}
)
IF ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC")
ADD_DEFINITIONS(-DSTATICALLY_LINKED_WITH_JavaScriptCore)
ENDIF ()
if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC")
add_definitions(-DSTATICALLY_LINKED_WITH_JavaScriptCore)
endif ()
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
WEBKIT_WRAP_SOURCELIST(${JSC_SOURCES})
INCLUDE_DIRECTORIES(./ ${JavaScriptCore_INCLUDE_DIRECTORIES})
ADD_EXECUTABLE(${JSC_EXECUTABLE_NAME} ${JSC_SOURCES})
TARGET_LINK_LIBRARIES(${JSC_EXECUTABLE_NAME} ${JSC_LIBRARIES})
SET_TARGET_PROPERTIES(${JSC_EXECUTABLE_NAME} PROPERTIES FOLDER "JavaScriptCore")
include_directories(./ ${JavaScriptCore_INCLUDE_DIRECTORIES})
add_executable(${JSC_EXECUTABLE_NAME} ${JSC_SOURCES})
target_link_libraries(${JSC_EXECUTABLE_NAME} ${JSC_LIBRARIES})
set_target_properties(${JSC_EXECUTABLE_NAME} PROPERTIES FOLDER "JavaScriptCore")
IF (JSC_LINK_FLAGS)
if (JSC_LINK_FLAGS)
ADD_TARGET_PROPERTIES(${JSC_EXECUTABLE_NAME} LINK_FLAGS "${JSC_LINK_FLAGS}")
ENDIF ()
endif ()
IF (SHOULD_INSTALL_JS_SHELL)
INSTALL(TARGETS ${JSC_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
ENDIF ()
if (SHOULD_INSTALL_JS_SHELL)
install(TARGETS ${JSC_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
endif ()
FIND_STAGING_LIBRARY(SLOG2_LIBRARY slog2)
LIST(APPEND JSC_LIBRARIES
list(APPEND JSC_LIBRARIES
${ICUI18N_LIBRARY}
${ICUUC_LIBRARY}
${INTL_LIBRARY} # Required for x86 builds
......@@ -10,8 +10,8 @@ LIST(APPEND JSC_LIBRARIES
${SLOG2_LIBRARY}
)
IF (PROFILING)
LIST(APPEND JSC_LIBRARIES
if (PROFILING)
list(APPEND JSC_LIBRARIES
${PROFILING_LIBRARY}
)
ENDIF ()
endif ()
LIST(APPEND JSC_LIBRARIES
list(APPEND JSC_LIBRARIES
${GLIB_LIBRARIES}
${ECORE_LIBRARIES}
${CMAKE_DL_LIBS}
......
LIST(APPEND JSC_SOURCES
list(APPEND JSC_SOURCES
../os-win32/WinMain.cpp
)
ADD_SUBDIRECTORY(${WEBKIT_DIR}/efl/DefaultTheme)
add_subdirectory(${WEBKIT_DIR}/efl/DefaultTheme)
IF (ENABLE_INSPECTOR)
ADD_CUSTOM_TARGET(
if (ENABLE_INSPECTOR)
add_custom_target(
web-inspector-resources ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory ${WEBCORE_DIR}/inspector/front-end ${WEB_INSPECTOR_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${WEBCORE_DIR}/English.lproj/localizedStrings.js ${WEB_INSPECTOR_DIR}
......@@ -9,11 +9,11 @@ IF (ENABLE_INSPECTOR)
DEPENDS ${WebCore_LIBRARY_NAME}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
INSTALL(DIRECTORY "${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}"
install(DIRECTORY "${CMAKE_BINARY_DIR}/${WEB_INSPECTOR_DIR}"
DESTINATION ${DATA_INSTALL_DIR}
FILES_MATCHING PATTERN "*.js"
PATTERN "*.html"
PATTERN "*.css"
PATTERN "*.gif"
PATTERN "*.png")
ENDIF ()
endif ()
ADD_SUBDIRECTORY(wtf)
add_subdirectory(wtf)
2012-12-05 Halton Huo <halton.huo@intel.com>
[CMake] Unify coding style for CMake files
https://bugs.webkit.org/show_bug.cgi?id=103605
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:
* wtf/CMakeLists.txt:
* wtf/PlatformBlackBerry.cmake:
* wtf/PlatformEfl.cmake:
* wtf/PlatformWinCE.cmake:
2012-12-04 Jon Lee <jonlee@apple.com>
Extend StringHasher to take a stream of characters
......
SET(WTF_HEADERS
set(WTF_HEADERS
ASCIICType.h
AVLTree.h
Alignment.h
......@@ -153,7 +153,7 @@ SET(WTF_HEADERS
unicode/Unicode.h
)
SET(WTF_SOURCES
set(WTF_SOURCES
ArrayBuffer.cpp
ArrayBufferView.cpp
Assertions.cpp
......@@ -213,7 +213,7 @@ SET(WTF_SOURCES
unicode/UTF8.cpp
)
SET(WTF_INCLUDE_DIRECTORIES
set(WTF_INCLUDE_DIRECTORIES
"${WTF_DIR}"
"${WTF_DIR}/wtf"
"${WTF_DIR}/wtf/dtoa"
......@@ -223,17 +223,17 @@ SET(WTF_INCLUDE_DIRECTORIES
"${CMAKE_BINARY_DIR}"
)
IF (NOT USE_SYSTEM_MALLOC)
LIST(APPEND WTF_SOURCES
if (NOT USE_SYSTEM_MALLOC)
list(APPEND WTF_SOURCES
TCSystemAlloc.cpp
)
ENDIF()
endif ()
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
INCLUDE_DIRECTORIES(${WTF_INCLUDE_DIRECTORIES})
ADD_DEFINITIONS(-DBUILDING_WTF)
ADD_LIBRARY(${WTF_LIBRARY_NAME} STATIC ${WTF_HEADERS} ${WTF_SOURCES})
TARGET_LINK_LIBRARIES(${WTF_LIBRARY_NAME} ${WTF_LIBRARIES})
SET_TARGET_PROPERTIES(${WTF_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
include_directories(${WTF_INCLUDE_DIRECTORIES})
add_definitions(-DBUILDING_WTF)
add_library(${WTF_LIBRARY_NAME} STATIC ${WTF_HEADERS} ${WTF_SOURCES})
target_link_libraries(${WTF_LIBRARY_NAME} ${WTF_LIBRARIES})
set_target_properties(${WTF_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
LIST(APPEND WTF_SOURCES
list(APPEND WTF_SOURCES
OSAllocatorPosix.cpp
TCSystemAlloc.cpp
ThreadIdentifierDataPthreads.cpp
......@@ -7,6 +7,6 @@ LIST(APPEND WTF_SOURCES
unicode/icu/CollatorICU.cpp
)
LIST(INSERT WTF_INCLUDE_DIRECTORIES 0
list(INSERT WTF_INCLUDE_DIRECTORIES 0
"${BLACKBERRY_THIRD_PARTY_DIR}/icu"
)