Skip to content

Commit 62a35ea

Browse files
committed
Log detected version when building with CMake
1 parent 72c4c37 commit 62a35ea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmake/modules/shared/CompilerSettings.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WASI")
4444
endif()
4545

4646
file(STRINGS "../VERSION.txt" SWT_TESTING_LIBRARY_VERSION LIMIT_COUNT 1)
47-
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:SWT_TESTING_LIBRARY_VERSION=\"${SWT_TESTING_LIBRARY_VERSION}\">")
47+
if(SWT_TESTING_LIBRARY_VERSION)
48+
message(STATUS "Swift Testing version: ${SWT_TESTING_LIBRARY_VERSION}")
49+
add_compile_definitions("$<$<COMPILE_LANGUAGE:CXX>:SWT_TESTING_LIBRARY_VERSION=\"${SWT_TESTING_LIBRARY_VERSION}\">")
50+
endif()

0 commit comments

Comments
 (0)