Verified Commit 24c5a860 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake: fix variable

parent 37104175
......@@ -150,9 +150,10 @@ IF(BUILD_PYTHON_INTERFACE)
OUTPUT_VARIABLE _python_implementation_value
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
MESSAGE(STATUS "Python compiler: ${_python_implementation_value}")
IF(_python_implementation_value MATCHES "PyPy")
SET(BUILD_PYTHON_INTERFACE_WITH_PYPY)
SET(BUILD_PYTHON_INTERFACE_WITH_PYPY TRUE)
ENDIF()
ELSE(BUILD_PYTHON_INTERFACE)
......
......@@ -48,22 +48,23 @@ FILE(GLOB_RECURSE ${PROJECT_NAME}_PYTHON_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
)
REMOVE_PATH_FROM_LIST("${${PROJECT_NAME}_PYTHON_HEADERS}" "${CMAKE_CURRENT_SOURCE_DIR}/" ${PROJECT_NAME}_PYTHON_HEADERS)
REMOVE_PATH_FROM_LIST("${${PROJECT_NAME}_PYTHON_SOURCES}" "${CMAKE_CURRENT_SOURCE_DIR}/" ${PROJECT_NAME}_PYTHON_SOURCES)
# Parser for Python model
IF(NOT BUILD_PYTHON_INTERFACE_WITH_PYPY)
LIST(APPEND ${PROJECT_NAME}_PYTHON_HEADERS
parsers/python.hpp
)
SET(${PROJECT_NAME}_PARSER_PYTHON_HEADERS
IF(BUILD_PYTHON_INTERFACE_WITH_PYPY)
LIST(REMOVE_ITEM ${PROJECT_NAME}_PYTHON_HEADERS
parsers/python.hpp
)
LIST(APPEND ${PROJECT_NAME}_PYTHON_SOURCES
LIST(REMOVE_ITEM ${PROJECT_NAME}_PYTHON_SOURCES
parsers/python/model.cpp
)
ENDIF(NOT BUILD_PYTHON_INTERFACE_WITH_PYPY)
REMOVE_PATH_FROM_LIST("${${PROJECT_NAME}_PYTHON_HEADERS}" "${CMAKE_CURRENT_SOURCE_DIR}/" ${PROJECT_NAME}_PYTHON_HEADERS)
REMOVE_PATH_FROM_LIST("${${PROJECT_NAME}_PYTHON_SOURCES}" "${CMAKE_CURRENT_SOURCE_DIR}/" ${PROJECT_NAME}_PYTHON_SOURCES)
ELSE(BUILD_PYTHON_INTERFACE_WITH_PYPY)
SET(${PROJECT_NAME}_PARSER_PYTHON_HEADERS
parsers/python.hpp
)
ENDIF(BUILD_PYTHON_INTERFACE_WITH_PYPY)
# Python exposition of FCL
IF(NOT BUILD_WITH_HPP_FCL_PYTHON_BINDINGS)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment