File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 2.8.1 )
22project (UnitTest++)
33
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 )
510
611if (MSVC14 OR MSVC12)
712 # has the support we need
@@ -57,8 +62,12 @@ target_link_libraries(TestUnitTest++ UnitTest++)
5762
5863# run unit tests as post build step
5964add_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 ()
6271
6372# add install targets
6473# need a custom install path?
You can’t perform that action at this time.
0 commit comments