Skip to content
This repository was archived by the owner on Jul 14, 2022. It is now read-only.

Commit 04c9fd6

Browse files
committed
test example
1 parent 7f7bb95 commit 04c9fd6

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

azure-pipelines.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ stages:
9494
echo $PATH
9595
which cmake
9696
cmake --version
97-
# prepare build dir
97+
# prepare build and install dir
98+
mkdir install
9899
mkdir build
99100
cd build
100101
# setup cmake options
@@ -125,3 +126,27 @@ stages:
125126
# run ctest
126127
ctest -T test --output-on-failure -V
127128
displayName: 'Run Unit Tests'
129+
130+
- script: |
131+
#################################
132+
# install
133+
#################################
134+
cd build
135+
make install
136+
displayName: 'Install'
137+
138+
- script: |
139+
###########################
140+
# using with cmake example
141+
###########################
142+
pwd
143+
ls -l
144+
which cmake
145+
cd install/examples/apcomp/using-with-cmake
146+
mkdir _test_build
147+
cd _test_build
148+
cmake ../
149+
make VERBOSE=1
150+
./apcomp_example
151+
displayName: 'Test vs Install (using-with-cmake)'
152+
condition: succeeded()

src/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ endif()
118118
################################
119119
# Add examples
120120
################################
121-
#if(ENABLE_EXAMPLES)
122-
# add_subdirectory(examples)
123-
#endif()
121+
add_subdirectory(examples)
124122

125123
################################
126124
# Add our config helpers

src/examples/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
install(DIRECTORY using-with-cmake
2+
DESTINATION examples/apcomp)

0 commit comments

Comments
 (0)