Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Generic-swap/CMake/generic-swap-1.cmake
Normal file
5
Task/Generic-swap/CMake/generic-swap-1.cmake
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
function(swap var1 var2)
|
||||
set(_SWAP_TEMPORARY "${${var1}}")
|
||||
set(${var1} "${${var2}}" PARENT_SCOPE)
|
||||
set(${var2} "${_SWAP_TEMPORARY}" PARENT_SCOPE)
|
||||
endfunction(swap)
|
||||
5
Task/Generic-swap/CMake/generic-swap-2.cmake
Normal file
5
Task/Generic-swap/CMake/generic-swap-2.cmake
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
set(x 42)
|
||||
set(y "string")
|
||||
swap(x y)
|
||||
message(STATUS ${x}) # -- string
|
||||
message(STATUS ${y}) # -- 42
|
||||
5
Task/Generic-swap/CMake/generic-swap-3.cmake
Normal file
5
Task/Generic-swap/CMake/generic-swap-3.cmake
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
set(x 42)
|
||||
set(_SWAP_TEMPORARY "string")
|
||||
swap(x _SWAP_TEMPORARY)
|
||||
message(STATUS ${x}) # -- 42
|
||||
message(STATUS ${_SWAP_TEMPORARY}) # -- 42
|
||||
3
Task/Generic-swap/CMake/generic-swap-4.cmake
Normal file
3
Task/Generic-swap/CMake/generic-swap-4.cmake
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
string(TOUPPER CACHE x)
|
||||
set(y "string")
|
||||
swap(x y) # CMake Error... set given invalid arguments for CACHE mode.
|
||||
Loading…
Add table
Add a link
Reference in a new issue