[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Debian-med-packaging] Cmake help for htqc needed



Hi, 

I've attached a patch that should do the trick. (I'm on a computer
without the ssh-keys for Debian git write access). 

Explanation: 

The htqc authors might have used a version of cmake that interprets the
CMAKE_CXX_FLAGS as a list, and Elements of lists in cmake are separated
by ';'. 

Apparently this is no longer possible so you'll have to (re-)set  the
cxx_flags string directly. 

Best, 
Gert 


On Mon, 2015-06-22 at 15:32 +0200, Andreas Tille wrote:

> 
> I injected packaging stuff for htqc into Git
>   Vcs-Git: git://anonscm.debian.org/debian-med/htqc.git
> 
> When trying to build the package somehow a ';' ins injected
> into the CXX_FLAGS.  The build ends in
> 
> /usr/bin/c++    -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 ;-std=c++11 -I/tmp/buildd/htqc-1.92.1/src -I/tmp/buildd/htqc-1.92.1/obj-x86_64-linux-gnu/src    -o CMakeFiles/ht_common.dir/htqc/MultiSeqFile.cpp.o -c /tmp/buildd/htqc-1.92.1/src/htqc/MultiSeqFile.cpp
> c++: fatal error: no input files
> compilation terminated.
> /bin/sh: 1: -std=c++11: not found
> 
> 
> Unfortunately I have no idea why this ';' is injected and how
> to avoid this.
> 
> Any help would be welcome
> 
>       Andreas.
> 

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 73d0f1a..a76f11a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "")
   set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: None (CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
 endif ()
 
-list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
+SET(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -std=c++11")
 #set(CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fsanitize=address)
 
 set(CPACK_PACKAGE_VERSION_MAJOR 1)

Reply to: