[CMake] Cmake 2.2.2 with Visual Studio 6. Bug?
Filipe Sousa
filipe at ipb.pt
Thu Nov 24 08:03:43 EST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Neundorf wrote:
> It's a problem of the CMakeLists.txt coming with the kdevelop template
> project. You have to correct the CMakeLists.txt.
> It contains a line like the following:
>
> #add definitions, compiler switches, etc.
> ADD_DEFINITIONS(-Wall -O2)
>
> This has to be made conditionally, e.g. as a simple test:
>
> IF (WIN32)
> ADD_DEFINITIONS( ...whatever you want... )
> ELSE (WIN32) # not windows, but e.g. linux
> ADD_DEFINITIONS(-Wall -O2)
> ENDIF (WIN32)
>
> I'll fix the templates in kdevelop, but this won't get release before KDE
> 3.5.1.
>
> Bye
> Alex
According with documentation, you shouldn't use ADD_DEFINITIONS to add
any other compiler flags besides -D define flags.
ADD_DEFINITIONS
Adds -D define flags to the command line of C and C++ compilers.
ADD_DEFINITIONS(-DFOO -DBAR ...)
Adds flags to command line of C and C++ compilers. This command can
be used to add any flag to a compile line, but the -D flag is accepted
most C/C++ compilers. Other flags may not be as portable.
- --
Filipe Sousa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDhbovbQdNYqwwwCwRAlH5AKC0nlmxvqX4IILyY3ePcHuCAvjRtwCeP88i
d7zHUvBtcha9UKBIhFjYqYQ=
=YH9K
-----END PGP SIGNATURE-----
More information about the CMake
mailing list