set(SRC
    csympy_wrapper.cpp
    )

include_directories(${PYTHON_INCLUDE_PATH})
include_directories(${csympy_BINARY_DIR}/src ${teuchos_BINARY_DIR})

cython_add_module_pyx(csympy_wrapper csympy.pxd)
add_python_library(csympy_wrapper ${SRC})
target_link_libraries(csympy_wrapper csympy teuchos ${LIBS})

add_custom_target(cython
    COMMAND cython csympy_wrapper.pyx
    )

set(PY_PATH ${PYTHON_INSTALL_PATH}/csympy/lib)
install(TARGETS csympy_wrapper
            RUNTIME DESTINATION ${PY_PATH}
            ARCHIVE DESTINATION ${PY_PATH}
            LIBRARY DESTINATION ${PY_PATH}
        )
install(FILES __init__.py
    DESTINATION ${PY_PATH}
    )

set(SRC
    csympy_wrapper.cpp
    )

include_directories(${PYTHON_INCLUDE_PATH})
include_directories(${csympy_BINARY_DIR}/src ${teuchos_BINARY_DIR})

cython_add_module_pyx(csympy_wrapper csympy.pxd)
add_python_library(csympy_wrapper ${SRC})
target_link_libraries(csympy_wrapper csympy teuchos ${LIBS})
if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
  # Must suppress strick aliasing warnings for this file
  set_source_files_properties(
    csympy_wrapper.cpp
    PROPERTIES COMPILE_FLAGS -fno-strict-aliasing
    )
endif()

add_custom_target(cython
    COMMAND cython csympy_wrapper.pyx
    )

set(PY_PATH ${PYTHON_INSTALL_PATH}/csympy/lib)
install(TARGETS csympy_wrapper
            RUNTIME DESTINATION ${PY_PATH}
            ARCHIVE DESTINATION ${PY_PATH}
            LIBRARY DESTINATION ${PY_PATH}
        )
install(FILES __init__.py
    DESTINATION ${PY_PATH}
    )

Disable strict aliasing for csympy_wrapper.cpp
Disable strict aliasing for csympy_wrapper.cpp

This gets rid of all the compiler warnings of the type:

/home/ondrej/repos/csympy/csympy/lib/csympy_wrapper.cpp: In function ‘PyObject*
__pyx_pf_6csympy_3lib_14csympy_wrapper_5Basic_4__add__(PyObject*, PyObject*)’:
/home/ondrej/repos/csympy/csympy/lib/csympy_wrapper.cpp:1192:15: warning:
dereferencing type-punned pointer will break strict-aliasing rules
[-Wstrict-aliasing]
