biicode / client

Biicode client
http://www.biicode.com
MIT License
35 stars 15 forks source link

CLion project layout: "GTest dependency isnt't int your project/deps folder" #27

Open smessmer opened 9 years ago

smessmer commented 9 years ago

OS: Ubuntu 14.10 Biicode Client 3.3

Steps to reproduce:

$ bii init -l clion testproject $ cd testproject $ bii open messmer/blockstore $ bii configure

Output:

INFO: Processing changes...
Running: "cmake"  -G "Unix Makefiles" -Wno-dev  ..
-- The C compiler identification is GNU 4.9.1
-- The CXX compiler identification is GNU 4.9.1
-- 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
-- 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

                BLOCK: google/gtest 
-----------------------------------------------------------
-- Found PythonInterp: /usr/bin/python (found version "2.7.8") 
-- Looking for include file pthread.h
-- Looking for include file 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  
+ LIB: google_gtest

                BLOCK: cryptopp/cryptopp 
-----------------------------------------------------------
CALLING INIT_BIICODE_BLOCK IS NO LONGER NECESSARY
+ LIB: cryptopp_cryptopp
-- Writing default cmake_dummy.cpp for building library
BUILDING cryptopp_cryptopp

                BLOCK: google/gmock 
-----------------------------------------------------------
CALLING INIT_BIICODE_BLOCK IS NO LONGER NECESSARY
+ LIB: google_gmock
-- Writing default cmake_dummy.cpp for building library
CMake Error at deps/google/gmock/CMakeLists.txt:33 (MESSAGE):
  GTest dependency isn't in your project/deps folder

-- Configuring incomplete, errors occurred!
See also ".../testproject/build/CMakeFiles/CMakeOutput.log".
See also ".../testproject/build/CMakeFiles/CMakeError.log".
ERROR: CMake failed

CMakeError.log:

File .../testproject/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: .../testproject/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTryCompileExec3856153446/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec3856153446.dir/build.make CMakeFiles/cmTryCompileExec3856153446.dir/build
make[1]: Entering directory '.../testproject/build/CMakeFiles/CMakeTmp'
/home/.../.biicode_env/cmake-3.0.2-Linux-64/bin/cmake -E cmake_progress_report .../testproject/build/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3856153446.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTryCompileExec3856153446.dir/CheckFunctionExists.c.o   -c /home/.../.biicode_env/cmake-3.0.2-Linux-64/share/cmake-3.0/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec3856153446
/home/.../.biicode_env/cmake-3.0.2-Linux-64/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec3856153446.dir/link.txt --verbose=1
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTryCompileExec3856153446.dir/CheckFunctionExists.c.o  -o cmTryCompileExec3856153446 -rdynamic -lpthreads 
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec3856153446.dir/build.make:88: recipe for target 'cmTryCompileExec3856153446' failed
make[1]: Leaving directory '.../testproject/build/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec3856153446] Error 1
Makefile:118: recipe for target 'cmTryCompileExec3856153446/fast' failed
make: *** [cmTryCompileExec3856153446/fast] Error 2

It works fine when using standard or minimal project layout.

smessmer commented 9 years ago

Any ideas?