From: Andy Li Date: Sat, 6 Aug 2016 16:23:11 +0000 (+0800) Subject: CMake: add gctest as a test X-Git-Tag: v8.0.0~1180 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dad023e3aa579a31cd82ed7aba9215b63ab1699f;p=gc CMake: add gctest as a test * CMakeLists.txt: Include CTest. * tests/CMakeLists.txt: Add gctest as test. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 40c04163..4b33ab2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,8 @@ SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required PROJECT(gc) +INCLUDE(CTest) + CMAKE_MINIMUM_REQUIRED(VERSION 2.6) ADD_DEFINITIONS("-D_CRT_SECURE_NO_DEPRECATE diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0f4d455f..a24872c9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -17,3 +17,4 @@ ADD_DEFINITIONS(-DGC_NOT_DLL) ADD_EXECUTABLE(gctest WIN32 test.c) TARGET_LINK_LIBRARIES(gctest gc-lib) +ADD_TEST(NAME gctest COMMAND gctest)