ros / roscpp_core

ros distribution sandbox
88 stars 116 forks source link

fix #88. #89

Closed csukuangfj closed 6 years ago

csukuangfj commented 6 years ago

fix #88 .

dirk-thomas commented 6 years ago

The patch looks good.

Can you please still describe in which case you ran into the problem. So how to reproduce the problem.

csukuangfj commented 6 years ago

@dirk-thomas

A minimum example is as follows:

cmake_minimum_required(VERSION 3.0)
project(test_issue_88)

include(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES("#include<cxxabi.h>\nintmain(intargc,char**argv){}" HAVE_CXXABI_H)
CHECK_CXX_SOURCE_COMPILES("#include<cxxabi.h>\nint main(int argc,char**argv){}" HAVE_CXXABI_H2)

message(STATUS "${HAVE_CXXABI_H}")
message(STATUS "${HAVE_CXXABI_H2}")

Output log

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test HAVE_CXXABI_H
-- Performing Test HAVE_CXXABI_H - Failed
-- Performing Test HAVE_CXXABI_H2
-- Performing Test HAVE_CXXABI_H2 - Success
-- 
-- 1
-- Configuring done
-- Generating done
dirk-thomas commented 6 years ago

I was referring to how you triggered the problem with the current code of the package.

csukuangfj commented 6 years ago

@dirk-thomas I was reading the source code and found that it set HAVE_CXXABI_H incorrectly, so I proposed the pull request.

dirk-thomas commented 6 years ago

Thank you for the patch.