From kde-buildsystem Tue Nov 06 23:25:42 2007 From: Alexander Neundorf Date: Tue, 06 Nov 2007 23:25:42 +0000 To: kde-buildsystem Subject: Re: cmake resets variables Message-Id: <200711070025.42870.neundorf () kde ! org> X-MARC-Message: https://marc.info/?l=kde-buildsystem&m=119439155318095 On Tuesday 06 November 2007, Thiago Macieira wrote: > Em Tuesday 06 November 2007 14:23:03 Lubos Lunak escreveu: > > Hello, > > > > since kBacktrace() is not that useful with hidden symbols, I explicitly > > run cmake with -D__KDE_HAVE_GCC_VISIBILITY=0, which turns it off. > > However, any single change to any CMakeLists.txt re-runs automatically > > cmake, which also runs the cmake test for hidden symbols and enables them > > (interestingly, after yet another change it doesn't run it again). I > > always get undefined symbols as a result of this and I'm getting kind of > > tired of running cmake manually all the time. > > > > Does somebody know how to fix this? > > Make the variable cached. and put a flag variable in the cache which signals "test already done". Like: IF(NOT DEFINED GCC_VISIBILITY_TEST_DONE) ... do the test set(GCC_VISIBILITY_TEST_DONE TRUE CACHE BOOL "Test done") ENDIF(NOT DEFINED GCC_VISIBILITY_TEST_DONE) Alex _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem