Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of a directory name for header file inclusion #8

Open
elfring opened this issue Oct 10, 2014 · 3 comments
Open

Addition of a directory name for header file inclusion #8

elfring opened this issue Oct 10, 2014 · 3 comments

Comments

@elfring
Copy link

elfring commented Oct 10, 2014

Some header files reuse words like "index", "messages" and "thread" in the file names which might be popular also in other software development areas.

I suggest to add your project name as a directory in affected path specifications for the preprocessor directive "#include".
How do you think about the reduce the probability for file name clashes here?

@deercoder
Copy link

I find that something is wrong in the compile of this project, which is as follows:

CMake Warning (dev) at /usr/local/share/OpenCV/OpenCVConfig.cmake:52 (if):
given arguments:

"TRUE"

An argument named "TRUE" appears in a conditional statement. Policy
CMP0012 is not set: if() recognizes numbers and boolean constants. Run
"cmake --help-policy CMP0012" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
CMakeLists.txt:37 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Could NOT find libjsoncpp-dev (missing: LIBJSONCPP_INCLUDE_DIR)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/changliu/github/pastec/build

I cross-searched in stackoverflow and find the reason here:
http://stackoverflow.com/questions/18005880/how-to-writing-a-cmake-module-for-jsoncpp

so there need some changes in Findjsoncpp.cmake, I think maybe different machine configurations should be different...

diff --git a/cmake/Modules/Findjsoncpp.cmake b/cmake/Modules/Findjsoncpp.cmake
index 4857396..8fc8bb0 100644
--- a/cmake/Modules/Findjsoncpp.cmake
+++ b/cmake/Modules/Findjsoncpp.cmake
@@ -9,9 +9,9 @@ find_package(PkgConfig)
pkg_check_modules(PC_LIBJSONCPP QUIET libjsoncpp)
set(LIBJSONCPP_DEFINITIONS ${PC_LIBJSONCPP_CFLAGS_OTHER})

-find_path(LIBJSONCPP_INCLUDE_DIR json.h
+find_path(LIBJSONCPP_INCLUDE_DIR json/features.h
HINTS ${PC_LIBJSONCPP_INCLUDEDIR} ${PC_LIBJSONCPP_INCLUDE_DIRS}

  •      PATH_SUFFIXES libjsoncpp)
    
  •      PATH_SUFFIXES jsoncpp)
    

    find_library(LIBJSONCPP_LIBRARY jsoncpp
    HINTS ${PC_LIBJSONCPP_LIBDIR} ${PC_LIBJSONCPP_LIBRARY_DIRS} )

@elfring
Copy link
Author

elfring commented Nov 5, 2014

@deercoder: Thanks for the description of your software build experiences.

But I wonder why you appended this story to my issue here. How do you think about to move it to a new bug report?

@deercoder
Copy link

@elfring Sorry, I didn't find somewhere to put, I think I would better move it to some be right place, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants