Skip to content

Commit

Permalink
COMP: Update ITKModuleExternal CMake message to avoid CTest false pos…
Browse files Browse the repository at this point in the history
…itive

This commit updates message introduced in 4b010e7 (ENH: use the new
CMake mechanism to specify MSVC's static or DLL CRT) to avoid false
positive when building module like ITKUltrasound as a standalone project.

Removing the "error" string avoid the regular expression associated
with cmCTestBuildHandler.cxx (see [1]) from reporting an error.

[1] https://github.com/Kitware/CMake/blob/7dc7907837a8ce4608f8cc762409617e62c496fe/Source/CTest/cmCTestBuildHandler.cxx#L28-L169

Co-authored-by: Connor Bowley <connor.bowley@kitware.com>
Co-authored-by: James Fishbaugh <james.fishbaugh@kitware.com>
Co-authored-by: Sam Horvath <sam.horvath@kitware.com>
  • Loading branch information
4 people authored and dzenanz committed Apr 26, 2022
1 parent 049ff7f commit 230839e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMake/ITKModuleExternal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if(MSVC AND ${CMAKE_MINIMUM_REQUIRED_VERSION} LESS 3.16.3)
message(WARNING "cmake_minimum_required must be at least 3.16.3")
message(STATUS "This is needed to allow proper setting of CMAKE_MSVC_RUNTIME_LIBRARY.")
message(STATUS "Do not be surprised if you run into link errors of the style:
error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_Static' doesn't match value 'MDd_Dynamic' in module.obj")
LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_Static' doesn't match value 'MDd_Dynamic' in module.obj")
endif()
if(NOT EXISTS ${ITK_CMAKE_DIR}/ITKModuleMacros.cmake)
message(FATAL_ERROR "Modules can only be built against an ITK build tree; they cannot be built against an ITK install tree.")
Expand Down

0 comments on commit 230839e

Please sign in to comment.