Xcode needs special testdata folder handling
This commit is contained in:
parent
6059e68c4f
commit
747c2a8b6d
@ -70,6 +70,8 @@ target_link_libraries( ${PROJECT_NAME}
|
||||
ycm_core
|
||||
gmock_main )
|
||||
|
||||
|
||||
if ( NOT CMAKE_GENERATOR_IS_XCODE )
|
||||
# The test executable expects a "testdata" dir in its working directory. Why?
|
||||
# Because there's NO reliable, cross-platform way of getting the directory in
|
||||
# which the executable is located.
|
||||
@ -77,5 +79,15 @@ add_custom_target( copy_testdata
|
||||
COMMAND cmake -E copy_directory
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/testdata
|
||||
${CMAKE_CURRENT_BINARY_DIR}/testdata )
|
||||
else()
|
||||
add_custom_target( copy_testdata
|
||||
COMMAND cmake -E copy_directory
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/testdata
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Debug/testdata
|
||||
COMMAND cmake -E copy_directory
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/testdata
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Release/testdata )
|
||||
|
||||
endif()
|
||||
|
||||
add_dependencies( ${PROJECT_NAME} copy_testdata )
|
||||
|
Loading…
Reference in New Issue
Block a user