From 4c2a77db9b62abbeae6f40bb12d4399131d67f1c Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Tue, 5 Jan 2010 22:11:48 +0200 Subject: [PATCH] CMake - Include test project when creating VS IDE project. --- CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e1d1c211..7d431bad8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,12 +17,16 @@ PROJECT(CPPCHECK) ADD_SUBDIRECTORY(lib) ADD_SUBDIRECTORY(cli) -# Exclude tests from normal targets -# There is 'make check' -target for compiling and running tests -ADD_SUBDIRECTORY(test EXCLUDE_FROM_ALL) +# Exclude tests from command line targets but include them to VS IDE targets. +# There is 'make check' -target for compiling and running tests from +# command line. +IF (MSVC_IDE) + ADD_SUBDIRECTORY(test) +ELSE (MSVC_IDE) + ADD_SUBDIRECTORY(test EXCLUDE_FROM_ALL) +ENDIF (MSVC_IDE) # Don't build GUI for Cygwin (most installations don't have QT) IF (NOT CYGWIN) ADD_SUBDIRECTORY(gui) -endif (NOT CYGWIN) - +ENDIF (NOT CYGWIN)