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
6678d9f4
Commit
6678d9f4
authored
Nov 10, 2014
by
Daniel Agar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add libpypa as cmake subproject
parent
ee038aff
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
15 deletions
+5
-15
CMakeLists.txt
CMakeLists.txt
+2
-11
src/CMakeLists.txt
src/CMakeLists.txt
+1
-2
test/unittests/CMakeLists.txt
test/unittests/CMakeLists.txt
+1
-1
tools/CMakeLists.txt
tools/CMakeLists.txt
+1
-1
No files found.
CMakeLists.txt
View file @
6678d9f4
...
...
@@ -74,15 +74,7 @@ ExternalProject_Add(libunwind
LOG_INSTALL ON
)
# libpypa
ExternalProject_Add
(
libpypa
PREFIX libpypa
SOURCE_DIR
${
CMAKE_SOURCE_DIR
}
/libpypa
UPDATE_COMMAND autoreconf -ivf
CONFIGURE_COMMAND
${
CMAKE_SOURCE_DIR
}
/libpypa/configure --prefix=
${
CMAKE_BINARY_DIR
}
/libpypa
LOG_UPDATE ON
LOG_CONFIGURE ON
LOG_BUILD ON
LOG_INSTALL ON
)
add_subdirectory
(
libpypa
)
# valgrind
if
(
ENABLE_VALGRIND
)
...
...
@@ -119,7 +111,6 @@ include_directories(${LLVM_INCLUDE_DIRS})
include_directories
(
include
)
find_package
(
LibLZMA REQUIRED
)
link_directories
(
${
CMAKE_BINARY_DIR
}
/libpypa/lib
)
link_directories
(
${
CMAKE_BINARY_DIR
}
/libunwind/lib
)
link_directories
(
${
LLVM_LIBRARY_DIRS
}
)
...
...
@@ -130,7 +121,7 @@ add_subdirectory(test/unittests)
add_subdirectory
(
tools
)
add_executable
(
pyston $<TARGET_OBJECTS:PYSTON_MAIN_OBJECT> $<TARGET_OBJECTS:PYSTON_OBJECTS> $<TARGET_OBJECTS:FROM_CPYTHON_OBJECTS>
)
target_link_libraries
(
pyston stdlib pthread m readline gmp unwind pypa
${
LLVM_LIBS
}
${
LIBLZMA_LIBRARIES
}
)
target_link_libraries
(
pyston stdlib pthread m readline gmp unwind pypa
double-conversion
${
LLVM_LIBS
}
${
LIBLZMA_LIBRARIES
}
)
# copy the python standard library (lib_python/2.7) and src/codegen/parse_ast.py to the build directory
add_custom_command
(
TARGET pyston POST_BUILD COMMAND
${
CMAKE_COMMAND
}
-E copy_directory
${
CMAKE_SOURCE_DIR
}
/lib_python/2.7
${
CMAKE_BINARY_DIR
}
/lib_python/2.7
)
...
...
src/CMakeLists.txt
View file @
6678d9f4
...
...
@@ -6,7 +6,6 @@ execute_process(COMMAND git rev-parse HEAD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
set_source_files_properties
(
jit.cpp PROPERTIES COMPILE_DEFINITIONS
"GITREV=
${
GITREV
}
"
)
include_directories
(
${
CMAKE_BINARY_DIR
}
)
include_directories
(
${
CMAKE_BINARY_DIR
}
/libpypa/include
)
include_directories
(
${
CMAKE_BINARY_DIR
}
/libunwind/include
)
file
(
GLOB ANALYSIS_SRCS analysis/*.cpp
)
...
...
@@ -21,7 +20,7 @@ file(GLOB RUNTIME_BUILTIN_MODULES_SRCS runtime/builtin_modules/*.cpp)
file
(
GLOB RUNTIME_SRCS runtime/*.cpp
)
add_library
(
PYSTON_OBJECTS OBJECT codegen/profiling/profiling.cpp
${
ANALYSIS_SRCS
}
${
ASM_WRITING_SRCS
}
${
CAPI_SRCS
}
${
CODEGEN_SRCS
}
${
CODEGEN_IRGEN_SRCS
}
${
CODEGEN_OPT_SRCS
}
${
CORE_SRCS
}
${
GC_SRCS
}
${
RUNTIME_BUILTIN_MODULES_SRCS
}
${
RUNTIME_SRCS
}
)
add_dependencies
(
PYSTON_OBJECTS libunwind
lib
pypa
${
LLVM_LIBS
}
)
add_dependencies
(
PYSTON_OBJECTS libunwind pypa
${
LLVM_LIBS
}
)
add_library
(
PYSTON_MAIN_OBJECT OBJECT jit.cpp
)
add_dependencies
(
PYSTON_MAIN_OBJECT
${
LLVM_LIBS
}
)
...
...
test/unittests/CMakeLists.txt
View file @
6678d9f4
...
...
@@ -9,7 +9,7 @@ add_custom_target(unittests)
macro
(
add_unittest unittest
)
add_executable
(
${
unittest
}
_unittest EXCLUDE_FROM_ALL
${
unittest
}
.cpp $<TARGET_OBJECTS:PYSTON_OBJECTS> $<TARGET_OBJECTS:FROM_CPYTHON_OBJECTS>
)
target_link_libraries
(
${
unittest
}
_unittest stdlib gmp readline pypa unwind gtest gtest_main
${
LLVM_LIBS
}
${
LIBLZMA_LIBRARIES
}
)
target_link_libraries
(
${
unittest
}
_unittest stdlib gmp readline pypa
double-conversion
unwind gtest gtest_main
${
LLVM_LIBS
}
${
LIBLZMA_LIBRARIES
}
)
add_dependencies
(
${
unittest
}
_unittest gtest gtest_main
)
add_dependencies
(
unittests
${
unittest
}
_unittest
)
endmacro
()
...
...
tools/CMakeLists.txt
View file @
6678d9f4
...
...
@@ -9,5 +9,5 @@ add_dependencies(publicize ${LLVM_LIBS_EXTRA})
include_directories
(
${
CMAKE_SOURCE_DIR
}
/src
)
add_executable
(
astprint EXCLUDE_FROM_ALL astprint.cpp $<TARGET_OBJECTS:PYSTON_OBJECTS> $<TARGET_OBJECTS:FROM_CPYTHON_OBJECTS>
)
target_link_libraries
(
astprint stdlib gmp readline pypa unwind
${
LLVM_LIBS
}
${
LIBLZMA_LIBRARIES
}
)
target_link_libraries
(
astprint stdlib gmp readline pypa
double-conversion
unwind
${
LLVM_LIBS
}
${
LIBLZMA_LIBRARIES
}
)
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