[prev in list] [next in list] [prev in thread] [next in thread]
List: cmake
Subject: Re: [CMake] Question about functions
From: Andreas Naumann <Andreas-Naumann () gmx ! net>
Date: 2019-02-18 20:16:05
Message-ID: eb9b046a-b632-9f7a-4e07-83580f23a1c5 () gmx ! net
[Download RAW message or body]
Am 18.02.19 um 20:43 schrieb Workbench@gmx.at:
> Hi everyone,
>
> i have a function like:
>
> FUNCTION(checksyste_64Bit arg1)
>
> IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
>
> SET(${arg1} TRUE PARENT_SCOPE)
>
> ENDFUNCTION()
>
>
> but when i call it with an INTERNAL variable i've set before with
>
> SET(SYSTEM_64BIT FALSE CACHE INTERNAL)
>
> checksystem_64bit(${SYSTEM_64BIT})
>
> the ${SYSTE_64BIT} variable stays the same, i thought when i use
> PARENT_SCOPE on a variable i can change it's value from inside the
> function ?
>
>
> best regards!
>
You should call your function without dollar and braces around the
variable, i.e.
checksystem_64bit(SYSTEM_64BIT)
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic