Re: [CMake] How to use CMAKE_POLICY?

2012-12-15 Thread David Cole
On Sat, Dec 15, 2012 at 10:33 AM, Marcel Loose wrote: > Thanks, that seems to work. > > Is the idiom > > if(POLICY CMP) > cmake_policy(PUSH) > cmake_policy(SET CMP OLD) > cmake_policy(POP) > endif() > > one that you also need to use with newer CMakes? Or does it then suffice > to do > > cma

Re: [CMake] How to use CMAKE_POLICY?

2012-12-15 Thread Marcel Loose
Thanks, that seems to work. Is the idiom if(POLICY CMP) cmake_policy(PUSH) cmake_policy(SET CMP OLD) cmake_policy(POP) endif() one that you also need to use with newer CMakes? Or does it then suffice to do cmake_policy(SET CMP OLD) Best regards, Marcel Loose. Op

Re: [CMake] string replace first occurrence of a period using regex

2012-12-15 Thread Rolf Eike Beer
Mikael Sundell wrote: > First, thanks for cmake! > In cmake, how can I easily replace the first period "." in a string with a > substitute using regex and string replace? > For example: > z > z.1 > z.1.2.5 > With replacement ".so", "." becomes ".so" as in: > z.so > z.so.1 > z.so.1.2.5 >

Re: [CMake] Adding Platform files

2012-12-15 Thread Tim Gallagher
Yup, you nailed it. The module path was being set after the call to project() and not before. Is there a naming convention for system names? I don't mind sending this upstream if there is interest. It's for Cray systems that use shared libraries (unlike Catamount which disables shared librarie

Re: [CMake] Adding Platform files

2012-12-15 Thread Eric Noulard
2012/12/14 Tim Gallagher : > Hi, > > I have a folder inside my code repository we use to store custom modules and > that folder was added to the search path. Inside that folder I added one > called Platform/ and put a custom platform file in there. But CMake says it > can't find the platform fil