Alexander Neundorf wrote:
Von: Brad King <[EMAIL PROTECTED]>
Of course, that is a simple solution. Each of those files should set a
variable to indicate it has been loaded. I'll make this change. The
:-)
How about platform-id's everywhere ? E.g. NETBSD, OPENBSD, IRIX etc. ?
Yes
Hi,
> Von: Brad King <[EMAIL PROTECTED]>
>
> Alexander Neundorf wrote:
...
> > Why did you actually enclose the CMAKE_C_COMPILER in "..." ?
>
> I was using the "string MATCHES string" form of the IF statement
> because we are trying to move away from the confusing "var MATCHES
>
Hi,
> Von: David Cole <[EMAIL PROTECTED]>
>
> Wouldn't it be preferable to remain compile independent as much as
> possible and avoid CMake blocks that are compiler specific?
>
> Perhaps a TRY_COMPILE would be more appropriate than the "compiler
> matches regex" test...
>
> You didn
Alexander Neundorf wrote:
We've used
IF("${CMAKE_C_COMPILER}" MATCHES "^cl$")
and this should work for you for now, but...
Sure ? This one seems to be set to:
D:/Programme/Microsoft Visual Studio 8/VC/bin/cl.exe
So I'd go with
IF(CMAKE_C_COMPILER MATCHES "cl\\.exe")
Actually I thin
I meant "compile*r* independent..." of course...
David Cole wrote:
Wouldn't it be preferable to remain compile independent as much as
possible and avoid CMake blocks that are compiler specific?
Perhaps a TRY_COMPILE would be more appropriate than the "compiler
matches regex" test...
You di
Wouldn't it be preferable to remain compile independent as much as
possible and avoid CMake blocks that are compiler specific?
Perhaps a TRY_COMPILE would be more appropriate than the "compiler
matches regex" test...
You didn't actually say when starting this thread why you wanted to
detect
Hi,
> Von: Brad King <[EMAIL PROTECTED]>
>
> Alexander Neundorf wrote:
> > There is a variable CMAKE_COMPILER_IS_GNUCC, which is set for gcc.
> > AFAIK there is no CMAKE_COMPILER_IS_MSVC.
> > There are CMAKE_C_COMPILER and CMAKE_GENERATOR_CC, which are probably
> > set to "cl" both for
Alexander Neundorf wrote:
There is a variable CMAKE_COMPILER_IS_GNUCC, which is set for gcc. AFAIK
there is no CMAKE_COMPILER_IS_MSVC.
There are CMAKE_C_COMPILER and CMAKE_GENERATOR_CC, which are probably set
to "cl" both for MSVC and nmake Makefiles ?
So which test is recommended ?
We'v
Alexander Neundorf wrote:
what's the recommended way to test in a CMakeLists.txt, whether the
current compiler is msvc/cl ?
You can test for msvc "projects/solution" (in contrast to Win32 nmake
makefiles) by:
IF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
Jan.
--
Dipl.-Ing. Jan Woet
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Alexander Neundorf wrote:
> Hi,
>
> what's the recommended way to test in a CMakeLists.txt, whether the
> current compiler is msvc/cl ?
>
> I found:
> UNIX
> APPLE
> WIN32
> CYGWIN
> MINGW
> BORLAND
>
> I can't test, but I guess e.g. WI
Hi,
what's the recommended way to test in a CMakeLists.txt, whether the
current compiler is msvc/cl ?
I found:
UNIX
APPLE
WIN32
CYGWIN
MINGW
BORLAND
I can't test, but I guess e.g. WIN32 is true for CYGWIN, MINGW, BORLAND
and msvc/cl.
There is a variable CMAKE_COMPILER_IS_GNUCC,
11 matches
Mail list logo