Skip to content

Commit da3a850

Browse files
committed
Always create libomp-mod target for robustness
1 parent dae7908 commit da3a850

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

flang/test/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ endif ()
122122

123123
if ("flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES AND NOT FLANG_STANDALONE_BUILD)
124124
# For intrinsic module files (in flang-rt/)
125-
list(APPEND FLANG_TEST_DEPENDS "flang-rt-mod")
126-
125+
list(APPEND FLANG_TEST_DEPENDS "flang-rt-mod")
126+
127127
if ("openmp" IN_LIST LLVM_ENABLE_RUNTIMES)
128128
# For omplib.mod and omplib_kinds.mod (in openmp/)
129-
list(APPEND FLANG_TEST_DEPENDS "libomp-mod")
129+
list(APPEND FLANG_TEST_DEPENDS "libomp-mod")
130130
endif ()
131131
endif ()
132132

openmp/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ endif()
165165

166166
if(LIBOMP_FORTRAN_MODULES)
167167
add_subdirectory(module)
168+
else()
169+
message(STATUS "Building omp_lib.mod disabled by LIBOMP_FORTRAN_MODULES='${LIBOMP_FORTRAN_MODULES}'; libomp-mod does nothing")
170+
add_custom_target(libomp-mod)
168171
endif()
169172

170173
# Use the current compiler target to determine the appropriate runtime to build.

0 commit comments

Comments
 (0)