Skip to content

Commit ed0c9ef

Browse files
BernardLefebvrehodoulp
authored andcommitted
Extract test files so that we can track changes with upcoming commits. (#688)
1 parent 67cb724 commit ed0c9ef

File tree

117 files changed

+820177
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+820177
-15
lines changed

tests/data/CMakeLists.txt

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
include(ExternalProject)
22

3-
# Slightly hacky method to force unittest data extraction to be a target
4-
set(UNITTEST_EXTRACT_DIR "${CMAKE_BINARY_DIR}/testdata/dist")
5-
ExternalProject_Add(UNITTEST_DATA
6-
URL "${CMAKE_CURRENT_SOURCE_DIR}/unittestsfiles.tar.gz"
7-
SOURCE_DIR "${CMAKE_BINARY_DIR}/testdata/build"
8-
CONFIGURE_COMMAND ""
9-
BUILD_COMMAND ""
10-
BUILD_IN_SOURCE 1
11-
INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${UNITTEST_EXTRACT_DIR}
12-
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/testdata/build ${UNITTEST_EXTRACT_DIR}
13-
EXCLUDE_FROM_ALL TRUE
14-
)
3+
set(UNITTEST_DEST_DIR "${CMAKE_BINARY_DIR}/testdata")
4+
155
# Need to add this superfluous file command to allow imported target to depend on ExternalProject
16-
file(MAKE_DIRECTORY ${UNITTEST_EXTRACT_DIR})
6+
file(MAKE_DIRECTORY ${UNITTEST_DEST_DIR})
7+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/files/ DESTINATION ${UNITTEST_DEST_DIR})
178
add_library(unittest_data INTERFACE IMPORTED GLOBAL)
18-
set_property(TARGET unittest_data PROPERTY INTERFACE_COMPILE_DEFINITIONS "OCIO_UNIT_TEST_FILES_DIR=${UNITTEST_EXTRACT_DIR}")
19-
add_dependencies(unittest_data UNITTEST_DATA)
9+
set_property(TARGET unittest_data PROPERTY INTERFACE_COMPILE_DEFINITIONS "OCIO_UNIT_TEST_FILES_DIR=${UNITTEST_DEST_DIR}")
10+

0 commit comments

Comments
 (0)