#6725 allow building of synergy without tests

Signed-off-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com>
Signed-off-by: Jamie Newbon <jamie@symless.com>
This commit is contained in:
Pieterjan Camerlynck 2017-03-27 21:51:59 +02:00 committed by Jamie Newbon
parent 9f7101139e
commit 16bccc2ed0
4 changed files with 432 additions and 424 deletions

View file

@ -20,6 +20,7 @@ project (synergy-core C CXX)
option (SYNERGY_BUILD_LEGACY_GUI "Build the legacy GUI" ON) option (SYNERGY_BUILD_LEGACY_GUI "Build the legacy GUI" ON)
option (SYNERGY_BUILD_LEGACY_SERVICE "Build the legacy service (synergyd)" ON) option (SYNERGY_BUILD_LEGACY_SERVICE "Build the legacy service (synergyd)" ON)
option (SYNERGY_BUILD_LEGACY_INSTALLER "Build the legacy installer" ON) option (SYNERGY_BUILD_LEGACY_INSTALLER "Build the legacy installer" ON)
option (BUILD_TESTS "Override building of tests" ON)
if (DEFINED ENV{SYNERGY_ENTERPRISE}) if (DEFINED ENV{SYNERGY_ENTERPRISE})
option (SYNERGY_ENTERPRISE "Build Enterprise" ON) option (SYNERGY_ENTERPRISE "Build Enterprise" ON)

View file

@ -23,4 +23,6 @@ if (SYNERGY_BUILD_LEGACY_GUI)
add_subdirectory(gui) add_subdirectory(gui)
endif (SYNERGY_BUILD_LEGACY_GUI) endif (SYNERGY_BUILD_LEGACY_GUI)
add_subdirectory(test) if (BUILD_TESTS)
add_subdirectory(test)
endif()

View file

@ -24,7 +24,9 @@
#include "common/stdset.h" #include "common/stdset.h"
#include "common/stdvector.h" #include "common/stdvector.h"
#include <gtest/gtest_prod.h> #ifdef TEST_ENV
#include "gtest/gtest_prod.h"
#endif
namespace synergy { namespace synergy {
@ -326,6 +328,7 @@ public:
//@} //@}
#ifdef TEST_ENV
private: private:
FRIEND_TEST(KeyMapTests, FRIEND_TEST(KeyMapTests,
findBestKey_requiredDown_matchExactFirstItem); findBestKey_requiredDown_matchExactFirstItem);
@ -340,7 +343,7 @@ private:
FRIEND_TEST(KeyMapTests, FRIEND_TEST(KeyMapTests,
findBestKey_onlyOneRequiredDown_matchTwoRequiredChangesItem); findBestKey_onlyOneRequiredDown_matchTwoRequiredChangesItem);
FRIEND_TEST(KeyMapTests, findBestKey_noRequiredDown_cannotMatch); FRIEND_TEST(KeyMapTests, findBestKey_noRequiredDown_cannotMatch);
#endif
private: private:
//! Ways to synthesize a key //! Ways to synthesize a key
enum EKeystroke { enum EKeystroke {

View file

@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#define TEST_ENV
#include "synergy/KeyMap.h" #include "synergy/KeyMap.h"
#include "test/global/gtest.h" #include "test/global/gtest.h"