Skip to content

Commit

Permalink
[CMake] EDIT: enable GTest in package.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
guparan committed Apr 11, 2018
1 parent 92a88e7 commit 7e03965
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ option(SOFA_WITH_THREADING "Compile sofa with thread-safetiness support (PARTIAL
option(SOFA_WITH_EXPERIMENTAL_FEATURES "Compile sofa with exprimental features regarding sparse matrices treatments under mappings" OFF)

### Testing
add_subdirectory(extlibs/gtest)
option(SOFA_BUILD_TESTS "Compile the automatic tests for Sofa, along with the gtest library." ON)
if(SOFA_BUILD_TESTS)
# Enable testing features of cmake, like the add_test() command.
enable_testing()
add_subdirectory(extlibs/gtest)
endif()

### Ninja build pools
Expand Down
4 changes: 4 additions & 0 deletions package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,9 @@ setSofaOption(PLUGIN_SOFAMISCCOLLISION ON)

# Copy resources files (etc/, share/, examples/) when installing
setSofaOption(SOFA_INSTALL_RESOURCES_FILES ON)

# MacOS bundle creation
setSofaOption(RUNSOFA_INSTALL_AS_BUNDLE ON)

# install GTest even if SOFA_BUILD_TESTS=OFF
add_subdirectory(extlibs/gtest)

0 comments on commit 7e03965

Please sign in to comment.