Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cmake DEVELOPER option for building tests and examples
Fetching gtest with git submodules was causing confusing so this is now done with cmake during the configure step
- Loading branch information
Showing
6 changed files
with
70 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,13 +1,10 @@ | |||
cmake_minimum_required(VERSION 2.8.11) | cmake_minimum_required(VERSION 2.8.11) | ||
|
|||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/Modules ) | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/Modules ) | ||
add_subdirectory(src) | |||
|
|
||
# prevent the examples and tests libs installing | add_subdirectory(src) | ||
macro(install) | |||
endmacro() | |||
|
|||
add_subdirectory(src/examples) | |||
|
|
||
enable_testing() | if( DEFINED DEVELOPER ) | ||
add_subdirectory(src/test) | add_subdirectory(src/examples) | ||
enable_testing() | |||
add_subdirectory(src/test) | |||
endif( DEFINED DEVELOPER ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,15 @@ | |||
cmake_minimum_required(VERSION 2.8.2) | |||
|
|||
project(googletest-download NONE) | |||
|
|||
include(ExternalProject) | |||
ExternalProject_Add(googletest | |||
GIT_REPOSITORY https://github.com/google/googletest.git | |||
GIT_TAG release-1.8.1 | |||
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src" | |||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build" | |||
CONFIGURE_COMMAND "" | |||
BUILD_COMMAND "" | |||
INSTALL_COMMAND "" | |||
TEST_COMMAND "" | |||
) |