termux-packages/packages/cgal/Installation_cmake_modules_CGAL_CheckCXXFileRuns.cmake.patch

51 lines
2.2 KiB
Diff
Raw Normal View History

2019-10-05 14:18:06 +02:00
diff -uNr cgal-releases-CGAL-4.14.1/Installation/cmake/modules/CGAL_CheckCXXFileRuns.cmake cgal-releases-CGAL-4.14.1.mod/Installation/cmake/modules/CGAL_CheckCXXFileRuns.cmake
--- cgal-releases-CGAL-4.14.1/Installation/cmake/modules/CGAL_CheckCXXFileRuns.cmake 2019-09-30 10:18:05.000000000 +0300
+++ cgal-releases-CGAL-4.14.1.mod/Installation/cmake/modules/CGAL_CheckCXXFileRuns.cmake 2019-10-05 15:06:59.818321583 +0300
@@ -24,45 +24,11 @@
else()
SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES)
endif()
-
+
if(CMAKE_REQUIRED_INCLUDES)
SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else()
SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES)
endif()
-
- # Try to compile and run the test
- #MESSAGE(STATUS "Performing Test ${TEST}")
- TRY_RUN(${VAR} ${VAR}_COMPILED
- "${CMAKE_BINARY_DIR}"
- "${FILE}"
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}"
- "${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}"
- OUTPUT_VARIABLE OUTPUT)
-
- # if it did not compile make the return value fail code of 1
- if(NOT ${VAR}_COMPILED)
- SET(${VAR} 1 CACHE INTERNAL "Test ${TEST}" FORCE )
- endif()
- # if the return value was 0 then it worked
- SET(result_var ${${VAR}})
- if("${result_var}" EQUAL 0)
- SET(${VAR} 1 CACHE INTERNAL "Test ${TEST}" FORCE )
- MESSAGE(STATUS "Performing Test ${TEST} - Success")
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Performing C++ SOURCE FILE Test ${TEST} succeded with the following output:\n"
- "${OUTPUT}\n"
- "Source file was:\n${SOURCE}\n")
- else()
- MESSAGE(STATUS "Performing Test ${TEST} - Failed")
- SET(${VAR} "" CACHE INTERNAL "Test ${TEST}" FORCE )
- FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Performing C++ SOURCE FILE Test ${TEST} failed with the following output:\n"
- "${OUTPUT}\n"
- "Return value: ${result_var}\n"
- "Source file was:\n${SOURCE}\n")
- endif()
ENDMACRO(CHECK_CXX_FILE_RUNS)