Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
ctest: Honor BUILD_TESTING option
Browse files Browse the repository at this point in the history
  • Loading branch information
RoEdAl committed May 8, 2024
1 parent bb0afdb commit 4fe3d9e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ IF(BUILD_CHAN_QUECTEL_BINARY)
IF(IS_GIT_REPO)
INCLUDE(CTest)
ENDIF()

IF(NOT DEFINED ASTERISK_VERSION_NUM)
FIND_PACKAGE(PkgConfig)
IF(${PKG_CONFIG_FOUND})
Expand Down
4 changes: 4 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@
"type": "BOOL",
"value": true
},
"BUILD_TESTING": {
"type": "BOOL",
"value": false
},
"BUILD_CHAN_QUECTEL_BINARY": {
"type": "BOOL",
"value": true
Expand Down
12 changes: 12 additions & 0 deletions get-build-flags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ readonly JQ_DEB_SCRIPT='
name: "deb-internal",
hidden: true,
cacheVariables: {
"BUILD_TESTING": {
type: "BOOL",
value: true
},
"CHECK_SOURCE_DATE_EPOCH": {
"type": "BOOL",
"value": true
Expand Down Expand Up @@ -58,6 +62,10 @@ readonly JQ_RPI_SCRIPT='
name: "rpi-internal",
hidden: true,
cacheVariables: {
"BUILD_TESTING": {
type: "BOOL",
value: true
},
"CHECK_SOURCE_DATE_EPOCH": {
"type": "BOOL",
"value": true
Expand Down Expand Up @@ -118,6 +126,10 @@ readonly JQ_RPM_SCRIPT='
name: "rpm-internal",
hidden: true,
cacheVariables: {
"BUILD_TESTING": {
type: "BOOL",
value: true
},
"CHECK_SOURCE_DATE_EPOCH": {
"type": "BOOL",
"value": true
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ INSTALL(
COMPONENT chan-quectel
)

IF(IS_GIT_REPO)
IF(IS_GIT_REPO AND BUILD_TESTING)
IF(DEFINED CMAKE_READELF)
ADD_TEST(NAME "Load library" COMMAND ${CMAKE_COMMAND}
-DCMAKE_READELF=${CMAKE_READELF}
Expand Down

0 comments on commit 4fe3d9e

Please sign in to comment.