separate lib for high level stuff

This commit is contained in:
Christian Zimmermann 2021-06-24 21:39:42 +02:00
parent 49f2c41a95
commit 7cd0c3104f
8 changed files with 39 additions and 9 deletions

View file

@ -0,0 +1,3 @@
#include "high_level_operation.h"
#include "high_level_operation.cc.h"

View file

@ -10,6 +10,6 @@
#include "multi_array.cc.h"
#include "slice.cc.h"
#include "dynamic_operation.cc.h"
#include "high_level_operation.cc.h"
//#include "high_level_operation.cc.h"
//#include "expressions.cc.h"

View file

@ -13,7 +13,7 @@
#include "operation_def.h"
#include "map_range.h"
#include "dynamic_operation.h"
#include "high_level_operation.h"
//#include "high_level_operation.h"
#include "multi_array_header.cc.h"

View file

@ -10,8 +10,12 @@ set(libmultiarray_a_SOURCES
${CMAKE_SOURCE_DIR}/src/lib/ranges/type_map.cc
${CMAKE_SOURCE_DIR}/src/lib/ranges/multi_range_factory_product_map.cc
${CMAKE_SOURCE_DIR}/src/lib/map_range_factory_product_map.cc
)
set(libhlmultiarray_a_SOURCES
${CMAKE_SOURCE_DIR}/src/lib/high_level_operation.cc
)
#message(WARNING ${libhlmultiarray_a_SOURCES})
file(GLOB cc_files "${CMAKE_SOURCE_DIR}/src/lib/ranges/range_types/*.cc")
foreach(ccfile ${cc_files})
@ -21,14 +25,18 @@ endforeach(ccfile)
file(GLOB cc_files "${CMAKE_SOURCE_DIR}/src/lib/hl_ops/*.cc")
foreach(ccfile ${cc_files})
set(libmultiarray_a_SOURCES ${libmultiarray_a_SOURCES}
set(libhlmultiarray_a_SOURCES ${libhlmultiarray_a_SOURCES}
${ccfile})
endforeach(ccfile)
add_library(multiarray_obj OBJECT
${libmultiarray_a_SOURCES}
)
add_library(hlmultiarray_obj OBJECT
${libhlmultiarray_a_SOURCES}
)
set_target_properties(multiarray_obj PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
set_target_properties(hlmultiarray_obj PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_library(multiarray SHARED
$<TARGET_OBJECTS:multiarray_obj>
@ -40,6 +48,16 @@ add_library(multiarray_static
)
set_target_properties(multiarray_obj PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_library(hlmultiarray SHARED
$<TARGET_OBJECTS:hlmultiarray_obj>
)
set_target_properties(hlmultiarray PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_library(hlmultiarray_static
$<TARGET_OBJECTS:hlmultiarray_obj>
)
set_target_properties(hlmultiarray_obj PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
install(TARGETS multiarray
ARCHIVE DESTINATION ${INSTALL_PATH}/lib
LIBRARY DESTINATION ${INSTALL_PATH}/lib)
@ -47,3 +65,11 @@ install(TARGETS multiarray
install(TARGETS multiarray_static
ARCHIVE DESTINATION ${INSTALL_PATH}/lib
LIBRARY DESTINATION ${INSTALL_PATH}/lib)
install(TARGETS hlmultiarray
ARCHIVE DESTINATION ${INSTALL_PATH}/lib
LIBRARY DESTINATION ${INSTALL_PATH}/lib)
install(TARGETS hlmultiarray_static
ARCHIVE DESTINATION ${INSTALL_PATH}/lib
LIBRARY DESTINATION ${INSTALL_PATH}/lib)

View file

@ -1,6 +1,6 @@
#include "multi_array_header.h"
#include "high_level_operation.h"
#include "hl_multi_array_header.h"
namespace MultiArrayTools
{

View file

@ -10,7 +10,7 @@ for x in $(cat ../include/extensions/math.h) ; do
file=hl_ops/${fff}.cc
test -f ${file} && rm -f ${file}
echo "#include \"multi_array_header.h\"" >> ${file}
echo "#include \"high_level_operation.h\"" >> ${file}
echo "#include \"hl_multi_array_header.h\"" >> ${file}
echo "" >> ${file}
echo "namespace MultiArrayTools" >> ${file}
echo "{" >> ${file}
@ -25,7 +25,7 @@ for fff in plus minus multiplies divides ; do
file=hl_ops/${fff}.cc
test -f ${file} && rm -f ${file}
echo "#include \"multi_array_header.h\"" >> ${file}
echo "#include \"high_level_operation.h\"" >> ${file}
echo "#include \"hl_multi_array_header.h\"" >> ${file}
echo "" >> ${file}
echo "namespace MultiArrayTools" >> ${file}
echo "{" >> ${file}
@ -38,7 +38,7 @@ for fff in negate ; do
file=hl_ops/${fff}.cc
test -f ${file} && rm -f ${file}
echo "#include \"multi_array_header.h\"" >> ${file}
echo "#include \"high_level_operation.h\"" >> ${file}
echo "#include \"hl_multi_array_header.h\"" >> ${file}
echo "" >> ${file}
echo "namespace MultiArrayTools" >> ${file}
echo "{" >> ${file}

View file

@ -32,8 +32,8 @@ target_link_libraries(op3utest ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
add_test(NAME op3utest COMMAND op3utest)
add_executable(op4utest op4_unit_test.cc)
add_dependencies(op4utest multiarray)
target_link_libraries(op4utest ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} multiarray)
add_dependencies(op4utest multiarray hlmultiarray)
target_link_libraries(op4utest ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} multiarray hlmultiarray)
add_test(NAME op4utest COMMAND op4utest)
add_executable(opptest op_perf_test.cc)

View file

@ -1,5 +1,6 @@
#include "test_header.h"
#include "hl_multi_array_header.h"
#include <ctime>
namespace