forked from luceneplusplus/LucenePlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeExternal.txt
28 lines (25 loc) · 935 Bytes
/
CMakeExternal.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Enable ExternalProject CMake module
include(ExternalProject)
# main directory for external projects
set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty)
# GTest external project
ExternalProject_Add(
googletest
SVN_REPOSITORY http://googletest.googlecode.com/svn/tags/release-1.7.0/
TIMEOUT 10
CMAKE_ARGS -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
-Dgtest_force_shared_crt=ON
# Disable update
UPDATE_COMMAND ""
# Disable install step
INSTALL_COMMAND ""
# Wrap download, configure and build steps in a script to log output
LOG_DOWNLOAD ON
LOG_CONFIGURE ON
LOG_BUILD ON)
ExternalProject_Get_Property(googletest source_dir)
set(GTEST_DIR ${source_dir})
set(GTEST_INCLUDE_DIR ${source_dir}/include)
ExternalProject_Get_Property(googletest binary_dir)
set(GTEST_LIB_DIR ${binary_dir})