Skip to content

Instantly share code, notes, and snippets.

@awygle
Last active May 18, 2018 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awygle/60b40d69bf217e12289061d47ccc7d8e to your computer and use it in GitHub Desktop.
Save awygle/60b40d69bf217e12289061d47ccc7d8e to your computer and use it in GitHub Desktop.
cmake_minimum_required(VERSION 3.9)
project(libtrellis)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Werror")
set(CMAKE_DEFIN)
find_package(PythonInterp 3.6 REQUIRED)
find_package(PythonLibs 3.6 REQUIRED)
find_package(Boost REQUIRED COMPONENTS python-py36 filesystem thread)
include_directories(include/ ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS})
aux_source_directory(include/ INCLUDE_FILES)
aux_source_directory(src/ SOURCE_FILES)
add_library(trellis SHARED ${INCLUDE_FILES} ${SOURCE_FILES})
PYTHON_ADD_MODULE(pytrellis ${INCLUDE_FILES} ${SOURCE_FILES})
target_compile_definitions(trellis PRIVATE FUZZ_SAFETY_CHECK=1)
target_compile_definitions(pytrellis PRIVATE FUZZ_SAFETY_CHECK=1)
target_link_libraries(trellis LINK_PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
target_link_libraries(pytrellis LINK_PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment