Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
horbie committed Dec 6, 2016
1 parent 6ed5aa3 commit 0aef22e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.6)
project(share_me)

OPTION(GTEST "unittest, using googletest, default OFF" OFF)

IF(UNIX)
ADD_DEFINITIONS(-D__unix__)
ELSEIF(WIN32)
Expand All @@ -15,12 +17,15 @@ ADD_SUBDIRECTORY(utils)

INCLUDE_DIRECTORIES(./FileTransfer)

IF(${GTEST} STREQUAL "ON")
IF(${GTEST})
IF(NOT ${GTEST_ROOT})
SET(GTEST_ROOT ${PROJECT_SOURCE_DIR}/../external_dependencies/googletest)
ENDIF(NOT ${GTEST_ROOT})
ENDIF()
INCLUDE_DIRECTORIES(${GTEST_ROOT}/googletest/include)
ENDIF(GTEST)
MESSAGE(STATUS "GTEST is ON")
ELSE()
MESSAGE(STATUS "GTEST is OFF")
ENDIF()

add_executable(main main.cpp)

Expand Down

0 comments on commit 0aef22e

Please sign in to comment.