Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Commit

Permalink
Move the rectangle-props executable to the bin directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Nov 2, 2011
1 parent a46f90b commit d88f017
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@ add_custom_target( ReplicatePythonSourceTree ALL ${CMAKE_COMMAND} -P
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )


# Process the CMakeLists.txt in the 'src' directory. include_directories( ${CYTHON_CMAKE_EXAMPLE_SOURCE_DIR}/include )

# Process the CMakeLists.txt in the 'src' and 'bin' directory.
add_subdirectory( src ) add_subdirectory( src )
add_subdirectory( bin )
5 changes: 4 additions & 1 deletion bin/CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,8 @@
# If the pyx file is a C++ file, we should specify that here.
set_source_files_properties( ${CYTHON_CMAKE_EXAMPLE_SOURCE_DIR}/src/rectangle.pyx PROPERTIES CYTHON_IS_CXX TRUE )

cython_add_standalone_executable( rectangle-props MAIN_MODULE rectangle_props.py cython_add_standalone_executable( rectangle-props MAIN_MODULE rectangle_props.py
${CYTHON_CMAKE_EXAMPLE_SOURCE_DIR}/src/rectangle.pyx ${CYTHON_CMAKE_EXAMPLE_SOURCE_DIR}/src/rectangle.pyx
rectangle_props.py rectangle_props.py
${CYTHON_CMAKE_EXAMPLE_SOURCE_DIR}/Rectangle.cxx ${CYTHON_CMAKE_EXAMPLE_SOURCE_DIR}/src/Rectangle.cxx
) )
1 change: 0 additions & 1 deletion cmake/UseCython.cmake
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ function( cython_add_standalone_executable _name )
endif() endif()
endforeach() endforeach()


message( "pyx_module_sources: ${pyx_module_sources}" )
if( cython_arguments_MAIN_MODULE ) if( cython_arguments_MAIN_MODULE )
set( main_module ${cython_arguments_MAIN_MODULE} ) set( main_module ${cython_arguments_MAIN_MODULE} )
endif() endif()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
name = "cythoncmakeexample", name = "cythoncmakeexample",
package_dir = {'': 'src'}, package_dir = {'': 'src'},
data_files = [(get_python_lib(), glob.glob('src/*.so')), data_files = [(get_python_lib(), glob.glob('src/*.so')),
('bin', 'bin/rectangle-props')], ('bin', ['bin/rectangle-props'])],
author = 'Matt McCormick', author = 'Matt McCormick',
description = 'Use the CMake build system to make Cython modules.', description = 'Use the CMake build system to make Cython modules.',
license = 'Apache', license = 'Apache',
Expand Down
4 changes: 1 addition & 3 deletions src/CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,5 @@
include_directories( ${CYTHON_CMAKE_EXAMPLE_SOURCE_DIR}/include )

# If the pyx file is a C++ file, we should specify that here. # If the pyx file is a C++ file, we should specify that here.
set_source_files_properties( rectangle.pyx PROPERTIES CYTHON_IS_CXX TRUE ) set_source_files_properties( ${CYTHON_CMAKE_EXAMPLE_SOURCE_DIR}/src/rectangle.pyx PROPERTIES CYTHON_IS_CXX TRUE )


# Multi-file cython modules do not appear to be working at the moment. # Multi-file cython modules do not appear to be working at the moment.
cython_add_module( rectangle rectangle.pyx Rectangle.cxx ) cython_add_module( rectangle rectangle.pyx Rectangle.cxx )
4 changes: 0 additions & 4 deletions test/rectangle_props_test.py

This file was deleted.

0 comments on commit d88f017

Please sign in to comment.