add CMake support to build gtest
This commit is contained in:
@@ -270,10 +270,10 @@ ENDIF(INSTALL_LIBS)
|
||||
# OPTION(INSTALL_EXTRA_LIBS "Set when you want extra libraries installed" OFF)
|
||||
#ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
||||
|
||||
OPTION(BUILD_UNIT_TESTS "Build Unit Tests" OFF)
|
||||
OPTION(BUILD_UNIT_TESTS "Build Unit Tests" ON)
|
||||
|
||||
IF (BUILD_UNIT_TESTS)
|
||||
SUBDIRS(UnitTests)
|
||||
SUBDIRS(test)
|
||||
ENDIF()
|
||||
|
||||
set (BULLET_CONFIG_CMAKE_PATH lib${LIB_SUFFIX}/cmake/bullet )
|
||||
|
||||
3
test/CMakeLists.txt
Normal file
3
test/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
#SUBDIRS( gtest-1.7.0 TestBullet3OpenCL)
|
||||
SUBDIRS( gtest-1.7.0 )
|
||||
|
||||
16
test/gtest-1.7.0/CMakeLists.txt
Normal file
16
test/gtest-1.7.0/CMakeLists.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
.
|
||||
include
|
||||
)
|
||||
|
||||
SET(gtest-1.7.0_SRCS
|
||||
src/gtest-all.cc
|
||||
)
|
||||
|
||||
#ADD_DEFINITIONS(-DGTEST_HAS_PTHREAD=1)
|
||||
ADD_DEFINITIONS(-D_VARIADIC_MAX=10)
|
||||
|
||||
FILE(GLOB_RECURSE gtest-1.7.0_HDRS "*.h")
|
||||
|
||||
ADD_LIBRARY(gtest ${gtest-1.7.0_SRCS} ${gtest-1.7.0_HDRS})
|
||||
Reference in New Issue
Block a user