Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] add bench/bench.c #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@

build/

CMakeCache.txt
CMakeFiles/
Makefile
cmake_install.cmake

# Object files
*.o
*.ko
Expand Down
15 changes: 12 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
cmake_minimum_required (VERSION 2.6)

project (yuv_rgb)
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -Wextra -pedantic -std=c99")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99")

set(CMAKE_BUILD_DIRECTORY ${PROJECT_SOURCE_DIR}/build)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik, this is not how cmake works, the build directory can be any path.
For example, you may want to keep a build_release and a build_debug directories.

Copy link
Contributor Author

@LuoZijun LuoZijun Dec 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's ok. and the CMAKE_BUILD_DIRECTORY setting not working :D
i don't know why.

set(CMAKE_CACHEFILE_DIR ${PROJECT_SOURCE_DIR}/build)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -Wextra -pedantic -std=c99")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99")

set(USE_IPP FALSE CACHE BOOL "Enable IPP")

if(USE_IPP)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not? ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, mistake.

set(IPP_ROOT /opt/intel CACHE PATH "IPP install path")

Expand All @@ -13,10 +21,11 @@ if(USE_IPP)
add_definitions(-DUSE_IPP=1)
endif(USE_IPP)

include_directories ("${PROJECT_SOURCE_DIR}")
add_executable(test_yuv_rgb test_yuv_rgb.c yuv_rgb.c)
target_link_libraries(test_yuv_rgb swscale)
if(USE_IPP)
target_link_libraries(test_yuv_rgb ippcc)
endif(USE_IPP)

add_executable(bench bench/bench.c yuv_rgb.c)
target_link_libraries(bench swscale avformat avcodec avutil )
Loading