Re: [CMake] Using try_compile before project() command

2008-07-16 Thread Yuri Timenkov
On Wednesday 16 July 2008 16:20:30 Bill Hoffman wrote: > Carminati Federico wrote: > > Hello, > >my use case is similar. My package depends on another one that can be > > installed with different compiler choices. So the first action I take is > > always to check the compiler used to install th

Re: [CMake] Using try_compile before project() command

2008-07-16 Thread Bill Hoffman
Carminati Federico wrote: Hello, my use case is similar. My package depends on another one that can be installed with different compiler choices. So the first action I take is always to check the compiler used to install the other package and then to use the same. I could obviously do exp

Re: [CMake] Using try_compile before project() command

2008-07-16 Thread Carminati Federico
Hello, my use case is similar. My package depends on another one that can be installed with different compiler choices. So the first action I take is always to check the compiler used to install the other package and then to use the same. I could obviously do export CXX=`root-config --c

Re: [CMake] Using try_compile before project() command

2008-07-15 Thread Yuri Timenkov
On Tuesday 15 July 2008 20:28:27 Yuri Timenkov wrote: > On Tuesday 15 July 2008 20:01:52 Bill Hoffman wrote: > > Carminati Federico wrote: > > > Hello Yuri, > > > I posted a similar question some time ago. There seems to be no way > > > to chose the compiler within the CMakeList.txt, because yo

Re: [CMake] Using try_compile before project() command

2008-07-15 Thread Yuri Timenkov
On Tuesday 15 July 2008 20:01:52 Bill Hoffman wrote: > Carminati Federico wrote: > > Hello Yuri, > > I posted a similar question some time ago. There seems to be no way to > > chose the compiler within the CMakeList.txt, because you can do very > > little before the Project command, and afterwar

Re: [CMake] Using try_compile before project() command

2008-07-15 Thread Bill Hoffman
Carminati Federico wrote: Any hope to have this changed in a future release? Best regards, No, it really is out of the work flow of CMake. First you find the working compiler and test it. The CMakeLists.txt files should never force a compiler choice. They should be compiler agnostic as mu

Re: [CMake] Using try_compile before project() command

2008-07-15 Thread Bill Hoffman
Carminati Federico wrote: Hello Yuri, I posted a similar question some time ago. There seems to be no way to chose the compiler within the CMakeList.txt, because you can do very little before the Project command, and afterwards it is too late. Anybody can help here? best, regards, That i

Re: [CMake] Using try_compile before project() command

2008-07-15 Thread Carminati Federico
Hello Yuri, I posted a similar question some time ago. There seems to be no way to chose the compiler within the CMakeList.txt, because you can do very little before the Project command, and afterwards it is too late. Anybody can help here? best, regards, Federico Carminati CERN-PH 1211

[CMake] Using try_compile before project() command

2008-07-15 Thread Yuri Timenkov
I want to tune initial compile and linker flags to put into cache. in main CMakeLists.txt: # Override default Compiler flags set(CMAKE_USER_MAKE_RULES_OVERRIDE MyCompilerFlags) project(MyProject) in MyCompilerFlags.cmake: check_cxx_linker_flag("-Wl,--warn-unresolved-symbols" HAVE_LD_WARN_UNRESO