Commit 4867b35f authored by Kučera Petr RNDr. Ph.D.'s avatar Kučera Petr RNDr. Ph.D.
Browse files

CMakeLists allow compilation positional independent

parent 74e182b0
......@@ -24,6 +24,8 @@ else()
message(STATUS "Dynamic linking")
endif()
set (BUILD_SUBOOL_GLUCOSE OFF CACHE BOOL "Build subool_glucose for Python binding")
function(su_add_pthread name)
if (BUILD_STATIC)
target_link_libraries (${name} -pthread -Wl,--whole-archive -lpthread -Wl,--no-whole-archive)
......
......@@ -15,3 +15,6 @@ cmake: build
cmake_static: build
cd build && cmake .. -DBUILD_STATIC=ON
cmake_subool_glucose: build
cd build && cmake .. -DBUILD_SUBOOL_GLUCOSE=ON
......@@ -14,3 +14,12 @@ add_custom_target(version_h ALL
add_library(subool STATIC ${SUBOOL_SOURCES})
add_dependencies(subool version_h)
if (BUILD_SUBOOL_GLUCOSE)
# Compilation of library in form needed by the Python interface
# As suggested by Jakub Rozlivek
file(GLOB GLUCOSE_SOURCES ${GLUCOSE_HOME}/simp/SimpSolver.cc ${GLUCOSE_HOME}/utils/*.cc ${GLUCOSE_HOME}/core/*.cc)
add_library(subool_glucose STATIC ${GLUCOSE_SOURCES} ${SUBOOL_SOURCES})
set_property(TARGET subool_glucose PROPERTY POSITION_INDEPENDENT_CODE ON)
add_dependencies(subool_glucose version_h)
endif()
Markdown is supported
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