|
10 | 10 |
|
11 | 11 | include(ExtendPath) |
12 | 12 |
|
13 | | -# The generated headers will be placed in clang's resource directory if present. |
14 | | -if(${OPENMP_STANDALONE_BUILD}) |
15 | | - set(LIBOMP_HEADERS_INTDIR ${CMAKE_CURRENT_BINARY_DIR}) |
16 | | -else() |
17 | | - set(LIBOMP_HEADERS_INTDIR ${LLVM_BINARY_DIR}/${LIBOMP_HEADERS_INSTALL_PATH}) |
18 | | -endif() |
19 | | - |
20 | 13 | # Configure omp.h, kmp_config.h and omp-tools.h if necessary |
21 | | -configure_file(${LIBOMP_INC_DIR}/omp.h.var ${LIBOMP_HEADERS_INTDIR}/omp.h @ONLY) |
22 | | -configure_file(${LIBOMP_INC_DIR}/ompx.h.var ${LIBOMP_HEADERS_INTDIR}/ompx.h @ONLY) |
23 | | -configure_file(kmp_config.h.cmake ${LIBOMP_HEADERS_INTDIR}/kmp_config.h @ONLY) |
| 14 | +configure_file(${LIBOMP_INC_DIR}/omp.h.var omp.h @ONLY) |
| 15 | +configure_file(${LIBOMP_INC_DIR}/ompx.h.var ompx.h @ONLY) |
| 16 | +configure_file(kmp_config.h.cmake kmp_config.h @ONLY) |
24 | 17 | if(${LIBOMP_OMPT_SUPPORT}) |
25 | | - configure_file(${LIBOMP_INC_DIR}/omp-tools.h.var ${LIBOMP_HEADERS_INTDIR}/omp-tools.h @ONLY) |
| 18 | + configure_file(${LIBOMP_INC_DIR}/omp-tools.h.var omp-tools.h @ONLY) |
26 | 19 | endif() |
27 | 20 |
|
28 | 21 | # Generate message catalog files: kmp_i18n_id.inc and kmp_i18n_default.inc |
@@ -426,15 +419,15 @@ else() |
426 | 419 | endif() |
427 | 420 | install( |
428 | 421 | FILES |
429 | | - ${LIBOMP_HEADERS_INTDIR}/omp.h |
430 | | - ${LIBOMP_HEADERS_INTDIR}/ompx.h |
| 422 | + ${CMAKE_CURRENT_BINARY_DIR}/omp.h |
| 423 | + ${CMAKE_CURRENT_BINARY_DIR}/ompx.h |
431 | 424 | DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} |
432 | 425 | ) |
433 | 426 | if(${LIBOMP_OMPT_SUPPORT}) |
434 | | - install(FILES ${LIBOMP_HEADERS_INTDIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH}) |
| 427 | + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH}) |
435 | 428 | # install under legacy name ompt.h |
436 | | - install(FILES ${LIBOMP_HEADERS_INTDIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} RENAME ompt.h) |
437 | | - set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${LIBOMP_HEADERS_INTDIR} PARENT_SCOPE) |
| 429 | + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} RENAME ompt.h) |
| 430 | + set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE) |
438 | 431 | endif() |
439 | 432 | if(${BUILD_FORTRAN_MODULES}) |
440 | 433 | set (destination ${LIBOMP_HEADERS_INSTALL_PATH}) |
|
0 commit comments