separate lib for high level stuff
This commit is contained in:
parent
49f2c41a95
commit
7cd0c3104f
8 changed files with 39 additions and 9 deletions
3
src/include/hl_multi_array_header.h
Normal file
3
src/include/hl_multi_array_header.h
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#include "high_level_operation.h"
|
||||||
|
|
||||||
|
#include "high_level_operation.cc.h"
|
|
@ -10,6 +10,6 @@
|
||||||
#include "multi_array.cc.h"
|
#include "multi_array.cc.h"
|
||||||
#include "slice.cc.h"
|
#include "slice.cc.h"
|
||||||
#include "dynamic_operation.cc.h"
|
#include "dynamic_operation.cc.h"
|
||||||
#include "high_level_operation.cc.h"
|
//#include "high_level_operation.cc.h"
|
||||||
//#include "expressions.cc.h"
|
//#include "expressions.cc.h"
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "operation_def.h"
|
#include "operation_def.h"
|
||||||
#include "map_range.h"
|
#include "map_range.h"
|
||||||
#include "dynamic_operation.h"
|
#include "dynamic_operation.h"
|
||||||
#include "high_level_operation.h"
|
//#include "high_level_operation.h"
|
||||||
|
|
||||||
#include "multi_array_header.cc.h"
|
#include "multi_array_header.cc.h"
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,12 @@ set(libmultiarray_a_SOURCES
|
||||||
${CMAKE_SOURCE_DIR}/src/lib/ranges/type_map.cc
|
${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/ranges/multi_range_factory_product_map.cc
|
||||||
${CMAKE_SOURCE_DIR}/src/lib/map_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
|
${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")
|
file(GLOB cc_files "${CMAKE_SOURCE_DIR}/src/lib/ranges/range_types/*.cc")
|
||||||
foreach(ccfile ${cc_files})
|
foreach(ccfile ${cc_files})
|
||||||
|
@ -21,14 +25,18 @@ endforeach(ccfile)
|
||||||
|
|
||||||
file(GLOB cc_files "${CMAKE_SOURCE_DIR}/src/lib/hl_ops/*.cc")
|
file(GLOB cc_files "${CMAKE_SOURCE_DIR}/src/lib/hl_ops/*.cc")
|
||||||
foreach(ccfile ${cc_files})
|
foreach(ccfile ${cc_files})
|
||||||
set(libmultiarray_a_SOURCES ${libmultiarray_a_SOURCES}
|
set(libhlmultiarray_a_SOURCES ${libhlmultiarray_a_SOURCES}
|
||||||
${ccfile})
|
${ccfile})
|
||||||
endforeach(ccfile)
|
endforeach(ccfile)
|
||||||
|
|
||||||
add_library(multiarray_obj OBJECT
|
add_library(multiarray_obj OBJECT
|
||||||
${libmultiarray_a_SOURCES}
|
${libmultiarray_a_SOURCES}
|
||||||
)
|
)
|
||||||
|
add_library(hlmultiarray_obj OBJECT
|
||||||
|
${libhlmultiarray_a_SOURCES}
|
||||||
|
)
|
||||||
set_target_properties(multiarray_obj PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
set_target_properties(multiarray_obj PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||||
|
set_target_properties(hlmultiarray_obj PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||||
|
|
||||||
add_library(multiarray SHARED
|
add_library(multiarray SHARED
|
||||||
$<TARGET_OBJECTS:multiarray_obj>
|
$<TARGET_OBJECTS:multiarray_obj>
|
||||||
|
@ -40,6 +48,16 @@ add_library(multiarray_static
|
||||||
)
|
)
|
||||||
set_target_properties(multiarray_obj PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
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
|
install(TARGETS multiarray
|
||||||
ARCHIVE DESTINATION ${INSTALL_PATH}/lib
|
ARCHIVE DESTINATION ${INSTALL_PATH}/lib
|
||||||
LIBRARY DESTINATION ${INSTALL_PATH}/lib)
|
LIBRARY DESTINATION ${INSTALL_PATH}/lib)
|
||||||
|
@ -47,3 +65,11 @@ install(TARGETS multiarray
|
||||||
install(TARGETS multiarray_static
|
install(TARGETS multiarray_static
|
||||||
ARCHIVE DESTINATION ${INSTALL_PATH}/lib
|
ARCHIVE DESTINATION ${INSTALL_PATH}/lib
|
||||||
LIBRARY 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)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
#include "multi_array_header.h"
|
#include "multi_array_header.h"
|
||||||
#include "high_level_operation.h"
|
#include "hl_multi_array_header.h"
|
||||||
|
|
||||||
namespace MultiArrayTools
|
namespace MultiArrayTools
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@ for x in $(cat ../include/extensions/math.h) ; do
|
||||||
file=hl_ops/${fff}.cc
|
file=hl_ops/${fff}.cc
|
||||||
test -f ${file} && rm -f ${file}
|
test -f ${file} && rm -f ${file}
|
||||||
echo "#include \"multi_array_header.h\"" >> ${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 "" >> ${file}
|
||||||
echo "namespace MultiArrayTools" >> ${file}
|
echo "namespace MultiArrayTools" >> ${file}
|
||||||
echo "{" >> ${file}
|
echo "{" >> ${file}
|
||||||
|
@ -25,7 +25,7 @@ for fff in plus minus multiplies divides ; do
|
||||||
file=hl_ops/${fff}.cc
|
file=hl_ops/${fff}.cc
|
||||||
test -f ${file} && rm -f ${file}
|
test -f ${file} && rm -f ${file}
|
||||||
echo "#include \"multi_array_header.h\"" >> ${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 "" >> ${file}
|
||||||
echo "namespace MultiArrayTools" >> ${file}
|
echo "namespace MultiArrayTools" >> ${file}
|
||||||
echo "{" >> ${file}
|
echo "{" >> ${file}
|
||||||
|
@ -38,7 +38,7 @@ for fff in negate ; do
|
||||||
file=hl_ops/${fff}.cc
|
file=hl_ops/${fff}.cc
|
||||||
test -f ${file} && rm -f ${file}
|
test -f ${file} && rm -f ${file}
|
||||||
echo "#include \"multi_array_header.h\"" >> ${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 "" >> ${file}
|
||||||
echo "namespace MultiArrayTools" >> ${file}
|
echo "namespace MultiArrayTools" >> ${file}
|
||||||
echo "{" >> ${file}
|
echo "{" >> ${file}
|
||||||
|
|
|
@ -32,8 +32,8 @@ target_link_libraries(op3utest ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
|
||||||
add_test(NAME op3utest COMMAND op3utest)
|
add_test(NAME op3utest COMMAND op3utest)
|
||||||
|
|
||||||
add_executable(op4utest op4_unit_test.cc)
|
add_executable(op4utest op4_unit_test.cc)
|
||||||
add_dependencies(op4utest multiarray)
|
add_dependencies(op4utest multiarray hlmultiarray)
|
||||||
target_link_libraries(op4utest ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} multiarray)
|
target_link_libraries(op4utest ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} multiarray hlmultiarray)
|
||||||
add_test(NAME op4utest COMMAND op4utest)
|
add_test(NAME op4utest COMMAND op4utest)
|
||||||
|
|
||||||
add_executable(opptest op_perf_test.cc)
|
add_executable(opptest op_perf_test.cc)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
#include "test_header.h"
|
#include "test_header.h"
|
||||||
|
#include "hl_multi_array_header.h"
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
|
|
Loading…
Reference in a new issue