~ci-train-bot/compiz/compiz-ubuntu-xenial-2841

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: smspillaz
  • Date: 2012-01-23 11:54:43 UTC
  • Revision ID: sam.spilsbury@canonical.com-20120123115443-nbn9itvfy9ganyl3
Makes testing optional, cleans up option test

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
)
121
121
 
122
122
# Build Google Test and make its headers known
123
 
find_package (GTest REQUIRED)
 
123
find_package (GTest)
124
124
find_library (GMOCK_LIBRARY gmock)
125
125
find_library (GMOCK_MAIN_LIBRARY gmock_main)
126
126
 
127
 
if (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY)
128
 
  message (FATAL_ERROR "Google Mock not found!")
129
 
endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY)
 
127
if (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
 
128
  message ("Google Mock and Google Test not found - cannot build tests!")
 
129
  set (COMPIZ_BUILD_TESTING OFF CACHE FORCE)
 
130
endif (NOT GMOCK_LIBRARY OR NOT GMOCK_MAIN_LIBRARY OR NOT GTEST_FOUND)
130
131
 
131
132
include_directories (${GTEST_INCLUDE_DIRS})
132
133