summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/try_compile/ProjectVars.cmake
blob: f51fa7dccba799ecbe6787a8922c02679001d05a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
cmake_minimum_required(VERSION 3.29)

enable_language(C)

set(CMAKE_LINKER_TYPE DEFAULT)
set(CMAKE_C_USING_LINKER_abc123 /path/to/somewhere)
set(CMAKE_C_USING_LINKER_Hi_There some-tool)
set(CMAKE_ASM_NASM_USING_LINKER_custom /place/holder)
set(CMAKE_ASM-ATT_USING_LINKER_custom /more/text)
set(CMAKE_ASM-ATT_USING_LINKER_MODE TOOL)

try_compile(RESULT
  PROJECT TestProject
  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/proj_vars
  OUTPUT_VARIABLE output
)

message(STATUS "\n${output}")