Skip to content

Commit cd43780

Browse files
committed
fix(error): drop internal warning/sanitizer targets from export
1 parent 367dc24 commit cd43780

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,22 @@ if (ERROR_SOURCES)
7676
)
7777

7878
# Build-only helpers must not leak into exported interfaces.
79-
if (TARGET vix_warnings)
80-
target_link_libraries(vix_error PRIVATE vix_warnings)
79+
if (NOT MSVC)
80+
target_compile_options(vix_error PRIVATE
81+
-Wall
82+
-Wextra
83+
-Wpedantic
84+
)
8185
endif()
8286

83-
if (VIX_ENABLE_SANITIZERS AND TARGET vix_sanitizers)
84-
target_link_libraries(vix_error PRIVATE vix_sanitizers)
87+
if (VIX_ENABLE_SANITIZERS AND NOT MSVC)
88+
target_compile_options(vix_error PRIVATE
89+
-fno-omit-frame-pointer
90+
-fsanitize=address,undefined
91+
)
92+
target_link_options(vix_error PRIVATE
93+
-fsanitize=address,undefined
94+
)
8595
endif()
8696

8797
set_target_properties(vix_error PROPERTIES

0 commit comments

Comments
 (0)