vcpkg/scripts/test_ports/try-compile/CMakeLists.txt
Alexander Neumann 9c0956e573
[world rebuild|toolchain] Fix try compile handling (#24493)
while playing with qtbase on x64-uwp i found that it could not pass a
try_compile command since important variables are not correctly
forwarded. As such I concluded that the handling of try_compile in vcpkg
is completely wrong.
2024-06-19 14:38:36 -07:00

9 lines
287 B
CMake

cmake_minimum_required(VERSION 3.25)
project(try-compile-test LANGUAGES C CXX)
try_compile(result PROJECT test-try-compile SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/try")
if(NOT result)
message(FATAL_ERROR "Compiler flags are not passed consistently to try_compile!")
endif()