koffice/libs/pigment

Jarosław Staniek js at iidea.pl
Wed Mar 26 14:26:06 CET 2008


Patrick Spendrin said the following, On 2008-03-26 14:06:

> Cyrille Berger schrieb:
>> You know what would make you happy and me at the same time ? If you look why 
>> the add_definition in cmakelists.txt and fix that instead, it's probably less 
>> time than changing the source and headers after  my commits.
> No.
> First such definitions shouldn't be in the build system scripts - the 
> source code doesn't contain everything that is needed to build (even if 
> it is only for platforms where you detest the platform itself and the 
> people working on it) - you wouldn't put other source code into the 
> cmakelists.txt files would you? So one other solution would be to define 
>   and, or and not in some kind of header which is included where needed 
> (one could use the *_export.h even if that is not really a clean solution).

What's wrong with the fix for Klingon grammar? Do we need more fixes?

if(MSVC)
   add_definitions(-Dand=&& -Dor=|| -Dnot=!)
   # avoid "cannot open file 'LIBC.lib'" error
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} 
/NODEFAULTLIB:LIBC.LIB")
else(MSVC)
   add_definitions("-Dand=\\&\\& -Dor=\\|\\| -Dnot=\\!")
endif(MSVC)

That said, of course this is only for Cyrille's code (and nowhere else in 
KDE), who for unknown reasons adds a risk for conflicts with and/or/not/xor 
macros we may have in the future (think of parser constants as one example). 
But it's his code and he is the maintenaner.

-- 
regards / pozdrawiam, Jaroslaw Staniek
  Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
  Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi)
  KDE Libraries for MS Windows (http://windows.kde.org)


More information about the Kde-windows mailing list