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
f514bacb
Commit
f514bacb
authored
Dec 13, 2014
by
Daniel Agar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake add pwd module
parent
dd3c61df
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
7 deletions
+11
-7
CMakeLists.txt
CMakeLists.txt
+2
-2
lib_python/CMakeLists.txt
lib_python/CMakeLists.txt
+7
-3
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 @
f514bacb
...
...
@@ -91,7 +91,7 @@ else()
endif
()
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wall -Wextra -Werror -Wreturn-type -Wno-sign-compare -Wno-unused -Wno-sign-compare -Wno-unused-parameter -fno-omit-frame-pointer"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
CMAKE_C_FLAGS
}
-std=c++11 -fPIC -fno-rtti -fexceptions -fvisibility-inlines-hidden -ffunction-sections -fdata-sections -Woverloaded-virtual -Wno-invalid-offsetof -Wcast-qual -Wno-sign-conversion -Wnon-virtual-dtor -Winit-self -Wmissing-include-dirs -Wstrict-overflow=5 -Wpointer-arith -Wtype-limits -Wwrite-strings -Wempty-body -Waggregate-return -Wmissing-field-initializers -Wredundant-decls -Winline -Wint-to-pointer-cast -Wlong-long -Wvla"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
CMAKE_C_FLAGS
}
-std=c++11 -fPIC -fno-rtti -fexceptions -fvisibility-inlines-hidden -ffunction-sections -fdata-sections -Woverloaded-virtual -Wno-invalid-offsetof -Wcast-qual -Wno-sign-conversion -Wnon-virtual-dtor -Winit-self -Wmissing-include-dirs -Wstrict-overflow=5 -Wpointer-arith -Wtype-limits -Wwrite-strings -Wempty-body -Waggregate-return -Wmissing-field-initializers -Wredundant-decls -Winline -Wint-to-pointer-cast -Wlong-long -Wvla
-Wno-attributes
"
)
set
(
CLANG_FLAGS
"
${
CLANG_FLAGS
}
-Wimplicit-int -Wstrict-prototypes -Wold-style-definition -Wnested-externs -Wpointer-to-int-cast -Wno-mismatched-tags -Wno-extern-c-compat"
)
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"Clang"
)
...
...
@@ -119,7 +119,7 @@ add_subdirectory(test/test_extension)
add_subdirectory
(
test/unittests
)
add_subdirectory
(
tools
)
add_executable
(
pyston $<TARGET_OBJECTS:PYSTON_MAIN_OBJECT> $<TARGET_OBJECTS:PYSTON_OBJECTS> $<TARGET_OBJECTS:FROM_CPYTHON
_OBJECTS
>
)
add_executable
(
pyston $<TARGET_OBJECTS:PYSTON_MAIN_OBJECT> $<TARGET_OBJECTS:PYSTON_OBJECTS> $<TARGET_OBJECTS:FROM_CPYTHON>
)
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
...
...
lib_python/CMakeLists.txt
View file @
f514bacb
# compile specified files in lib_python/2.7_Modules
file
(
GLOB_RECURSE FROM_CPYTHON_SRCS errnomodule.c shamodule.c sha256module.c sha512module.c _math.c mathmodule.c md5.c md5module.c _randommodule.c _sre.c operator.c binascii.c
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-missing-field-initializers"
)
add_library
(
FROM_CPYTHON_OBJECTS OBJECT
${
FROM_CPYTHON_SRCS
}
)
file
(
GLOB_RECURSE STDMODULE_SRCS 2.7_Modules errnomodule.c shamodule.c sha256module.c sha512module.c _math.c mathmodule.c md5.c md5module.c _randommodule.c _sre.c operator.c binascii.c pwdmodule.c
)
# compile specified files in lib_python/2.7_Objects
file
(
GLOB_RECURSE STDOBJECT_SRCS 2.7_Objects structseq.c
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-Wno-missing-field-initializers -Wno-tautological-compare -Wno-type-limits"
)
add_library
(
FROM_CPYTHON OBJECT
${
STDMODULE_SRCS
}
${
STDOBJECT_SRCS
}
)
test/unittests/CMakeLists.txt
View file @
f514bacb
...
...
@@ -8,7 +8,7 @@ include_directories(${LLVM_SOURCE_DIR}/utils/unittest/googletest/include)
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
>
)
add_executable
(
${
unittest
}
_unittest EXCLUDE_FROM_ALL
${
unittest
}
.cpp $<TARGET_OBJECTS:PYSTON_OBJECTS> $<TARGET_OBJECTS:FROM_CPYTHON>
)
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
)
...
...
tools/CMakeLists.txt
View file @
f514bacb
...
...
@@ -8,6 +8,6 @@ target_link_libraries(publicize curses dl pthread ${LLVM_LIBS} ${LLVM_LIBS_EXTRA
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
>
)
add_executable
(
astprint EXCLUDE_FROM_ALL astprint.cpp $<TARGET_OBJECTS:PYSTON_OBJECTS> $<TARGET_OBJECTS:FROM_CPYTHON>
)
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