Skip to content

Commit

Permalink
Release 1.1.0 (#7)
Browse files Browse the repository at this point in the history
* Add SEMVER_ENABLE_TESTING cmake option to control building of unit tests. (#6)

* Bump version
  • Loading branch information
zmarko committed Mar 27, 2019
1 parent 6215a7f commit a3dff8d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 12 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
cmake_minimum_required(VERSION 2.8)
project(semver)
set(VERSION_MAJOR "1")
set(VERSION_MINOR "0")
set(VERSION_MINOR "1")
set(VERSION_PATCH "0")
set(VERSION_RELEASE "")
set(VERSION_BUILD "")

option(SEMVER_ENABLE_TESTING "Adds tests subdirectory and enables testing" OFF)

# Build full version string, including optional components
string(COMPARE NOTEQUAL VERSION_RELEASE "" HAVE_RELEASE)
string(COMPARE NOTEQUAL VERSION_BUILD "" HAVE_BUILD)
Expand All @@ -32,10 +34,13 @@ if(MSVC)
endif()

add_subdirectory(src)
add_subdirectory(test)

enable_testing()
add_test(NAME semver200_parser_tests COMMAND semver200_parser_tests)
add_test(NAME semver200_comparator_tests COMMAND semver200_comparator_tests)
add_test(NAME semver200_version_tests COMMAND semver200_version_tests)
add_test(NAME semver200_modifier_tests COMMAND semver200_modifier_tests)
if (SEMVER_ENABLE_TESTING)
add_subdirectory(test)

enable_testing()
add_test(NAME semver200_parser_tests COMMAND semver200_parser_tests)
add_test(NAME semver200_comparator_tests COMMAND semver200_comparator_tests)
add_test(NAME semver200_version_tests COMMAND semver200_version_tests)
add_test(NAME semver200_modifier_tests COMMAND semver200_modifier_tests)
endif()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The code is written in C++14, so, fairly recent compiler is required to build it
- GCC 5.1.1
- Clang 3.7.0
Library itself does not have any external dependencies. Unit tests that verify the library work as expected, on the other hand, depend on the [Boost.Test](http://www.boost.org/doc/libs/1_59_0/libs/test/doc/html/index.html) library. If you do not have and do not want to install Boost.Test, then comment out appropriate section of CMakeLists.txt file.
Library itself does not have any external dependencies. Unit tests that verify the library work as expected, on the other hand, depend on the [Boost.Test](http://www.boost.org/doc/libs/1_59_0/libs/test/doc/html/index.html) library. Unit tests are disabled by default. To build tests run cmake with -DSEMVER_ENABLE_TESTING=ON option.
The code comes with CMake project files. In order to build it you should:
Expand Down

0 comments on commit a3dff8d

Please sign in to comment.