Skip to content

Commit 8447317

Browse files
committed
Find Doxygen package
1 parent c823017 commit 8447317

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

CMakeLists.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ if (SQLITECPP_RUN_CPPLINT)
7979
ALL
8080
COMMAND python cpplint.py ${CPPLINT_ARG_OUTPUT} ${CPPLINT_ARG_VERBOSE} ${CPPLINT_ARG_LINELENGTH} ${PROJECT_SOURCE_DIR}/${SQLITECPP_SRC}
8181
)
82+
else()
83+
message(STATUS "SQLITECPP_RUN_CPPLINT OFF")
8284
endif()
8385

8486
option(SQLITECPP_RUN_CPPCHECK "Run cppcheck C++ static analysis tool." ON)
@@ -88,22 +90,25 @@ if (SQLITECPP_RUN_CPPCHECK)
8890
ALL
8991
COMMAND cppcheck -j 4 cppcheck --enable=style --quiet ${CPPCHECK_ARG_TEMPLATE} ${PROJECT_SOURCE_DIR}/src
9092
)
93+
else()
94+
message(STATUS "SQLITECPP_RUN_CPPCHECK OFF")
9195
endif()
9296

9397
option(SQLITECPP_RUN_DOXYGEN "Run Doxygen C++ documentation tool." ON)
9498
if (SQLITECPP_RUN_DOXYGEN)
95-
# add a Doxygen target to the "all" target
96-
if (NOT DEFINED ENV{TRAVIS})
97-
# if not runing on a Travis CI Virtual Machine
99+
find_package(Doxygen)
100+
if (DOXYGEN_FOUND)
101+
# add a Doxygen target to the "all" target
98102
add_custom_target(SQLiteCpp_doxygen
99103
ALL
100104
COMMAND doxygen Doxyfile > ${DEV_NULL}
101105
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
102106
)
103107
else()
104-
# but no Doxygen under Travis CI: too costly and no real benefit
105-
message("no Doxygen target when TRAVIS is defined")
108+
message(STATUS "Doxygen not found")
106109
endif()
110+
else()
111+
message(STATUS "SQLITECPP_RUN_DOXYGEN OFF")
107112
endif()
108113

109114
option(SQLITECPP_RUN_TESTS "Run test tools." ON)
@@ -117,4 +122,6 @@ if (SQLITECPP_RUN_TESTS)
117122

118123
# does the example1 runs successfully?
119124
add_test(Example1Run example1)
125+
else()
126+
message(STATUS "SQLITECPP_RUN_TESTS OFF")
120127
endif()

0 commit comments

Comments
 (0)