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

cmake errors during the build #871

Open
Synoecium opened this issue Feb 26, 2019 · 2 comments
Open

cmake errors during the build #871

Synoecium opened this issue Feb 26, 2019 · 2 comments

Comments

@Synoecium
Copy link

I did everything step-by-step from install guide and got these errors. I used commands git submodule init and git submodule update, so it isn't a problem source.
sa@sa-VirtualBox:~/cpp-netlib/build$ cmake -DCMAKE_BUILD_TYPE=Release ..
-- 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/gcc
-- Check for working C compiler: /usr/bin/gcc -- 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/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- thread
-- chrono
-- date_time
-- atomic
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2g")
-- Performing Test HAVE_STD11
-- Performing Test HAVE_STD11 - Success
C++ Flags: -Wall -std=c++11 -std=c++11 -Wall -Werror link flags:
-- Configuring tests
CMake Error at deps/uri/CMakeLists.txt:85 (add_subdirectory):
The source directory

/home/sa/cpp-netlib/deps/uri/deps/googletest

does not contain a CMakeLists.txt file.

Configuring documentation
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.11")
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
CMake Error at CMakeLists.txt:136 (add_subdirectory):
The binary directory

/home/sa/cpp-netlib/build/deps/uri/test

is already used to build a source directory. It cannot be used to build
source directory

/home/sa/cpp-netlib/deps/uri/test

Specify a unique binary directory name.

-- Configuring incomplete, errors occurred!
See also "/home/sa/cpp-netlib/build/CMakeFiles/CMakeOutput.log".
See also "/home/sa/cpp-netlib/build/CMakeFiles/CMakeError.log".

@alexBraidwood
Copy link

alexBraidwood commented May 7, 2019

cd into /home/sa/cpp-netlib/deps/uri and run git submodule update --init --recursive - see if that does the trick. My mistake, this is actually a bug. So, there's two options here, in uri/CMakeLists.txt you can add a guard to not include gtest twice:

if (NOT TARGET gtest AND NOT TARGET gtestmain)
  add_subdirectory(deps/googletest)
endif()

Or just turn off tests:
option(Uri_BUILD_TESTS "Build the URI tests." OFF)

@LiSongMWO
Copy link

This seems to be a dupe of #849

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

3 participants