You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# When building the coverity analysis target we disable debug
52
+
target_compile_options(coverity_analysis PUBLIC -DNDEBUG )
53
+
endif()
46
54
47
55
# ==================================== Test Configuration ========================================
48
56
49
-
# Include Unity build configuration.
50
-
include( unit-test/unity_build.cmake )
51
-
52
-
# Check if the Unity source directory exists, and if not present, clone the submodule
53
-
# if BUILD_CLONE_SUBMODULES configuration is enabled.
54
-
if( NOTEXISTS${UNITY_DIR}/src )
55
-
# Attempt to clone Unity.
56
-
if( ${BUILD_CLONE_SUBMODULES} )
57
-
clone_unity()
58
-
else()
59
-
message( FATAL_ERROR "The required submodule Unity does not exist. Either clone it manually, or set BUILD_CLONE_SUBMODULES to 1 to automatically clone it during build." )
57
+
if( UNITTEST )
58
+
# Include Unity build configuration.
59
+
include( unit-test/unity_build.cmake )
60
+
61
+
# Check if the Unity source directory exists, and if not present, clone the submodule
62
+
# if BUILD_CLONE_SUBMODULES configuration is enabled.
63
+
if( NOTEXISTS${UNITY_DIR}/src )
64
+
# Attempt to clone Unity.
65
+
if( ${BUILD_CLONE_SUBMODULES} )
66
+
clone_unity()
67
+
else()
68
+
message( FATAL_ERROR "The required submodule Unity does not exist. Either clone it manually, or set BUILD_CLONE_SUBMODULES to 1 to automatically clone it during build." )
69
+
endif()
60
70
endif()
61
-
endif()
62
71
63
-
# Add unit test and coverage configuration.
72
+
# Add unit test and coverage configuration.
64
73
65
-
# Use CTest utility for managing test runs. This has to be added BEFORE
66
-
# defining test targets with add_test()
67
-
enable_testing()
74
+
# Use CTest utility for managing test runs. This has to be added BEFORE
75
+
# defining test targets with add_test()
76
+
enable_testing()
68
77
69
-
# Add build targets for Unity and Unit, required for unit testing.
70
-
add_unity_targets()
78
+
# Add build targets for Unity and Unit, required for unit testing.
79
+
add_unity_targets()
71
80
72
-
# Add function to enable Unity based tests and coverage.
0 commit comments