Skip to content

Commit

Permalink
Update CatchConfigOptions.cmake
Browse files Browse the repository at this point in the history
Fix CMake warning

CMake Warning (dev) at catch2-src/CMake/CatchConfigOptions.cmake:71 (set):
  uninitialized variable 'BUILD_SHARED_LIBS'
  • Loading branch information
YarikTH authored and horenmar committed May 12, 2023
1 parent 598895d commit 5a40b22
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMake/CatchConfigOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ set(_OtherConfigOptions
foreach(OptionName ${_OtherConfigOptions})
AddConfigOption(${OptionName})
endforeach()
set(CATCH_CONFIG_SHARED_LIBRARY ${BUILD_SHARED_LIBS})
if(DEFINED BUILD_SHARED_LIBS)
set(CATCH_CONFIG_SHARED_LIBRARY ${BUILD_SHARED_LIBS})
else()
set(CATCH_CONFIG_SHARED_LIBRARY "")
endif()

set(CATCH_CONFIG_DEFAULT_REPORTER "console" CACHE STRING "Read docs/configuration.md for details. The name of the reporter should be without quotes.")
set(CATCH_CONFIG_CONSOLE_WIDTH "80" CACHE STRING "Read docs/configuration.md for details. Must form a valid integer literal.")
Expand Down

0 comments on commit 5a40b22

Please sign in to comment.