Skip to content

Commit

Permalink
CMake-language style improvements.
Browse files Browse the repository at this point in the history
Changed CMake command names to lower case and removed arguments from block
termination commands.

Thanks to Hans Johnson (@hjmjohnson) for the contribution.
  • Loading branch information
Pedro F. Arizpe-Gomez committed May 31, 2018
1 parent 57827ec commit ef0dd4f
Show file tree
Hide file tree
Showing 98 changed files with 2,420 additions and 2,420 deletions.
554 changes: 277 additions & 277 deletions CMake/3rdparty.cmake

Large diffs are not rendered by default.

86 changes: 43 additions & 43 deletions CMake/CTest/CTestCustomAndroid.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@
#

# Restore the required settings of the CMake configuration step
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(CMAKE_COMMAND "@CMAKE_COMMAND@")
SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CMAKE_FILES_DIRECTORY "@CMAKE_FILES_DIRECTORY@")
SET(CMAKE_MODULE_PATH "@CMAKE_ROOT@/Modules")
SET(CMAKE_SHARED_LIBRARY_PREFIX "@CMAKE_SHARED_LIBRARY_PREFIX@")
SET(CMAKE_SHARED_LIBRARY_SUFFIX "@CMAKE_SHARED_LIBRARY_SUFFIX@")
SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
SET(DCMTK_CMAKE_INCLUDE "@CMAKE_SOURCE_DIR@/@DCMTK_CMAKE_INCLUDE@")
SET(DCMTK_TEST_EXECUTABLES "@DCMTK_TEST_EXECUTABLES@")
SET(DCMTK_ALL_LIBRARIES "@DCMTK_ALL_LIBRARIES@")
SET(DCMTK_LIBRARY_DEPENDENCIES "@DCMTK_LIBRARY_DEPENDENCIES@")
SET(DCMTK_PACKAGE_VERSION "@DCMTK_PACKAGE_VERSION@")
SET(DCMTK_ABI_VERSION "@DCMTK_ABI_VERSION@")
SET(BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
SET(DCMTK_DICOM_DICTIONARIES "@DCMTK_DICOM_DICTIONARIES@")
SET(ANDROID "@ANDROID@")
SET(ANDROID_ADB_PROGRAM "@ANDROID_ADB_PROGRAM@")
SET(ANDROID_ANDROID_PROGRAM "@ANDROID_ANDROID_PROGRAM@")
SET(ANDROID_EMULATOR_PROGRAM "@ANDROID_EMULATOR_PROGRAM@")
SET(ANDROID_EMULATOR_AVD "@ANDROID_EMULATOR_AVD@")
SET(ANDROID_RUNTIME_LIBRARIES "@ANDROID_RUNTIME_LIBRARIES@")
SET(ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@")
cmake_minimum_required(VERSION 2.6)
set(CMAKE_COMMAND "@CMAKE_COMMAND@")
set(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
set(CMAKE_CURRENT_BINARY_DIR "@CMAKE_BINARY_DIR@")
set(CMAKE_FILES_DIRECTORY "@CMAKE_FILES_DIRECTORY@")
set(CMAKE_MODULE_PATH "@CMAKE_ROOT@/Modules")
set(CMAKE_SHARED_LIBRARY_PREFIX "@CMAKE_SHARED_LIBRARY_PREFIX@")
set(CMAKE_SHARED_LIBRARY_SUFFIX "@CMAKE_SHARED_LIBRARY_SUFFIX@")
set(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@")
set(DCMTK_CMAKE_INCLUDE "@CMAKE_SOURCE_DIR@/@DCMTK_CMAKE_INCLUDE@")
set(DCMTK_TEST_EXECUTABLES "@DCMTK_TEST_EXECUTABLES@")
set(DCMTK_ALL_LIBRARIES "@DCMTK_ALL_LIBRARIES@")
set(DCMTK_LIBRARY_DEPENDENCIES "@DCMTK_LIBRARY_DEPENDENCIES@")
set(DCMTK_PACKAGE_VERSION "@DCMTK_PACKAGE_VERSION@")
set(DCMTK_ABI_VERSION "@DCMTK_ABI_VERSION@")
set(BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
set(DCMTK_DICOM_DICTIONARIES "@DCMTK_DICOM_DICTIONARIES@")
set(ANDROID "@ANDROID@")
set(ANDROID_ADB_PROGRAM "@ANDROID_ADB_PROGRAM@")
set(ANDROID_ANDROID_PROGRAM "@ANDROID_ANDROID_PROGRAM@")
set(ANDROID_EMULATOR_PROGRAM "@ANDROID_EMULATOR_PROGRAM@")
set(ANDROID_EMULATOR_AVD "@ANDROID_EMULATOR_AVD@")
set(ANDROID_RUNTIME_LIBRARIES "@ANDROID_RUNTIME_LIBRARIES@")
set(ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@")
# Emulate some required CMake commands while running inside CTest
INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/CTest/dcmtkCTestMacros.cmake)
include(${DCMTK_CMAKE_INCLUDE}CMake/CTest/dcmtkCTestMacros.cmake)
# For DCMTK_UNSET_XXX
INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkMacros.cmake)
include(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkMacros.cmake)
# Load required functions for controlling the Android device emulator
INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake)
include(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake)

# Prepare the Android testing environment
# Prepare the emulator
Expand All @@ -51,20 +51,20 @@ MESSAGE_COMMAND(STOP_MESSAGE ${STOP_MESSAGE})
# CTEST_CUSTOM_POST_TESTS executes a sequence of 'non CMake' commands separated
# by ';' characters. Therefore the sequence a single command consists of must
# be translated appropriately first
STRING(REPLACE ";" " " STOP_EMULATOR "${STOP_EMULATOR}")
STRING(REPLACE ";" " " STOP_MESSAGE "${STOP_MESSAGE}")
string(REPLACE ";" " " STOP_EMULATOR "${STOP_EMULATOR}")
string(REPLACE ";" " " STOP_MESSAGE "${STOP_MESSAGE}")
# Register the cleanup hooks
SET(CTEST_CUSTOM_POST_TEST "${STOP_MESSAGE}" "${STOP_EMULATOR}")
set(CTEST_CUSTOM_POST_TEST "${STOP_MESSAGE}" "${STOP_EMULATOR}")

# Set the current emulator instance handle via an environment variable
SET(ENV{DCMTK_ANDROID_EMULATOR_INSTANCE} "${DCMTK_ANDROID_EMULATOR_INSTANCE}")
set(ENV{DCMTK_ANDROID_EMULATOR_INSTANCE} "${DCMTK_ANDROID_EMULATOR_INSTANCE}")

# Collect the list of required libraries
IF(BUILD_SHARED_LIBS)
FOREACH(LIBRARY ${DCMTK_ALL_LIBRARIES})
LIST(APPEND DCMTK_CREATED_SHARED_LIBRARIES "${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_PACKAGE_VERSION}")
ENDFOREACH()
ENDIF(BUILD_SHARED_LIBS)
if(BUILD_SHARED_LIBS)
foreach(LIBRARY ${DCMTK_ALL_LIBRARIES})
list(APPEND DCMTK_CREATED_SHARED_LIBRARIES "${CMAKE_BINARY_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_PACKAGE_VERSION}")
endforeach()
endif()

# Transmit the required executables, libraries and dictionaries to the emulator
DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE
Expand All @@ -77,22 +77,22 @@ DCMTK_ANDROID_PUSH(DCMTK_ANDROID_EMULATOR_INSTANCE
)

# Set executable permissions
FOREACH(TEST_EXECUTABLE ${DCMTK_TEST_EXECUTABLES})
GET_FILENAME_COMPONENT(NAME "${TEST_EXECUTABLE}" NAME)
foreach(TEST_EXECUTABLE ${DCMTK_TEST_EXECUTABLES})
get_filename_component(NAME "${TEST_EXECUTABLE}" NAME)
DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE
COMMAND chmod 755 "${ANDROID_TEMPORARY_FILES_LOCATION}/${NAME}"
OUTPUT_QUIET
ERROR_QUIET
)
ENDFOREACH()
endforeach()

# Create necessary softlinks
IF(BUILD_SHARED_LIBS)
FOREACH(LIBRARY ${DCMTK_ALL_LIBRARIES})
if(BUILD_SHARED_LIBS)
foreach(LIBRARY ${DCMTK_ALL_LIBRARIES})
DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE
COMMAND ln -s "./${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_PACKAGE_VERSION}" "${ANDROID_TEMPORARY_FILES_LOCATION}/${CMAKE_SHARED_LIBRARY_PREFIX}${LIBRARY}${CMAKE_SHARED_LIBRARY_SUFFIX}.${DCMTK_ABI_VERSION}"
OUTPUT_QUIET
ERROR_QUIET
)
ENDFOREACH()
ENDIF(BUILD_SHARED_LIBS)
endforeach()
endif()
8 changes: 4 additions & 4 deletions CMake/CTest/CTestCustomWine.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
# workaround, but what can you do?
#

SET(ENV{WINEPREFIX} "@DCMTK_WINEPREFIX@")
SET(ENV{DCMDICTPATH} "@DCMDICTPATH@")
SET(WINE_WINE_PROGRAM "@WINE_WINE_PROGRAM@")
set(ENV{WINEPREFIX} "@DCMTK_WINEPREFIX@")
set(ENV{DCMDICTPATH} "@DCMDICTPATH@")
set(WINE_WINE_PROGRAM "@WINE_WINE_PROGRAM@")

# spawn the winserver using 'cmd /C call' -> effectively NOP
# spawn it using 'sh', such that this script does not attach itself to it.
EXECUTE_PROCESS(COMMAND
execute_process(COMMAND
sh -c "\"${WINE_WINE_PROGRAM}\" cmd /C call"
OUTPUT_FILE "/dev/null"
ERROR_FILE "/dev/null"
Expand Down
40 changes: 20 additions & 20 deletions CMake/CTest/dcmtkCTestMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
# that is missing inside CTest.
#

MACRO(MESSAGE_COMMAND VAR MODE)
IF(${MODE} STREQUAL "STATUS")
SET(${VAR} ${CMAKE_COMMAND} -E echo -- ${ARGN})
ELSEIF(${MODE} STREQUAL "WARNING")
SET(${VAR} ${CMAKE_COMMAND} -E echo WARNING: ${ARGN})
ELSEIF(${MODE} STREQUAL "AUTHOR_WARNING")
SET(${VAR} ${CMAKE_COMMAND} -E echo Warning: ${ARGN})
ELSEIF(${MODE} STREQUAL "SEND_ERROR")
SET(${VAR} ${CMAKE_COMMAND} -E echo Error: ${ARGN})
ELSEIF(${MODE} STREQUAL "FATAL_ERROR")
SET(${VAR} ${CMAKE_COMMAND} -E echo ERROR: ${ARGN})
ELSEIF(${MODE} STREQUAL "DEPRECATION")
SET(${VAR} ${CMAKE_COMMAND} -E echo ${ARGN})
ELSE()
SET(${VAR} ${CMAKE_COMMAND} -E echo ${MODE} ${ARGN})
ENDIF()
ENDMACRO(MESSAGE_COMMAND)
macro(MESSAGE_COMMAND VAR MODE)
if(${MODE} STREQUAL "STATUS")
set(${VAR} ${CMAKE_COMMAND} -E echo -- ${ARGN})
elseif(${MODE} STREQUAL "WARNING")
set(${VAR} ${CMAKE_COMMAND} -E echo WARNING: ${ARGN})
elseif(${MODE} STREQUAL "AUTHOR_WARNING")
set(${VAR} ${CMAKE_COMMAND} -E echo Warning: ${ARGN})
elseif(${MODE} STREQUAL "SEND_ERROR")
set(${VAR} ${CMAKE_COMMAND} -E echo Error: ${ARGN})
elseif(${MODE} STREQUAL "FATAL_ERROR")
set(${VAR} ${CMAKE_COMMAND} -E echo ERROR: ${ARGN})
elseif(${MODE} STREQUAL "DEPRECATION")
set(${VAR} ${CMAKE_COMMAND} -E echo ${ARGN})
else()
set(${VAR} ${CMAKE_COMMAND} -E echo ${MODE} ${ARGN})
endif()
endmacro()

FUNCTION(MESSAGE)
function(MESSAGE)
MESSAGE_COMMAND(COMMAND ${ARGN})
EXECUTE_PROCESS(COMMAND ${COMMAND})
ENDFUNCTION(MESSAGE)
execute_process(COMMAND ${COMMAND})
endfunction()
10 changes: 5 additions & 5 deletions CMake/CTest/dcmtkCTestRun.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
# environment variable appropriately.
#

SET(ENV{DCMDICTPATH} "@DCMDICTPATH@")
set(ENV{DCMDICTPATH} "@DCMDICTPATH@")

EXECUTE_PROCESS(COMMAND
execute_process(COMMAND
"${DCMTK_CTEST_TESTCASE_COMMAND}" $ENV{DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}"
RESULT_VARIABLE RESULT
)

# We cannot forward the result value to CMake, so print it instead and let CMake
# return with code '1' or whatever it deems appropriate to notify about an error.
IF(RESULT)
MESSAGE(FATAL_ERROR "Test command returned: ${RESULT}")
ENDIF()
if(RESULT)
message(FATAL_ERROR "Test command returned: ${RESULT}")
endif()
24 changes: 12 additions & 12 deletions CMake/CTest/dcmtkCTestRunAndroid.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
#

# Restore the required settings of the CMake configuration step
SET(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CMAKE_CURRENT_BINARY_DIR "@CMAKE_BINARY_DIR@")
SET(CMAKE_FILES_DIRECTORY "@CMAKE_FILES_DIRECTORY@")
SET(DCMTK_CMAKE_INCLUDE "@CMAKE_SOURCE_DIR@/@DCMTK_CMAKE_INCLUDE@")
SET(DCMDICTPATH "@DCMDICTPATH@")
SET(ANDROID_ADB_PROGRAM "@ANDROID_ADB_PROGRAM@")
SET(ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@")
set(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@")
set(CMAKE_CURRENT_BINARY_DIR "@CMAKE_BINARY_DIR@")
set(CMAKE_FILES_DIRECTORY "@CMAKE_FILES_DIRECTORY@")
set(DCMTK_CMAKE_INCLUDE "@CMAKE_SOURCE_DIR@/@DCMTK_CMAKE_INCLUDE@")
set(DCMDICTPATH "@DCMDICTPATH@")
set(ANDROID_ADB_PROGRAM "@ANDROID_ADB_PROGRAM@")
set(ANDROID_TEMPORARY_FILES_LOCATION "@ANDROID_TEMPORARY_FILES_LOCATION@")
# Load required functions for controlling the Android device emulator
INCLUDE(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake)
include(${DCMTK_CMAKE_INCLUDE}CMake/dcmtkUseAndroidSDK.cmake)

# Restore the Android device emulator instance handle
SET(DCMTK_ANDROID_EMULATOR_INSTANCE "$ENV{DCMTK_ANDROID_EMULATOR_INSTANCE}")
set(DCMTK_ANDROID_EMULATOR_INSTANCE "$ENV{DCMTK_ANDROID_EMULATOR_INSTANCE}")

# Run the actual testcase on the remote device
DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE
Expand All @@ -28,6 +28,6 @@ DCMTK_ANDROID_SHELL(DCMTK_ANDROID_EMULATOR_INSTANCE

# We cannot forward the result value to CTest, so print it instead and let CMake
# return with code '1' or whatever it deems appropriate to notify about an error.
IF(RESULT)
MESSAGE(FATAL_ERROR "Test command returned: ${RESULT}")
ENDIF()
if(RESULT)
message(FATAL_ERROR "Test command returned: ${RESULT}")
endif()
4 changes: 2 additions & 2 deletions CMake/CTest/dcmtkCTestRunExhaustive.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# this file is used to execute the unit tests with the -x option injected
#

SET(ENV{DCMTK_CTEST_EXTRA_ARGUMENTS} "-x")
EXECUTE_PROCESS(COMMAND ${CMAKE_CTEST_COMMAND} -C "${CONFIG}")
set(ENV{DCMTK_CTEST_EXTRA_ARGUMENTS} "-x")
execute_process(COMMAND ${CMAKE_CTEST_COMMAND} -C "${CONFIG}")
14 changes: 7 additions & 7 deletions CMake/CTest/dcmtkCTestRunWine.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
# shutdown.
#

SET(ENV{WINEPREFIX} "@DCMTK_WINEPREFIX@")
SET(ENV{DCMDICTPATH} "@DCMDICTPATH@")
SET(WINE_WINE_PROGRAM "@WINE_WINE_PROGRAM@")
set(ENV{WINEPREFIX} "@DCMTK_WINEPREFIX@")
set(ENV{DCMDICTPATH} "@DCMDICTPATH@")
set(WINE_WINE_PROGRAM "@WINE_WINE_PROGRAM@")

EXECUTE_PROCESS(COMMAND
execute_process(COMMAND
"${WINE_WINE_PROGRAM}" "${DCMTK_CTEST_TESTCASE_COMMAND}" $ENV{DCMTK_CTEST_EXTRA_ARGUMENTS} "${DCMTK_CTEST_TEST_NAME}"
RESULT_VARIABLE RESULT
)

# We cannot forward the result value to CMake, so print it instead and let CMake
# return with code '1' or whatever it deems appropriate to notify about an error.
IF(RESULT)
MESSAGE(FATAL_ERROR "Test command returned: ${RESULT}")
ENDIF()
if(RESULT)
message(FATAL_ERROR "Test command returned: ${RESULT}")
endif()
20 changes: 10 additions & 10 deletions CMake/CheckCMakeCommandExists.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Helper macro that checks whether a given CMake command exists or not
MACRO(CHECK_CMAKE_COMMAND_EXISTS commandname)
MESSAGE(STATUS "Looking for CMake command ${commandname}")
macro(CHECK_CMAKE_COMMAND_EXISTS commandname)
message(STATUS "Looking for CMake command ${commandname}")
string(TOUPPER ${commandname} commandname_upper)
IF(COMMAND ${commandname})
SET(HAVE_${commandname_upper} TRUE)
MESSAGE(STATUS "Looking for CMake command ${commandname} - found")
ELSE()
SET(HAVE_${commandname_upper} FALSE)
MESSAGE(STATUS "Looking for CMake command ${commandname} - not found")
ENDIF()
ENDMACRO()
if(COMMAND ${commandname})
set(HAVE_${commandname_upper} TRUE)
message(STATUS "Looking for CMake command ${commandname} - found")
else()
set(HAVE_${commandname_upper} FALSE)
message(STATUS "Looking for CMake command ${commandname} - not found")
endif()
endmacro()
50 changes: 25 additions & 25 deletions CMake/CheckFunctionWithHeaderExists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@
# ... - additional arguments will be interpreted as additional libraries to link during testing.
#

MACRO(CHECK_FUNCTIONWITHHEADER_EXISTS SYMBOL FILES VARIABLE)
IF(NOT DEFINED "${VARIABLE}")
SET(CHECK_SYMBOL_EXISTS_CONTENT "/* */\n")
SET(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_SYMBOL_EXISTS_LIBS
macro(CHECK_FUNCTIONWITHHEADER_EXISTS SYMBOL FILES VARIABLE)
if(NOT DEFINED "${VARIABLE}")
set(CHECK_SYMBOL_EXISTS_CONTENT "/* */\n")
set(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS})
if(CMAKE_REQUIRED_LIBRARIES)
set(CHECK_SYMBOL_EXISTS_LIBS
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES};${ARGN}")
ENDIF(CMAKE_REQUIRED_LIBRARIES)
FOREACH(FILE ${FILES})
SET(CHECK_SYMBOL_EXISTS_CONTENT
endif()
foreach(FILE ${FILES})
set(CHECK_SYMBOL_EXISTS_CONTENT
"${CHECK_SYMBOL_EXISTS_CONTENT}#include <${FILE}>\n")
ENDFOREACH(FILE)
SET(CHECK_SYMBOL_EXISTS_CONTENT
endforeach()
set(CHECK_SYMBOL_EXISTS_CONTENT
"${CHECK_SYMBOL_EXISTS_CONTENT}\nint main()\n{\n${SYMBOL};return 0;\n}\n")

FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.cxx
file(WRITE ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.cxx
"${CHECK_SYMBOL_EXISTS_CONTENT}")

MESSAGE(STATUS "Looking for prototype of ${SYMBOL}")
TRY_COMPILE(${VARIABLE}
message(STATUS "Looking for prototype of ${SYMBOL}")
try_compile(${VARIABLE}
"${CMAKE_BINARY_DIR}"
"${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.cxx"
CMAKE_FLAGS
Expand All @@ -36,22 +36,22 @@ MACRO(CHECK_FUNCTIONWITHHEADER_EXISTS SYMBOL FILES VARIABLE)
"${CHECK_SYMBOL_EXISTS_LIBS}"
${DCMTK_TRY_COMPILE_REQUIRED_CMAKE_FLAGS}
OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for prototype of ${SYMBOL} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}")
FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
if(${VARIABLE})
message(STATUS "Looking for prototype of ${SYMBOL} - found")
set(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}")
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log"
"Determining if the ${SYMBOL} "
"exist passed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.ccc:\n"
"${CHECK_SYMBOL_EXISTS_CONTENT}\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for prototype of ${SYMBOL} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}")
FILE(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
else()
message(STATUS "Looking for prototype of ${SYMBOL} - not found.")
set(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}")
file(APPEND "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
"Determining if the ${SYMBOL} "
"exist failed with the following output:\n"
"${OUTPUT}\nFile ${CMAKE_BINARY_DIR}/CMakeTmp/CheckSymbolExists.cxx:\n"
"${CHECK_SYMBOL_EXISTS_CONTENT}\n")
ENDIF(${VARIABLE})
ENDIF(NOT DEFINED "${VARIABLE}")
ENDMACRO(CHECK_FUNCTIONWITHHEADER_EXISTS)
endif()
endif()
endmacro()
Loading

0 comments on commit ef0dd4f

Please sign in to comment.