Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Side by Side Diff: cmake/CMakeLists.txt

Issue 2208903002: Use sse4.2 CRC32 instructions to hash when available. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bench/ChecksumBench.cpp ('k') | gyp/core.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Boilerplate. 1 # Boilerplate.
2 cmake_minimum_required (VERSION 3.1) # First version with CMAKE_CXX_STANDARD. 2 cmake_minimum_required (VERSION 3.1) # First version with CMAKE_CXX_STANDARD.
3 project (skimake) 3 project (skimake)
4 set (CMAKE_CXX_STANDARD 11) 4 set (CMAKE_CXX_STANDARD 11)
5 5
6 # Default to Release mode. We're mainly targeting Skia users, not Skia develope rs. 6 # Default to Release mode. We're mainly targeting Skia users, not Skia develope rs.
7 if (NOT CMAKE_BUILD_TYPE) 7 if (NOT CMAKE_BUILD_TYPE)
8 set (CMAKE_BUILD_TYPE Release) 8 set (CMAKE_BUILD_TYPE Release)
9 endif () 9 endif ()
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (WIN32) 123 if (WIN32)
124 if(SKIA_GDI) 124 if(SKIA_GDI)
125 remove_srcs(../src/ports/SkFontMgr_win_dw_factory.cpp) 125 remove_srcs(../src/ports/SkFontMgr_win_dw_factory.cpp)
126 else() 126 else()
127 remove_srcs(../src/ports/SkFontMgr_win_gdi_factory.cpp) 127 remove_srcs(../src/ports/SkFontMgr_win_gdi_factory.cpp)
128 endif() 128 endif()
129 endif() 129 endif()
130 130
131 # Certain files must be compiled with support for SSSE3, SSE4.1, AVX, or AVX2 in trinsics. 131 # Certain files must be compiled with support for SSSE3, SSE4.1, AVX, or AVX2 in trinsics.
132 file (GLOB_RECURSE ssse3_srcs ../src/*ssse3*.cpp ../src/*SSSE3*.cpp) 132 file (GLOB_RECURSE ssse3_srcs ../src/*ssse3*.cpp ../src/*SSSE3*.cpp)
133 file (GLOB_RECURSE sse41_srcs ../src/*sse4*.cpp ../src/*SSE4*.cpp) 133 file (GLOB_RECURSE sse41_srcs ../src/*sse41*.cpp ../src/*SSE41*.cpp)
134 file (GLOB_RECURSE sse42_srcs ../src/*sse42*.cpp ../src/*SSE42*.cpp)
134 file (GLOB_RECURSE avx_srcs ../src/*_avx.cpp) 135 file (GLOB_RECURSE avx_srcs ../src/*_avx.cpp)
135 file (GLOB_RECURSE avx2_srcs ../src/*_avx2.cpp) 136 file (GLOB_RECURSE avx2_srcs ../src/*_avx2.cpp)
136 if (NOT WIN32) 137 if (NOT WIN32)
137 set_source_files_properties(${ssse3_srcs} PROPERTIES COMPILE_FLAGS -mssse3) 138 set_source_files_properties(${ssse3_srcs} PROPERTIES COMPILE_FLAGS -mssse3)
138 set_source_files_properties(${sse41_srcs} PROPERTIES COMPILE_FLAGS -msse4.1) 139 set_source_files_properties(${sse41_srcs} PROPERTIES COMPILE_FLAGS -msse4.1)
140 set_source_files_properties(${sse42_srcs} PROPERTIES COMPILE_FLAGS -msse4.2)
139 set_source_files_properties(${avx_srcs} PROPERTIES COMPILE_FLAGS -mavx) 141 set_source_files_properties(${avx_srcs} PROPERTIES COMPILE_FLAGS -mavx)
140 set_source_files_properties(${avx2_srcs} PROPERTIES COMPILE_FLAGS -mavx2) 142 set_source_files_properties(${avx2_srcs} PROPERTIES COMPILE_FLAGS -mavx2)
141 endif() 143 endif()
142 144
143 # Detect our optional dependencies. 145 # Detect our optional dependencies.
144 # If we can't find them, don't build the parts of Skia that use them. 146 # If we can't find them, don't build the parts of Skia that use them.
145 find_package (EXPAT) 147 find_package (EXPAT)
146 find_package (Lua) 148 find_package (Lua)
147 find_package (ZLIB) 149 find_package (ZLIB)
148 # No find_package for libwebp as far as I can tell, so simulate it here. 150 # No find_package for libwebp as far as I can tell, so simulate it here.
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n") 351 file (APPEND ${skia_h_path} "#include \"${filename_component}\"\n")
350 endif () 352 endif ()
351 endforeach() 353 endforeach()
352 endif() 354 endif()
353 endforeach() 355 endforeach()
354 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n") 356 file(APPEND ${skia_h_path} "\n#endif // skia_DEFINED\n")
355 357
356 # Now build a simple example app that uses Skia via libskia.so. 358 # Now build a simple example app that uses Skia via libskia.so.
357 add_executable(example example.cpp) 359 add_executable(example example.cpp)
358 target_link_libraries(example skia ${OPENGL_LIBRARIES}) 360 target_link_libraries(example skia ${OPENGL_LIBRARIES})
OLDNEW
« no previous file with comments | « bench/ChecksumBench.cpp ('k') | gyp/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698