Commit cd19de45 authored by Andrey Kamaev's avatar Andrey Kamaev

Fixed problem with incorrect detection of some compiler flags

parent 694f0e95
......@@ -50,10 +50,10 @@ set(OCV_COMPILER_FAIL_REGEX
MACRO(ocv_check_compiler_flag LANG FLAG RESULT)
if("_${LANG}_" MATCHES "_CXX_")
set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx")
FILE(WRITE "${_fname}" "int main() { return 0;}\n")
FILE(WRITE "${_fname}" "#pragma\nint main() { return 0; }\n")
elseif("_${LANG}_" MATCHES "_C_")
set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c")
FILE(WRITE "${_fname}" "int main(void) { return 0;}\n")
FILE(WRITE "${_fname}" "#pragma\nint main(void) { return 0; }\n")
else()
unset(_fname)
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment