Skip to content
Snippets Groups Projects
Commit f379b247 authored by ilor's avatar ilor
Browse files

Conditional build of Swig

parent b6311d2e
Branches
No related merge requests found
...@@ -15,6 +15,7 @@ IF(NOT CMAKE_BUILD_TYPE) ...@@ -15,6 +15,7 @@ IF(NOT CMAKE_BUILD_TYPE)
FORCE) FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE) ENDIF(NOT CMAKE_BUILD_TYPE)
set(WCCL_BUILD_SWIG True CACHE BOOL "Build SWIG Python wrappers" FORCE)
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
# Set our own default flags at first run. # Set our own default flags at first run.
...@@ -62,4 +63,16 @@ endif(MSVC OR BORLAND) ...@@ -62,4 +63,16 @@ endif(MSVC OR BORLAND)
add_subdirectory(libwccl) add_subdirectory(libwccl)
add_subdirectory(wccl-apps) add_subdirectory(wccl-apps)
add_subdirectory(tests) add_subdirectory(tests)
add_subdirectory(swig)
if(WCCL_BUILD_SWIG)
FIND_PACKAGE(SWIG)
if(SWIG_FOUND)
message(STATUS "SWIG found, Python wrappers will be built")
add_subdirectory(swig)
else()
message(STATUS "WARNING: SWIG not found, Python wrappers will not be built")
endif(SWIG_FOUND)
else()
message(STATUS "Not building SWIG Python wrappers")
endif(WCCL_BUILD_SWIG)
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