Files
CMake/Tests/RunCMake/try_compile/CopyFileConfig.cmake
Brad King 80fc564dd7 try_compile: Restore COPY_FILE with CMAKE_TRY_COMPILE_CONFIGURATION
Since commit 0c141b0393 (try_compile: Record output location instead of
reverse computing it, 2022-08-31, v3.25.0-rc1~154^2) we always look for
the "Debug" configuration's output binary from the test project.
Restore looking for the `CMAKE_TRY_COMPILE_CONFIGURATION`.

Fixes: #24180
2022-11-22 11:26:28 -05:00

9 lines
264 B
CMake

enable_language(C)
set(CMAKE_TRY_COMPILE_CONFIGURATION Release)
include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS})
try_compile(RESULT
${try_compile_bindir_or_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/src.c
COPY_FILE "${CMAKE_CURRENT_BINARY_DIR}/out.bin"
)