librelist archives

« back to archive

PATCH: Honour CFLAGS passed into cmake

PATCH: Honour CFLAGS passed into cmake

From:
Daniel P. Berrange
Date:
2010-03-25 @ 15:27
If running cmake with something like

  CFLAGS=" -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector" cmake

then yajl was ignoring the passed in CFLAG. This patch makes it honour
them

This was against the 1.0.7 release

Regards,
Daniel

diff -rup lloyd-yajl-45a1bdb.orig/CMakeLists.txt 
lloyd-yajl-45a1bdb.new/CMakeLists.txt
--- lloyd-yajl-45a1bdb.orig/CMakeLists.txt	2009-10-29 23:35:39.000000000 +0000
+++ lloyd-yajl-45a1bdb.new/CMakeLists.txt	2010-01-11 17:14:01.000000000 +0000
@@ -42,7 +42,7 @@ IF (NOT CMAKE_BUILD_TYPE)
   SET(CMAKE_BUILD_TYPE "Release")
 ENDIF (NOT CMAKE_BUILD_TYPE)
 
-SET(CMAKE_C_FLAGS "-Wall")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
 IF (WIN32) 
   ADD_DEFINITIONS(-DWIN32)
   SET(linkFlags "/PDB:NONE /INCREMENTAL:NO /OPT:NOREF /OPT:NOICF")


-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Re: [yajl] PATCH: Honour CFLAGS passed into cmake

From:
Lloyd Hilaiel
Date:
2010-03-25 @ 16:37
Thanks Daniel!

http://github.com/lloyd/yajl/commit/00c04939ebf4a0ba51ab4a51666ddb2700fc733b

best,
lloyd

On Thu, Mar 25, 2010 at 03:27:35PM +0000, Daniel P. Berrange wrote:
> If running cmake with something like
> 
>   CFLAGS=" -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector" cmake
> 
> then yajl was ignoring the passed in CFLAG. This patch makes it honour
> them
> 
> This was against the 1.0.7 release
> 
> Regards,
> Daniel
> 
> diff -rup lloyd-yajl-45a1bdb.orig/CMakeLists.txt 
lloyd-yajl-45a1bdb.new/CMakeLists.txt
> --- lloyd-yajl-45a1bdb.orig/CMakeLists.txt	2009-10-29 23:35:39.000000000 +0000
> +++ lloyd-yajl-45a1bdb.new/CMakeLists.txt	2010-01-11 17:14:01.000000000 +0000
> @@ -42,7 +42,7 @@ IF (NOT CMAKE_BUILD_TYPE)
>    SET(CMAKE_BUILD_TYPE "Release")
>  ENDIF (NOT CMAKE_BUILD_TYPE)
>  
> -SET(CMAKE_C_FLAGS "-Wall")
> +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
>  IF (WIN32) 
>    ADD_DEFINITIONS(-DWIN32)
>    SET(linkFlags "/PDB:NONE /INCREMENTAL:NO /OPT:NOREF /OPT:NOICF")
> 
> 
> -- 
> |: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
> |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
> |: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
> |: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|