CMake: Add benchmarks
Put each benchmark application in a sub-directory instead of specifying all in one file, because cotire cannot create PCH targets for the same file twice (bench.cpp).
This commit is contained in:
12
build/cmake/benchmarks/CMakeLists.txt
Normal file
12
build/cmake/benchmarks/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
#############################################################################
|
||||
# Name: build/cmake/benchmarks/CMakeLists.txt
|
||||
# Purpose: CMake file for benchmarks
|
||||
# Author: Maarten Bent
|
||||
# Created: 2021-02-07
|
||||
# Copyright: (c) 2021 wxWidgets development team
|
||||
# Licence: wxWindows licence
|
||||
#############################################################################
|
||||
|
||||
add_subdirectory(bench)
|
||||
add_subdirectory(bench_graphics)
|
||||
add_subdirectory(bench_gui)
|
34
build/cmake/benchmarks/bench/CMakeLists.txt
Normal file
34
build/cmake/benchmarks/bench/CMakeLists.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
#############################################################################
|
||||
# Name: build/cmake/benchmarks/bench/CMakeLists.txt
|
||||
# Purpose: CMake file for benchmarks
|
||||
# Author: Maarten Bent
|
||||
# Created: 2021-02-07
|
||||
# Copyright: (c) 2021 wxWidgets development team
|
||||
# Licence: wxWindows licence
|
||||
#############################################################################
|
||||
|
||||
set(BENCH_SRC
|
||||
bench.cpp
|
||||
bench.h
|
||||
datetime.cpp
|
||||
htmlparser/htmlpars.cpp
|
||||
htmlparser/htmlpars.h
|
||||
htmlparser/htmltag.cpp
|
||||
htmlparser/htmltag.h
|
||||
ipcclient.cpp
|
||||
log.cpp
|
||||
mbconv.cpp
|
||||
printfbench.cpp
|
||||
strings.cpp
|
||||
tls.cpp
|
||||
)
|
||||
|
||||
set(BENCH_DATA
|
||||
htmltest.html
|
||||
)
|
||||
|
||||
wx_add_benchmark(bench CONSOLE ${BENCH_SRC} DATA ${BENCH_DATA})
|
||||
|
||||
if(wxUSE_SOCKETS)
|
||||
wx_exe_link_libraries(bench wxnet)
|
||||
endif()
|
18
build/cmake/benchmarks/bench_graphics/CMakeLists.txt
Normal file
18
build/cmake/benchmarks/bench_graphics/CMakeLists.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
#############################################################################
|
||||
# Name: build/cmake/benchmarks/bench_graphics/CMakeLists.txt
|
||||
# Purpose: CMake file for benchmarks
|
||||
# Author: Maarten Bent
|
||||
# Created: 2021-02-07
|
||||
# Copyright: (c) 2021 wxWidgets development team
|
||||
# Licence: wxWindows licence
|
||||
#############################################################################
|
||||
|
||||
set(BENCH_GRAPGICS_SRC
|
||||
graphics.cpp
|
||||
)
|
||||
|
||||
wx_add_benchmark(bench_graphics CONSOLE_GUI ${BENCH_GRAPGICS_SRC})
|
||||
|
||||
if(wxUSE_OPENGL)
|
||||
wx_exe_link_libraries(bench_graphics wxgl)
|
||||
endif()
|
24
build/cmake/benchmarks/bench_gui/CMakeLists.txt
Normal file
24
build/cmake/benchmarks/bench_gui/CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
#############################################################################
|
||||
# Name: build/cmake/benchmarks/bench_gui/CMakeLists.txt
|
||||
# Purpose: CMake file for benchmarks
|
||||
# Author: Maarten Bent
|
||||
# Created: 2021-02-07
|
||||
# Copyright: (c) 2021 wxWidgets development team
|
||||
# Licence: wxWindows licence
|
||||
#############################################################################
|
||||
|
||||
set(BENCH_GUI_SRC
|
||||
bench.cpp
|
||||
bench.h
|
||||
display.cpp
|
||||
image.cpp
|
||||
)
|
||||
|
||||
set(IMAGE_DATA
|
||||
../../samples/image/horse.bmp:horse.bmp
|
||||
../../samples/image/horse.jpg:horse.jpg
|
||||
../../samples/image/horse.png:horse.png
|
||||
../../samples/image/horse.tif:horse.tif
|
||||
)
|
||||
|
||||
wx_add_benchmark(bench_gui CONSOLE_GUI ${BENCH_GUI_SRC} DATA ${IMAGE_DATA})
|
Reference in New Issue
Block a user