Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
975c88d1
Commit
975c88d1
authored
Oct 18, 2014
by
Philip Quinn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile test schemas out-of-source.
parent
5dd63440
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
CMakeLists.txt
c++/CMakeLists.txt
+0
-4
CMakeLists.txt
c++/src/CMakeLists.txt
+13
-7
No files found.
c++/CMakeLists.txt
View file @
975c88d1
project
(
"Cap'n Proto"
CXX
)
project
(
"Cap'n Proto"
CXX
)
cmake_minimum_required
(
VERSION 2.8
)
cmake_minimum_required
(
VERSION 2.8
)
set
(
CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/lib
)
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/bin
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall -Wextra -Wno-unused-parameter -std=c++11"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wall -Wextra -Wno-unused-parameter -std=c++11"
)
add_subdirectory
(
src
)
add_subdirectory
(
src
)
c++/src/CMakeLists.txt
View file @
975c88d1
...
@@ -112,17 +112,20 @@ set(test_capnp_files
...
@@ -112,17 +112,20 @@ set(test_capnp_files
capnp/test-import2.capnp
capnp/test-import2.capnp
)
)
set
(
test_capnp_output_dir
${
CMAKE_CURRENT_BINARY_DIR
}
/test_capnp
)
file
(
MAKE_DIRECTORY
${
test_capnp_output_dir
}
)
set
(
test_capnp_cpp_files
)
set
(
test_capnp_cpp_files
)
set
(
test_capnp_header_files
)
set
(
test_capnp_header_files
)
set
(
test_capnp_capnp_files
)
set
(
test_capnp_capnp_files
)
foreach
(
_file
${
test_capnp_files
}
)
foreach
(
_file
${
test_capnp_files
}
)
list
(
APPEND test_capnp_cpp_files
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
_file
}
.c++
)
list
(
APPEND test_capnp_cpp_files
${
test_capnp_output_dir
}
/
${
_file
}
.c++
)
list
(
APPEND test_capnp_header_files
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
_file
}
.h
)
list
(
APPEND test_capnp_header_files
${
test_capnp_output_dir
}
/
${
_file
}
.h
)
get_filename_component
(
_capnp_abs
${
_file
}
ABSOLUTE
)
get_filename_component
(
_capnp_abs
${
_file
}
ABSOLUTE
)
list
(
APPEND test_capnp_capnp_files
${
_capnp_abs
}
)
list
(
APPEND test_capnp_capnp_files
${
_capnp_abs
}
)
set_source_files_properties
(
set_source_files_properties
(
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
_file
}
.capnp.c++
${
test_capnp_output_dir
}
/
${
_file
}
.capnp.c++
PROPERTIES GENERATED TRUE
)
PROPERTIES GENERATED TRUE
)
endforeach
()
endforeach
()
...
@@ -131,13 +134,16 @@ add_custom_command(
...
@@ -131,13 +134,16 @@ add_custom_command(
${
test_capnp_cpp_files
}
${
test_capnp_cpp_files
}
${
test_capnp_header_files
}
${
test_capnp_header_files
}
COMMAND capnp-tool compile
COMMAND capnp-tool compile
-o $<TARGET_FILE:capnpc_cpp>
-o $<TARGET_FILE:capnpc_cpp>
:
${
test_capnp_output_dir
}
--src-prefix=
${
CMAKE_CURRENT_SOURCE_DIR
}
--src-prefix=
${
CMAKE_CURRENT_SOURCE_DIR
}
-I
${
CMAKE_CURRENT_SOURCE_DIR
}
-I
${
CMAKE_CURRENT_SOURCE_DIR
}
${
test_capnp_capnp_files
}
${
test_capnp_capnp_files
}
DEPENDS capnp-tool capnpc_cpp
${
test_capnp_files
}
)
DEPENDS capnp-tool capnpc_cpp
${
test_capnp_files
}
add_library
(
capnp_test_lib
${
test_capnp_cpp_files
}
)
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_library
(
capnp_test_lib
${
test_capnp_cpp_files
}
${
test_capnp_header_files
}
)
include_directories
(
${
test_capnp_output_dir
}
)
add_executable
(
capnp-tests
add_executable
(
capnp-tests
kj/common-test.c++
kj/common-test.c++
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment