Switch build system to CMake
This commit is contained in:
18
.gitignore
vendored
18
.gitignore
vendored
@@ -1,20 +1,6 @@
|
||||
*.vcproj.*.user
|
||||
*.ncb
|
||||
*.suo
|
||||
*.swp
|
||||
*.swo
|
||||
*.gcno
|
||||
*.gcda
|
||||
/bin/pycdc*
|
||||
/bin/pycdas*
|
||||
/out/*.o
|
||||
/out/*.obj
|
||||
/out/*.manifest
|
||||
/out/*.manifest.res
|
||||
/out/*.dep
|
||||
/out/*.idb
|
||||
/out/*.pdb
|
||||
/out/BuildLog.htm
|
||||
/bytes/*.cpp
|
||||
/tests/*.pyc.err
|
||||
/tests/*.pyc.src
|
||||
*.kdev4
|
||||
/.kdev4
|
||||
|
62
CMakeLists.txt
Normal file
62
CMakeLists.txt
Normal file
@@ -0,0 +1,62 @@
|
||||
project(pycdc)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
# For generating the bytes tables
|
||||
find_package(PythonInterp REQUIRED)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
set(PYTHON_VERSIONS
|
||||
10 11 13 14 15 16 # Python 1.1 and 1.2 are marshall-identical
|
||||
20 21 22 23 24 25 26 27
|
||||
30 31 32 33 34
|
||||
)
|
||||
|
||||
set(MAP_FILES "")
|
||||
set(MAP_SOURCES "")
|
||||
foreach(ver ${PYTHON_VERSIONS})
|
||||
set(MAP_FILES ${MAP_FILES} ${CMAKE_CURRENT_SOURCE_DIR}/bytes/python_${ver}.map)
|
||||
set(MAP_SOURCES ${MAP_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/bytes/python_${ver}.cpp)
|
||||
endforeach()
|
||||
|
||||
add_custom_command(OUTPUT ${MAP_SOURCES}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bytes/comp_map.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bytes
|
||||
${CMAKE_CURRENT_BINARY_DIR}/bytes
|
||||
DEPENDS ${MAP_FILES}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bytes/comp_map.py
|
||||
)
|
||||
|
||||
set(COMMON_SOURCES
|
||||
bytecode.cpp
|
||||
data.cpp
|
||||
pyc_code.cpp
|
||||
pyc_module.cpp
|
||||
pyc_numeric.cpp
|
||||
pyc_object.cpp
|
||||
pyc_sequence.cpp
|
||||
pyc_string.cpp
|
||||
${MAP_SOURCES}
|
||||
)
|
||||
|
||||
set(pycdas_SOURCES
|
||||
ASTree.cpp
|
||||
ASTNode.cpp
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_library(pycxx STATIC ${COMMON_SOURCES})
|
||||
|
||||
add_executable(pycdas pycdas.cpp)
|
||||
target_link_libraries(pycdas pycxx)
|
||||
|
||||
add_executable(pycdc pycdc.cpp ${pycdas_SOURCES})
|
||||
target_link_libraries(pycdc pycxx)
|
||||
|
||||
# For tests
|
||||
add_custom_target(test ${CMAKE_CURRENT_SOURCE_DIR}/pycdc_test.sh
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tests)
|
||||
add_dependencies(test pycdc)
|
82
Makefile
82
Makefile
@@ -1,82 +0,0 @@
|
||||
CXX = g++
|
||||
CXXFLAGS = -g -Wall -Wextra -Werror
|
||||
#CXXFLAGS += -fprofile-arcs -ftest-coverage
|
||||
#CPPFLAGS += -DBLOCK_DEBUG -DSTACK_DEBUG
|
||||
#LFLAGS += -lgcov
|
||||
SHELL = /bin/bash
|
||||
|
||||
COMMON = \
|
||||
out/data.o \
|
||||
out/bytecode.o \
|
||||
out/pyc_module.o \
|
||||
out/pyc_object.o \
|
||||
out/pyc_numeric.o \
|
||||
out/pyc_code.o \
|
||||
out/pyc_sequence.o \
|
||||
out/pyc_string.o \
|
||||
out/ASTree.o \
|
||||
out/ASTNode.o \
|
||||
|
||||
BYTES = \
|
||||
python_10 python_11 python_13 python_14 python_15 python_16 \
|
||||
python_20 python_21 python_22 python_23 python_24 \
|
||||
python_25 python_26 python_27 \
|
||||
python_30 python_31 python_32 python_33 python_34
|
||||
|
||||
BYTE_OBJS = $(BYTES:%=out/%.o)
|
||||
BYTE_SRCS = $(BYTES:%=bytes/%.cpp)
|
||||
BYTE_MAPS = $(BYTES:%=bytes/%.map)
|
||||
|
||||
ALL = \
|
||||
bin/pycdas \
|
||||
bin/pycdc
|
||||
|
||||
PREFIX = /usr/local
|
||||
|
||||
all: $(ALL)
|
||||
|
||||
clean:
|
||||
rm -f $(COMMON) $(BYTE_OBJS) $(BYTE_SRCS)
|
||||
rm -f tests/*.pyc.src tests/*.pyc.err
|
||||
|
||||
install:
|
||||
mkdir -p $(PREFIX)/bin
|
||||
cp $(ALL) $(PREFIX)/bin
|
||||
|
||||
test: all
|
||||
@fails=0; \
|
||||
files=(); \
|
||||
errors=(); \
|
||||
for f in ./tests/*.pyc; \
|
||||
do \
|
||||
stderr=$$( ./bin/pycdc "$$f" 2>$$f.err 1>$$f.src ); \
|
||||
if [ "$$?" -eq "0" -a -z "$$stderr" ]; then \
|
||||
echo -ne "\033[32m.\033[m"; \
|
||||
else \
|
||||
let fails+=1; \
|
||||
files=("$${files[@]}" "$$f"); \
|
||||
errors=("$${errors[@]}" "$$stderr"); \
|
||||
echo -ne "\033[31m.\033[m"; \
|
||||
fi \
|
||||
done; \
|
||||
echo -e "\n\n$$fails tests failed:"; \
|
||||
for ((i=0; i<$${#files[@]}; i++)); \
|
||||
do \
|
||||
echo -e "\t\033[31m$${files[i]}\033[m"; \
|
||||
echo -e "$${errors[i]}\n"; \
|
||||
done;
|
||||
|
||||
bin/pycdas: pycdas.cpp $(COMMON) $(BYTE_OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LFLAGS) $^ -o $@
|
||||
|
||||
bin/pycdc: pycdc.cpp $(COMMON) $(BYTE_OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(LFLAGS) $^ -o $@
|
||||
|
||||
out/%.o: %.cpp %.h
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
out/python_%.o: bytes/python_%.cpp $(BYTE_SRCS)
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
$(BYTE_SRCS): $(BYTE_MAPS)
|
||||
( cd bytes ; ./comp_map.py )
|
@@ -15,13 +15,23 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with pycdc. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
if len(sys.argv) != 3:
|
||||
sys.stderr.write('Usage: %s in_dir out_dir\n' % sys.argv[0])
|
||||
sys.exit(1)
|
||||
|
||||
if not os.path.exists(sys.argv[2]):
|
||||
os.mkdir(sys.argv[2])
|
||||
|
||||
maplist = [ 10, 11, 13, 14, 15, 16,
|
||||
20, 21, 22, 23, 24, 25, 26, 27,
|
||||
30, 31, 32, 33, 34 ]
|
||||
|
||||
for mapver in maplist:
|
||||
infile = open('python_%d.map' % mapver, 'rt')
|
||||
outfile = open('python_%d.cpp' % mapver, 'wt')
|
||||
infile = open(os.path.join(sys.argv[1], 'python_%d.map' % mapver), 'rt')
|
||||
outfile = open(os.path.join(sys.argv[2], 'python_%d.cpp' % mapver), 'wt')
|
||||
|
||||
idToOpcode = {}
|
||||
opcodeToId = {}
|
||||
@@ -31,7 +41,7 @@ for mapver in maplist:
|
||||
opcodeToId[code] = int(fileid)
|
||||
|
||||
outfile.write('/* This file was auto-generated with comp_map.py. DO NOT EDIT! */\n\n')
|
||||
outfile.write('#include "../bytecode.h"\n\n')
|
||||
outfile.write('#include "bytecode.h"\n\n')
|
||||
outfile.write('int python_%d_map(int id)\n' % mapver)
|
||||
outfile.write('{\n')
|
||||
outfile.write(' switch (id) {\n')
|
||||
|
335
pycdas.vcproj
335
pycdas.vcproj
@@ -1,335 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="pycdas"
|
||||
ProjectGUID="{102E5FEA-A879-4F26-B803-526B5D62F750}"
|
||||
RootNamespace="pycdas"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)bin"
|
||||
IntermediateDirectory="$(SolutionDir)out"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)bin"
|
||||
IntermediateDirectory="$(SolutionDir)out"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Bytecode"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\bytes\python_10.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_11.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_13.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_14.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_15.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_16.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_20.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_21.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_22.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_23.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_24.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_25.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_26.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_27.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_30.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_31.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_32.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_33.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ASTNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ASTNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ASTree.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ASTree.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytecode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytecode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\data.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\data.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\FastStack.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_code.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_code.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_module.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_module.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_numeric.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_numeric.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_object.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_object.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_sequence.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_sequence.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_string.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_string.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pycdas.cpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
26
pycdc.sln
26
pycdc.sln
@@ -1,26 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pycdc", "pycdc.vcproj", "{44A92B47-DFE6-4C07-B8D0-5D78C0ECCA21}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pycdas", "pycdas.vcproj", "{102E5FEA-A879-4F26-B803-526B5D62F750}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{44A92B47-DFE6-4C07-B8D0-5D78C0ECCA21}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{44A92B47-DFE6-4C07-B8D0-5D78C0ECCA21}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{44A92B47-DFE6-4C07-B8D0-5D78C0ECCA21}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{44A92B47-DFE6-4C07-B8D0-5D78C0ECCA21}.Release|Win32.Build.0 = Release|Win32
|
||||
{102E5FEA-A879-4F26-B803-526B5D62F750}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{102E5FEA-A879-4F26-B803-526B5D62F750}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{102E5FEA-A879-4F26-B803-526B5D62F750}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{102E5FEA-A879-4F26-B803-526B5D62F750}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
335
pycdc.vcproj
335
pycdc.vcproj
@@ -1,335 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="pycdc"
|
||||
ProjectGUID="{44A92B47-DFE6-4C07-B8D0-5D78C0ECCA21}"
|
||||
RootNamespace="pycdc"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="196613"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)bin"
|
||||
IntermediateDirectory="$(SolutionDir)out"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)bin"
|
||||
IntermediateDirectory="$(SolutionDir)out"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
EnableIntrinsicFunctions="true"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Bytecode"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\bytes\python_10.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_11.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_13.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_14.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_15.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_16.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_20.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_21.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_22.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_23.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_24.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_25.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_26.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_27.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_30.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_31.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_32.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytes\python_33.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ASTNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ASTNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ASTree.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ASTree.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytecode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bytecode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\data.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\data.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\FastStack.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_code.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_code.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_module.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_module.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_numeric.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_numeric.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_object.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_object.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_sequence.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_sequence.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_string.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pyc_string.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pycdc.cpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
27
pycdc_test.sh
Executable file
27
pycdc_test.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir tests
|
||||
|
||||
fails=0
|
||||
files=()
|
||||
errors=()
|
||||
for f in $1/*.pyc
|
||||
do
|
||||
base=tests/$( basename "$f" )
|
||||
stderr=$( ./pycdc "$f" 2>$base.err 1>$base.src )
|
||||
if [ "$?" -eq "0" -a -z "$stderr" ]
|
||||
then
|
||||
echo -ne "\033[32m.\033[m"
|
||||
else
|
||||
let fails+=1
|
||||
files=("${files[@]}" "$f")
|
||||
errors=("${errors[@]}" "$stderr")
|
||||
echo -ne "\033[31m.\033[m"
|
||||
fi
|
||||
done
|
||||
echo -e "\n\n$fails tests failed:"
|
||||
for ((i=0; i<${#files[@]}; i++))
|
||||
do
|
||||
echo -e "\t\033[31m${files[i]}\033[m"
|
||||
echo -e "${errors[i]}\n"
|
||||
done
|
Reference in New Issue
Block a user