File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 2.8.1)
2
2
project (UnitTest++)
3
3
4
- option (UTPP_USE_PLUS_SIGN "Set this to OFF if you wish to use '-cpp' instead of '++' in lib/include paths" ON )
4
+ option (UTPP_USE_PLUS_SIGN
5
+ "Set this to OFF if you wish to use '-cpp' instead of '++' in lib/include paths"
6
+ ON )
7
+ option (UTPP_INCLUDE_TESTS_IN_BUILD
8
+ "Set this to OFF if you do not wish to automatically build or run unit tests as part of the default cmake --build"
9
+ ON )
5
10
6
11
if (MSVC14 OR MSVC12)
7
12
# has the support we need
@@ -57,8 +62,12 @@ target_link_libraries(TestUnitTest++ UnitTest++)
57
62
58
63
# run unit tests as post build step
59
64
add_custom_command (TARGET TestUnitTest++
60
- POST_BUILD COMMAND TestUnitTest++
61
- COMMENT "Running unit tests" )
65
+ POST_BUILD COMMAND TestUnitTest++
66
+ COMMENT "Running unit tests" )
67
+
68
+ if (NOT ${UTPP_INCLUDE_TESTS_IN_BUILD} )
69
+ set_target_properties (TestUnitTest++ PROPERTIES EXCLUDE_FROM_ALL 1)
70
+ endif ()
62
71
63
72
# add install targets
64
73
# need a custom install path?
You can’t perform that action at this time.
0 commit comments