[CMake] Accessing ${SITE} in CTestConfig.cmake

Kyle Edwards kyle.edwards at kitware.com
Mon Dec 31 10:08:48 EST 2018


On Sat, 2018-12-29 at 09:01 -0500, Donald MacQueen [|] wrote:
> My machine shows up as M6800 under Site in my remote dashboard.
> 
> I want to use my local dashboard, so I did this in 
> CTestConfigCTestConfig.cmake:
> 
> IF (${SITE} STREQUAL "M6800")
>      set(CTEST_DROP_SITE "192.168.49.128") # <-----------------------
> -- 
> local dashboard
> ELSE()
>      set(CTEST_DROP_SITE "192.168.10.150")
> ENDIF()
> 
> I also tried IF (${CTEST_SITE} STREQUAL "M6800") with no luck.
> 
> Any ideas?
> 
> Thanks.
> 
> -- 
> Donald [|]
> A bad day in [] is better than a good day in {}.
> 
> 
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
> 

Donald,

Try this instead:

if(CTEST_SITE STREQUAL "M6800")
# ...

See the documentation for the if() command to understand how to use it:

https://cmake.org/cmake/help/latest/command/if.html

Kyle


More information about the CMake mailing list