Skip to content

Commit c131323

Browse files
authored
Avoid compatitiblity issues with CMake 3.25+
1 parent 12db091 commit c131323

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openmp/runtime/cmake/LibompGetArchitecture.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function(libomp_get_architecture return_arch)
7171
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libomp_detect_arch.c" ${detect_arch_src_txt})
7272

7373
# Try to compile using the C Compiler. It will always error out with an #error directive, so store error output to ${local_architecture}
74-
try_compile(compile_dummy "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/libomp_detect_arch.c" OUTPUT_VARIABLE local_architecture)
74+
try_compile(compile_dummy "${CMAKE_CURRENT_BINARY_DIR}" SOURCES "${CMAKE_CURRENT_BINARY_DIR}/libomp_detect_arch.c" OUTPUT_VARIABLE local_architecture)
7575

7676
# Match the important architecture line and store only that matching string in ${local_architecture}
7777
string(REGEX MATCH "ARCHITECTURE=([a-zA-Z0-9_]+)" local_architecture "${local_architecture}")

0 commit comments

Comments
 (0)