Skip to content

target_include_directories cmake error #105

Closed
@godbyk

Description

@godbyk

Building jsoncpp under Jenkins results in the following output from cmake:

+ CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DJSONCPP_WITH_CMAKE_PACKAGE=ON -DJSONCPP_LIB_BUILD_SHARED=OFF -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_INSTALL_PREFIX=/var/lib/jenkins/jobs/jsoncpp-linux/workspace/install
-- The C compiler identification is Clang 3.5.0
-- The CXX compiler identification is Clang 3.5.0
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- 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/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- JsonCpp Version: 1.0.0
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.3", minimum required is "2.6") 
-- Configuring done
CMake Error in src/lib_json/CMakeLists.txt:
  Target "jsoncpp_lib" INTERFACE_INCLUDE_DIRECTORIES property contains path:

    "/var/lib/jenkins/jobs/jsoncpp-linux/workspace/src/lib_json/../../include"

  which is prefixed in the source directory.

This is with cmake version 3.1.0. There may be a potentially helpful explanation at http://stackoverflow.com/a/25681179/4214.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions