3 #-----------------------------------------------------------------------------
4 # Test if os defines a lenght for sockaddr
5 # only doing the test when we have sys/socket
6 IF("HAVE_C_INLINE" MATCHES "^HAVE_C_INLINE$")
8 FILE(WRITE ${GDCMJPEGLS_BINARY_DIR}/gdcmTestInline.c
9 "inline int foo() { return 0; }\n
10 int main() { return foo(); }")
11 MESSAGE(STATUS "Checking if C compiler has inline keyword")
12 TRY_COMPILE(HAVE_C_INLINE
13 ${GDCMJPEGLS_BINARY_DIR}
14 ${GDCMJPEGLS_BINARY_DIR}/gdcmTestInline.c
15 OUTPUT_VARIABLE OUTPUT)
17 MESSAGE(STATUS "Checking if C compiler has inline keyword -- yes")
18 SET(HAVE_C_INLINE 1 CACHE INTERNAL "Support if C compiler has inline keyword")
19 WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeOutput.log
20 "Determining if C compiler has inline keyword"
21 "passed with the following output:\n"
24 MESSAGE(STATUS "Checking if C compiler has inline keyword -- no")
25 SET(HAVE_C_INLINE 0 CACHE INTERNAL "Support if C compiler has inline keyword")
26 WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
27 "Determining if C compiler has inline keyword"
28 "failed with the following output:\n"
31 ENDIF("HAVE_C_INLINE" MATCHES "^HAVE_C_INLINE$")
33 INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
34 CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H)
36 "${GDCMJPEGLS_SOURCE_DIR}/jpegls_config.h.in"
37 "${GDCMJPEGLS_BINARY_DIR}/jpegls_config.h"