aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-08-12 17:36:42 +0000
committerTarmac <Unknown>2013-08-12 17:36:42 +0000
commitf884f8364222a3a647da0b1159264f0974f95264 (patch)
treef3bfdb1cf6752890089176cc63942e5de42d93e7
parentaf1b85a001162fe3172de25bd14eb245c259d0e5 (diff)
parent752149b96a3b78937fee7d95ef119df8bb6b7c52 (diff)
downloadayatana-indicator-session-f884f8364222a3a647da0b1159264f0974f95264.tar.gz
ayatana-indicator-session-f884f8364222a3a647da0b1159264f0974f95264.tar.bz2
ayatana-indicator-session-f884f8364222a3a647da0b1159264f0974f95264.zip
Ensure that GCov CFLAGS & LIBS are set before cmake traverses into the src/ directory.
Approved by PS Jenkins bot, Ted Gould.
-rw-r--r--CMakeLists.txt16
1 files changed, 9 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8a366b..69ac18e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,18 +49,20 @@ add_custom_target (cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/src)
include_directories (${CMAKE_CURRENT_BINARY_DIR}/src)
-
-add_subdirectory (src)
-add_subdirectory (data)
-add_subdirectory (po)
-
+# testing & coverage
if (${enable_tests})
set (GTEST_SOURCE_DIR /usr/src/gtest/src)
set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..)
set (GTEST_LIBS -lpthread)
enable_testing ()
if (${enable_lcov})
- include(cmake/GCov.cmake)
+ include(GCov)
endif ()
- add_subdirectory(tests)
+endif ()
+
+add_subdirectory (src)
+add_subdirectory (data)
+add_subdirectory (po)
+if (${enable_tests})
+ add_subdirectory (tests)
endif ()