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

This way it works out of the box. #8

Closed
wants to merge 5 commits into from
Closed
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
37 changes: 37 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,43 @@ add_executable(flattests ${FlatBuffers_Tests_SRCS})
add_executable(flatsamplebinary ${FlatBuffers_Sample_Binary_SRCS})
add_executable(flatsampletext ${FlatBuffers_Sample_Text_SRCS})

#----------------------------------------------------------------------------
# Copy all example files to the build directory. Important for
# out of place builds. The progem flatsampletext requires that monster.fbs
# and monsterdata.json be in the directory ./samples
#
set(NEEDED_FILES
monster.fbs
monsterdata.json
)

foreach(NEEDED_ ${NEEDED_FILES})
configure_file(
${PROJECT_SOURCE_DIR}/samples/${NEEDED_}
${PROJECT_BINARY_DIR}/samples/${NEEDED_}
COPYONLY
)
endforeach()

#----------------------------------------------------------------------------
# Copy all example files to the build directory. Important for
# out of place builds. The progem flattests requires that monster_test.fbs
# and monsterdata_test.json be in the directory ./test
#
set(NEEDED_FILES
monster_test.fbs
monsterdata_test.json
)

foreach(NEEDED_ ${NEEDED_FILES})
configure_file(
${PROJECT_SOURCE_DIR}/tests/${NEEDED_}
${PROJECT_BINARY_DIR}/tests/${NEEDED_}
COPYONLY
)
endforeach()

#----------------------------------------------------------------------------
add_test(NAME flattest
CONFIGURATIONS Debug
WORKING_DIRECTORY tests
Expand Down
4 changes: 4 additions & 0 deletions build/Xcode/FlatBuffers.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@
02575EDE5A1349C9A3584E32 /* RelWithDebInfo */ = {
isa = XCBuildConfiguration;
buildSettings = {
CONFIGURATION_BUILD_DIR = .;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk;
SYMROOT = build;
Expand Down Expand Up @@ -758,6 +759,7 @@
60917B4900A4484898ED29EF /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CONFIGURATION_BUILD_DIR = .;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk;
SYMROOT = build;
Expand All @@ -767,6 +769,7 @@
65B8F01CB7E6407CB262E6B6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CONFIGURATION_BUILD_DIR = .;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk;
SYMROOT = build;
Expand Down Expand Up @@ -926,6 +929,7 @@
C839EDC9489F432994623A13 /* MinSizeRel */ = {
isa = XCBuildConfiguration;
buildSettings = {
CONFIGURATION_BUILD_DIR = .;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk;
SYMROOT = build;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading