File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
55project (cubool LANGUAGES CXX )
66
77# Exposed to the user build options
8- option (CUBOOL_WITH_CUDA "Build library with cuda backend (default)" ON )
9- option (CUBOOL_WITH_SEQUENTIAL "Build library with cpu sequential backend (fallback)" ON )
10- option (CUBOOL_WITH_NAIVE "Build library with naive and naive-shared dense matrix multiplication" OFF )
11- option (CUBOOL_BUILD_TESTS "Build project unit-tests with gtest" ON )
8+ option (CUBOOL_WITH_CUDA "Build library with cuda backend (default)" ON )
9+ option (CUBOOL_WITH_SEQUENTIAL "Build library with cpu sequential backend (fallback)" ON )
10+ option (CUBOOL_WITH_NAIVE "Build library with naive and naive-shared dense matrix multiplication" OFF )
11+ option (CUBOOL_BUILD_TESTS "Build project unit-tests with gtest" ON )
12+ option (CUBOOL_COPY_TO_PY_PACKAGE "Copy compiled shared library into python package folder (for package use purposes)" ON )
1213
1314set (CUBOOL_VERSION_MAJOR 1)
1415set (CUBOOL_VERSION_MINOR 0)
Original file line number Diff line number Diff line change @@ -178,14 +178,16 @@ if (CUBOOL_BUILD_TESTS)
178178 add_subdirectory (tests )
179179endif ()
180180
181- # todo: Different platforms has specific naming conventions
182- set (LIBRARY_FILE_NAME "libcubool.so" )
183-
184- # Copy cubool library after build
185- add_custom_command (
186- TARGET cubool POST_BUILD
187- COMMAND "${CMAKE_COMMAND} " -E
188- copy
189- "${CMAKE_BINARY_DIR} /cubool/${LIBRARY_FILE_NAME} "
190- "${CMAKE_BINARY_DIR} /python/pycubool"
191- COMMENT "Copy cubool lib into python folder" )
181+ # Copy cubool library after build if allowed
182+ if (CUBOOL_COPY_TO_PY_PACKAGE)
183+ # todo: Different platforms has specific naming conventions
184+ set (LIBRARY_FILE_NAME "libcubool.so" )
185+
186+ add_custom_command (
187+ TARGET cubool POST_BUILD
188+ COMMAND "${CMAKE_COMMAND} " -E
189+ copy
190+ "${CMAKE_BINARY_DIR} /cubool/${LIBRARY_FILE_NAME} "
191+ "${CMAKE_BINARY_DIR} /python/pycubool"
192+ COMMENT "Copy cubool compiled lib into python folder" )
193+ endif ()
You can’t perform that action at this time.
0 commit comments