Skip to content

Commit

Permalink
Turn tests off by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
parsiad committed Feb 28, 2021
1 parent 7bbd9d9 commit 8cfcc59
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ SET(CMAKE_BUILD_TYPE Release)
SET(PROJECT_BINARY_DIR "${PROJECT_SOURCE_DIR}/bin")
SET(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}")

ENABLE_TESTING()
INCLUDE(GoogleTest)
ADD_SUBDIRECTORY(tests)
OPTION(PACKAGE_TESTS "Build tests")
if(PACKAGE_TESTS)
ENABLE_TESTING()
INCLUDE(GoogleTest)
ADD_SUBDIRECTORY(tests)
endif()
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,12 @@ struct natord {
}
};
```
### Build and run tests
Run the following commands (from the mlinterp project directory) to build and run tests:
```
cmake -DPACKAGE_TESTS=ON .
make all test
```

0 comments on commit 8cfcc59

Please sign in to comment.