Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.

ERROR: No commands were logged to the build logs . Your build system may not be compatible. #40

Closed
MaikKlein opened this issue Nov 22, 2015 · 1 comment

Comments

@MaikKlein
Copy link

CppTest  python2 ~/.vim/bundle/YCM-Generator/config_gen.py ~/CppTest --verbose
Running cmake in '/tmp/tmpMaTYE9'...
$ cmake /home/maik/CppTest
-- The C compiler identification is Clang 3.7.0
-- The CXX compiler identification is Clang 3.7.0
-- Check for working C compiler: /home/maik/.vim/bundle/YCM-Generator/fake-toolchain/Unix/clang
-- Check for working C compiler: /home/maik/.vim/bundle/YCM-Generator/fake-toolchain/Unix/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: /home/maik/.vim/bundle/YCM-Generator/fake-toolchain/Unix/clang++
-- Check for working CXX compiler: /home/maik/.vim/bundle/YCM-Generator/fake-toolchain/Unix/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/tmpMaTYE9

Running make...
$ make -i -j4
Scanning dependencies of target CppTest
[ 50%] Building CXX object CMakeFiles/CppTest.dir/main.cpp.o
[100%] Linking CXX executable CppTest
[100%] Built target CppTest

Cleaning up...

Build completed in 6.1 sec

Collected 0 relevant entries for C compilation (0 discarded).
Collected 0 relevant entries for C++ compilation (0 discarded).
()
ERROR: No commands were logged to the build logs (C: /tmp/tmphWWHFL, C++: /tmp/tmpdBfH6z).
Your build system may not be compatible.
project(CppTest)
cmake_minimum_required(VERSION 2.8)
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
SET (CMAKE_CXX_COMPILER             "/usr/bin/clang++")
SET (CMAKE_CXX_FLAGS                "-std=c++1z")
INCLUDE_DIRECTORIES(libs)
➜  CppTest  ls
CMakeLists.txt  CMakeLists.txt.user  libs  main.cpp
@rdnetto
Copy link
Owner

rdnetto commented Nov 23, 2015

It looks like you're hardcoding the path to your C++ compiler. This is very non-portable, which is why it breaks YCM-Gen (which works by supplying its own compiler). Remove that line and it should work without problems. If you do need to use a specific C++ compiler, you should be passing that to cmake instead of hardcoding it.

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

No branches or pull requests

2 participants