[x265-commits] [x265] cmake: simplify test build structure
Steve Borho
steve at borho.org
Mon Oct 7 23:03:51 CEST 2013
details: http://hg.videolan.org/x265/rev/d79cbcdcb538
branches:
changeset: 4270:d79cbcdcb538
user: Steve Borho <steve at borho.org>
date: Mon Oct 07 16:01:39 2013 -0500
description:
cmake: simplify test build structure
Subject: [x265] cmake: white-space nit
details: http://hg.videolan.org/x265/rev/5ff1a56ba33b
branches:
changeset: 4271:5ff1a56ba33b
user: Steve Borho <steve at borho.org>
date: Mon Oct 07 16:01:45 2013 -0500
description:
cmake: white-space nit
diffstat:
source/CMakeLists.txt | 28 +++++++++++++++++-----------
source/test/CMakeLists.txt | 17 +++--------------
2 files changed, 20 insertions(+), 25 deletions(-)
diffs (73 lines):
diff -r e1be6debf9a7 -r 5ff1a56ba33b source/CMakeLists.txt
--- a/source/CMakeLists.txt Mon Oct 07 12:51:54 2013 -0500
+++ b/source/CMakeLists.txt Mon Oct 07 16:01:45 2013 -0500
@@ -166,12 +166,6 @@ elseif(NOT XCODE)
merge_static_libs(x265 ${LIBS})
endif()
-# Test applications
-option(ENABLE_TESTS "Enable Unit Tests" OFF)
-if(ENABLE_TESTS)
- add_subdirectory(test)
-endif(ENABLE_TESTS)
-
# Main CLI application
option(ENABLE_CLI "Build standalone CLI application" ON)
if(ENABLE_CLI)
@@ -190,11 +184,23 @@ if(ENABLE_CLI)
add_executable(cli ../COPYING ${InputFiles} ${OutputFiles}
x265.cpp x265opts.h x265.h
compat/msvc/getopt.c compat/msvc/getopt.h)
-if(XCODE OR MSVC)
- target_link_libraries(cli ${LIBS})
-else()
- target_link_libraries(cli x265)
-endif()
+ if(XCODE OR MSVC)
+ target_link_libraries(cli ${LIBS})
+ else()
+ target_link_libraries(cli x265)
+ endif()
target_link_libraries(cli ${PLATFORM_LIBS})
SET_TARGET_PROPERTIES(cli PROPERTIES OUTPUT_NAME x265)
endif(ENABLE_CLI)
+
+# Test applications
+option(ENABLE_TESTS "Enable Unit Tests" OFF)
+if(ENABLE_TESTS)
+ if(ENABLE_PRIMITIVES_VEC)
+ add_definitions(-DENABLE_VECTOR_PRIMITIVES=1)
+ endif(ENABLE_PRIMITIVES_VEC)
+ if(ENABLE_PRIMITIVES_ASM)
+ add_definitions(-DENABLE_ASM_PRIMITIVES=1)
+ endif(ENABLE_PRIMITIVES_ASM)
+ add_subdirectory(test)
+endif(ENABLE_TESTS)
diff -r e1be6debf9a7 -r 5ff1a56ba33b source/test/CMakeLists.txt
--- a/source/test/CMakeLists.txt Mon Oct 07 12:51:54 2013 -0500
+++ b/source/test/CMakeLists.txt Mon Oct 07 16:01:45 2013 -0500
@@ -1,21 +1,10 @@
-if(ENABLE_PRIMITIVES_VEC)
- add_definitions(-DENABLE_VECTOR_PRIMITIVES=1)
-endif(ENABLE_PRIMITIVES_VEC)
-if(ENABLE_PRIMITIVES_ASM)
- add_definitions(-DENABLE_ASM_PRIMITIVES=1)
-endif(ENABLE_PRIMITIVES_ASM)
-
-option(ENABLE_TEST_THREADPOOL "Enable thread pool unit test" OFF)
-if(ENABLE_TEST_THREADPOOL)
- add_executable(PoolTest testpool.cpp)
- target_link_libraries(PoolTest x265 ${PLATFORM_LIBS})
-endif()
-
add_executable(TestBench
testbench.cpp testharness.h
pixelharness.cpp pixelharness.h
mbdstharness.cpp mbdstharness.h
ipfilterharness.cpp ipfilterharness.h
intrapredharness.cpp intrapredharness.h)
+target_link_libraries(TestBench x265 ${PLATFORM_LIBS})
-target_link_libraries(TestBench x265 ${PLATFORM_LIBS})
+add_executable(PoolTest testpool.cpp)
+target_link_libraries(PoolTest x265 ${PLATFORM_LIBS})
More information about the x265-commits
mailing list