this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fallback To "stdbool.h" Header If Build For Non-x86 Platform

It turns out that "omp-tools.h" is not a good option.

Thomas A 66136c58 4efe474a

+10 -4
+10 -4
cmake/compiler_include.cmake
··· 1 1 # Detect the location of compiler-specific header files 2 2 # such as stdbool.h or xmmintrin.h 3 3 function(GetCompilerInclude OutputVar) 4 - file(WRITE "${CMAKE_BINARY_DIR}/cinctest.c" "#include <omp-tools.h>") 4 + if (TARGET_x86_64 OR TARGET_i386) 5 + set(COMPILER_INCLUDE_HEADER_NAME "cupid") 6 + else() 7 + set(COMPILER_INCLUDE_HEADER_NAME "stdbool") 8 + endif () 9 + 10 + file(WRITE "${CMAKE_BINARY_DIR}/cinctest.c" "#include <${COMPILER_INCLUDE_HEADER_NAME}.h>") 5 11 execute_process(COMMAND "${CMAKE_C_COMPILER}" -M "${CMAKE_BINARY_DIR}/cinctest.c" 6 12 RESULT_VARIABLE BuildResult 7 13 OUTPUT_VARIABLE BuildOutput ··· 17 23 string(REGEX REPLACE "\n$" "" str "${str}") 18 24 # message(STATUS "Output: ${str}") 19 25 20 - if (str MATCHES "omp-tools.h$") 26 + if (str MATCHES "${COMPILER_INCLUDE_HEADER_NAME}.h$") 21 27 # message(STATUS "Str matched: ${str}") 22 - string(REGEX REPLACE "omp-tools\\.h" "" IncPath "${str}") 23 - endif (str MATCHES "omp-tools.h$") 28 + string(REGEX REPLACE "${COMPILER_INCLUDE_HEADER_NAME}\\.h" "" IncPath "${str}") 29 + endif (str MATCHES "${COMPILER_INCLUDE_HEADER_NAME}.h$") 24 30 endforeach (str) 25 31 26 32 if (NOT IncPath)