Skip to content

Commit f4d22db

Browse files
committed
Setup install.
1 parent 2101587 commit f4d22db

File tree

3 files changed

+66
-45
lines changed

3 files changed

+66
-45
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,18 @@ if( ENABLE_TESTS )
7171
endif()
7272

7373
if ( ENABLE_EXAMPLES )
74+
if( NOT ENABLE_TESTS )
75+
message( WARNING "ENABLE_TESTS must be on to build the examples." )
76+
endif()
77+
7478
add_subdirectory( examples )
7579
endif()
7680

7781
if( ENABLE_BENCHMARKS )
82+
if( NOT ENABLE_TESTS )
83+
message( WARNING "ENABLE_TESTS must be on to build the benchmarks." )
84+
endif()
85+
7886
add_subdirectory( benchmarks )
7987
endif()
8088

cmake/Config.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/LvArrayConfig.hpp.in
3636

3737
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/LvArrayConfig.hpp.in
3838
${CMAKE_CURRENT_SOURCE_DIR}/docs/doxygen/LvArrayConfig.hpp )
39+
40+
install( FILES ${CMAKE_BINARY_DIR}/include/LvArrayConfig.hpp
41+
DESTINATION include )

src/CMakeLists.txt

Lines changed: 55 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,64 @@
1-
set(lvarray_headers
2-
Array.hpp
3-
ArrayOfArrays.hpp
4-
ArrayOfArraysView.hpp
5-
ArrayOfSets.hpp
6-
ArrayOfSetsView.hpp
7-
ArraySlice.hpp
8-
ArrayView.hpp
9-
CRSMatrix.hpp
10-
CRSMatrixView.hpp
11-
ChaiBuffer.hpp
12-
Macros.hpp
13-
MallocBuffer.hpp
14-
SortedArray.hpp
15-
SortedArrayView.hpp
16-
SparsityPattern.hpp
17-
SparsityPatternView.hpp
18-
StackBuffer.hpp
19-
arrayManipulation.hpp
20-
bufferManipulation.hpp
21-
fixedSizeSquareMatrixOps.hpp
22-
fixedSizeSquareMatrixOpsImpl.hpp
23-
genericTensorOps.hpp
24-
indexing.hpp
25-
input.hpp
26-
limits.hpp
27-
math.hpp
28-
output.hpp
29-
sliceHelpers.hpp
30-
sortedArrayManipulation.hpp
31-
sortedArrayManipulationHelpers.hpp
32-
system.hpp
33-
tensorOps.hpp
34-
totalview/tv_data_display.h
35-
typeManipulation.hpp
36-
)
1+
set( lvarray_headers
2+
Array.hpp
3+
ArrayOfArrays.hpp
4+
ArrayOfArraysView.hpp
5+
ArrayOfSets.hpp
6+
ArrayOfSetsView.hpp
7+
ArraySlice.hpp
8+
ArrayView.hpp
9+
CRSMatrix.hpp
10+
CRSMatrixView.hpp
11+
ChaiBuffer.hpp
12+
Macros.hpp
13+
MallocBuffer.hpp
14+
SortedArray.hpp
15+
SortedArrayView.hpp
16+
SparsityPattern.hpp
17+
SparsityPatternView.hpp
18+
StackBuffer.hpp
19+
arrayManipulation.hpp
20+
bufferManipulation.hpp
21+
fixedSizeSquareMatrixOps.hpp
22+
fixedSizeSquareMatrixOpsImpl.hpp
23+
genericTensorOps.hpp
24+
indexing.hpp
25+
input.hpp
26+
limits.hpp
27+
math.hpp
28+
output.hpp
29+
sliceHelpers.hpp
30+
sortedArrayManipulation.hpp
31+
sortedArrayManipulationHelpers.hpp
32+
system.hpp
33+
tensorOps.hpp
34+
totalview/tv_data_display.h
35+
typeManipulation.hpp )
3736

38-
set(lvarray_sources
39-
system.cpp
40-
totalview/tv_data_display.c
41-
)
37+
set( lvarray_sources
38+
system.cpp
39+
totalview/tv_data_display.c )
4240

43-
44-
message("adding lvarray library")
4541
blt_add_library( NAME lvarray
4642
SOURCES ${lvarray_sources}
4743
HEADERS ${lvarray_headers}
48-
DEPENDS_ON ${lvarray_dependencies}
49-
)
44+
DEPENDS_ON ${lvarray_dependencies} )
45+
46+
target_include_directories( lvarray
47+
PUBLIC
48+
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>
49+
$<INSTALL_INTERFACE:include> )
50+
51+
install( TARGETS lvarray
52+
EXPORT lvarray
53+
ARCHIVE DESTINATION lib
54+
LIBRARY DESTINATION lib
55+
RUNTIME DESTINATION lib )
56+
57+
install( EXPORT lvarray
58+
DESTINATION share/lvarray/cmake/ )
5059

51-
target_include_directories( lvarray PUBLIC ${CMAKE_BINARY_DIR}/include )
60+
install( FILES ${lvarray_headers} DESTINATION include
61+
)
5262

5363
lvarray_add_code_checks( PREFIX lvarray
5464
EXCLUDES "blt/*" )

0 commit comments

Comments
 (0)