Lines Matching +full:openmp +full:- +full:build

2 #//===----------------------------------------------------------------------===//
6 #// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 #//===----------------------------------------------------------------------===//
20 # Configure omp.h, kmp_config.h and omp-tools.h if necessary
25 configure_file(${LIBOMP_INC_DIR}/omp-tools.h.var ${LIBOMP_HEADERS_INTDIR}/omp-tools.h @ONLY)
32 set(LIBOMP_MESSAGE_CONVERTER_EXTRA_ARGS ${LIBOMP_MESSAGE_CONVERTER_EXTRA_ARGS} --target-system-override=${CMAKE_SYSTEM_NAME})
37 COMMAND ${Python3_EXECUTABLE} ${LIBOMP_TOOLS_DIR}/message-converter.py
38 --enum=kmp_i18n_id.inc ${LIBOMP_MESSAGE_CONVERTER_EXTRA_ARGS} ${LIBOMP_SRC_DIR}/i18n/en_US.txt
39 DEPENDS ${LIBOMP_SRC_DIR}/i18n/en_US.txt ${LIBOMP_TOOLS_DIR}/message-converter.py
43 COMMAND ${Python3_EXECUTABLE} ${LIBOMP_TOOLS_DIR}/message-converter.py
44 --default=kmp_i18n_default.inc ${LIBOMP_MESSAGE_CONVERTER_EXTRA_ARGS} ${LIBOMP_SRC_DIR}/i18n/en_US.txt
45 DEPENDS ${LIBOMP_SRC_DIR}/i18n/en_US.txt ${LIBOMP_TOOLS_DIR}/message-converter.py
48 # Set the -D definitions for all sources
53 remove_definitions(-DUNICODE -D_UNICODE)
57 # Set the -I includes for all sources
74 # Getting correct source files to build library
110 libomp_append(LIBOMP_CXXFILES z_Windows_NT-586_util.cpp)
112 libomp_append(LIBOMP_ASMFILES z_Windows_NT-586_asm.asm) # Windows assembly file
118 # ifdeffed sections in z_Windows_NT-586_util.cpp.
141 libomp_append(LIBOMP_CXXFILES ompt-general.cpp IF_TRUE LIBOMP_OMPT_SUPPORT)
142 libomp_append(LIBOMP_CXXFILES ompd-specific.cpp IF_TRUE LIBOMP_OMPD_SUPPORT)
145 # For Windows, there is a resource file (.rc -> .res) that is also compiled
155 # Remove any cmake-automatic linking of the standard C++ library.
168 # Disable libstdc++ assertions, even in an LLVM_ENABLE_ASSERTIONS build, to
171 add_definitions(-U_GLIBCXX_ASSERTIONS)
174 # Add the OpenMP library
178 # Build libomp library. Add LLVMSupport dependency if building in-tree with libomptarget profiling enabled.
181 set_property(TARGET omp PROPERTY FOLDER "OpenMP/Libraries")
238 # Get the library's location within the build tree for the unit tester
256 COMMAND ${CMAKE_COMMAND} -E create_symlink ${LIBOMP_LIB_FILE}
258 COMMAND ${CMAKE_COMMAND} -E create_symlink ${LIBOMP_LIB_FILE}
269 COMMAND ${CMAKE_COMMAND} -E create_symlink ${LIBOMP_LIB_FILE} ${VERSIONED_LIBGOMP_NAME}
275 # Definitions for testing, for reuse when testing libomptarget-nvptx.
283 add_custom_target(libomp-needed-headers DEPENDS kmp_i18n_id.inc kmp_i18n_default.inc)
284 set_target_properties(libomp-needed-headers PROPERTIES FOLDER "OpenMP/Sourcegenning")
285 add_dependencies(omp libomp-needed-headers)
287 # Windows specific build rules
290 # z_Windows_NT-586_asm.asm requires definitions to be sent via command line
292 libomp_append(LIBOMP_MASM_DEFINITIONS "-D_M_IA32" IF_TRUE IA32)
293 libomp_append(LIBOMP_MASM_DEFINITIONS "-D_M_AMD64" IF_TRUE INTEL64)
294 libomp_append(LIBOMP_MASM_DEFINITIONS "-DOMPT_SUPPORT" IF_TRUE_1_0 LIBOMP_OMPT_SUPPORT)
295 libomp_append(LIBOMP_MASM_DEFINITIONS "-DOMPD_SUPPORT" IF_TRUE_1_0 LIBOMP_OMPD_SUPPORT)
297 set_property(SOURCE z_Windows_NT-586_asm.asm APPEND_STRING PROPERTY COMPILE_FLAGS " ${LIBOMP_MASM_DEFINITIONS}")
325 add_custom_target(libomp-needed-def-file DEPENDS ${LIBOMP_GENERATED_DEF_FILE})
326 set_target_properties(libomp-needed-def-file PROPERTIES FOLDER "OpenMP/Sourcegenning")
327 add_dependencies(omp libomp-needed-def-file)
335 COMMAND ${Python3_EXECUTABLE} ${LIBOMP_TOOLS_DIR}/generate-def.py ${LIBOMP_GDFLAGS} --name ${LIBOMP_LIB_FILE}
336 -o ${LIBOMP_GENERATED_DEF_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/dllexports
337 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dllexports ${LIBOMP_TOOLS_DIR}/generate-def.py
341 # For toolchains that generated the import library importing by ordinal, re-generate it to import by name
345 add_custom_target(libompimp-needed-def-file DEPENDS ${LIBOMPIMP_GENERATED_DEF_FILE})
346 set_target_properties(libompimp-needed-def-file PROPERTIES FOLDER "OpenMP/Resources")
349 COMMAND ${Python3_EXECUTABLE} ${LIBOMP_TOOLS_DIR}/generate-def.py ${LIBOMP_GDFLAGS}
350 --name ${LIBOMP_LIB_FILE} --no-ordinals
351 -o ${LIBOMPIMP_GENERATED_DEF_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/dllexports
352 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dllexports ${LIBOMP_TOOLS_DIR}/generate-def.py
357 set_target_properties(${LIBOMP_IMP_LIB_TARGET} PROPERTIES FOLDER "OpenMP/Libraries")
361 add_dependencies(${LIBOMP_IMP_LIB_TARGET} libompimp-needed-def-file)
375 message(STATUS "configuring openmp to build Fortran module files using ${LIBOMP_FORTRAN_MODULES_COMPILER}")
377 add_custom_target(libomp-mod ALL DEPENDS omp_lib.mod omp_lib_kinds.mod)
380 COMMAND ${LIBOMP_FORTRAN_MODULES_COMPILER} -cpp -fsyntax-only ${LIBOMP_FORTRAN_SOURCE_FILE}
387 # Workaround for gfortran to build modules with the
390 set(ADDITIONAL_Fortran_FLAGS "-fno-range-check")
392 add_custom_target(libomp-mod ALL DEPENDS omp_lib.mod omp_lib_kinds.mod)
393 set_target_properties(libomp-mod PROPERTIES FOLDER "OpenMP/Misc")
398 message(FATAL_ERROR "Fortran module build requires Fortran 90 compiler")
402 COMMAND ${CMAKE_Fortran_COMPILER} -c ${ADDITIONAL_Fortran_FLAGS}
418 add_custom_target(libomp-micro-tests)
419 set_target_properties(libomp-micro-tests PROPERTIES FOLDER "OpenMP/Tests")
421 add_dependencies(libomp-micro-tests libomp-test-touch)
424 add_dependencies(libomp-micro-tests libomp-test-relo)
427 add_dependencies(libomp-micro-tests libomp-test-execstack)
429 add_dependencies(libomp-micro-tests libomp-test-deps)
431 # `omp` needs to be exported if in-tree build.
447 install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E copy \"${LIBOMP_LIB_FILE}\"
450 install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E copy \"${LIBOMP_IMP_LIB_FILE}\"
462 install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\"
467 install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\"
480 install(FILES ${LIBOMP_HEADERS_INTDIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH})
482 install(FILES ${LIBOMP_HEADERS_INTDIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} RENAME ompt.h)