Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
692017b5
Commit
692017b5
authored
Mar 03, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #345 from dagar/cmakeheaderdeps
runtime/inline add header dependencies
parents
39859d79
8b77a541
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
src/runtime/inline/CMakeLists.txt
src/runtime/inline/CMakeLists.txt
+14
-3
No files found.
src/runtime/inline/CMakeLists.txt
View file @
692017b5
...
...
@@ -37,8 +37,19 @@
# adapted from https://github.com/shadow/shadow/blob/master/cmake/LLVMTools.cmake
set
(
BC_INLINE_SRCS boxing.cpp dict.cpp link_forcer.cpp list.cpp tuple.cpp xrange.cpp
)
include_directories
(
${
CMAKE_SOURCE_DIR
}
/src
)
file
(
GLOB_RECURSE PYSTON_HEADERS
${
CMAKE_SOURCE_DIR
}
/src/*.h
)
file
(
GLOB_RECURSE FROM_CPYTHON_HEADERS
${
CMAKE_SOURCE_DIR
}
/from_cpython/*.h
)
# set compiler
if
(
CCACHE
)
set
(
BC_CXX
${
CCACHE
}
${
LLVM_TOOLS_BINARY_DIR
}
/clang++
)
else
()
set
(
BC_CXX
${
LLVM_TOOLS_BINARY_DIR
}
/clang++
)
endif
()
# set CXX flags
set
(
BC_CXX_FLAGS
""
)
if
(
${
CMAKE_BUILD_TYPE
}
STREQUAL
"Debug"
)
...
...
@@ -71,8 +82,8 @@ foreach(BC_SRC ${BC_INLINE_SRCS})
# generate the bitcode for this file
add_custom_command
(
OUTPUT
${
BC_SRC_BASENAME
}
.bc
COMMAND
${
LLVM_TOOLS_BINARY_DIR
}
/clang++
${
BC_DEFINES
}
${
BC_CXX_FLAGS
}
${
BC_INCLUDES
}
-c
${
BC_SRC_FULLPATH
}
-o
${
BC_SRC_BASENAME
}
.bc -emit-llvm
DEPENDS
${
BC_SRC_FULLPATH
}
clang
COMMAND
${
BC_CXX
}
${
BC_DEFINES
}
${
BC_CXX_FLAGS
}
${
BC_INCLUDES
}
-c
${
BC_SRC_FULLPATH
}
-o
${
BC_SRC_BASENAME
}
.bc -emit-llvm
DEPENDS
${
BC_SRC_FULLPATH
}
clang
${
PYSTON_HEADERS
}
${
FROM_CPYTHON_HEADERS
}
COMMENT
"Building LLVM bitcode
${
BC_SRC_BASENAME
}
.bc"
VERBATIM
)
set_property
(
DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
${
BC_SRC_BASENAME
}
.bc
)
...
...
@@ -88,7 +99,7 @@ foreach(BC_SRC ${BC_INLINE_SRCS})
# compile into a regular object file
add_custom_command
(
OUTPUT
${
BC_SRC_BASENAME
}
.o
COMMAND
${
LLVM_TOOLS_BINARY_DIR
}
/clang++
${
BC_DEFINES
}
${
BC_CXX_FLAGS
}
${
BC_INCLUDES
}
-c
${
BC_SRC_BASENAME
}
.pub.bc -o
${
BC_SRC_BASENAME
}
.o
COMMAND
${
BC_CXX
}
${
BC_DEFINES
}
${
BC_CXX_FLAGS
}
${
BC_INCLUDES
}
-c
${
BC_SRC_BASENAME
}
.pub.bc -o
${
BC_SRC_BASENAME
}
.o
DEPENDS
${
BC_SRC_BASENAME
}
.pub.bc clang
COMMENT
"Compiling
${
BC_SRC_BASENAME
}
.pub.bc ->
${
BC_SRC_BASENAME
}
.o"
VERBATIM
)
...
...
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