-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract test files so that we can track changes with upcoming commits. (
#688)
- Loading branch information
1 parent
67cb724
commit ed0c9ef
Showing
117 changed files
with
820,177 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,10 @@ | ||
include(ExternalProject) | ||
|
||
# Slightly hacky method to force unittest data extraction to be a target | ||
set(UNITTEST_EXTRACT_DIR "${CMAKE_BINARY_DIR}/testdata/dist") | ||
ExternalProject_Add(UNITTEST_DATA | ||
URL "${CMAKE_CURRENT_SOURCE_DIR}/unittestsfiles.tar.gz" | ||
SOURCE_DIR "${CMAKE_BINARY_DIR}/testdata/build" | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
BUILD_IN_SOURCE 1 | ||
INSTALL_COMMAND ${CMAKE_COMMAND} -E make_directory ${UNITTEST_EXTRACT_DIR} | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/testdata/build ${UNITTEST_EXTRACT_DIR} | ||
EXCLUDE_FROM_ALL TRUE | ||
) | ||
set(UNITTEST_DEST_DIR "${CMAKE_BINARY_DIR}/testdata") | ||
|
||
# Need to add this superfluous file command to allow imported target to depend on ExternalProject | ||
file(MAKE_DIRECTORY ${UNITTEST_EXTRACT_DIR}) | ||
file(MAKE_DIRECTORY ${UNITTEST_DEST_DIR}) | ||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/files/ DESTINATION ${UNITTEST_DEST_DIR}) | ||
add_library(unittest_data INTERFACE IMPORTED GLOBAL) | ||
set_property(TARGET unittest_data PROPERTY INTERFACE_COMPILE_DEFINITIONS "OCIO_UNIT_TEST_FILES_DIR=${UNITTEST_EXTRACT_DIR}") | ||
add_dependencies(unittest_data UNITTEST_DATA) | ||
set_property(TARGET unittest_data PROPERTY INTERFACE_COMPILE_DEFINITIONS "OCIO_UNIT_TEST_FILES_DIR=${UNITTEST_DEST_DIR}") | ||
|
Oops, something went wrong.