Hi,
I found it strange, the clang-tidy warnings contains only relative paths to
header files?
Than I realized , the ninja.rules files contains NO absolute paths to target
source and header files.
Is this a BUG or a desired feature?
// regards
Claus
--- compile_commands.json.make.gen 2019-07-22 22:21:44.000000000 +0200
+++ compile_commands.json.ninja.gen 2019-07-22 22:19:23.000000000 +0200
@@ -1,82 +1,97 @@
[
{
"directory": "/Users/clausklein/Workspace/cpp/spdlog/build",
- "command": "/opt/local/bin/clang++ -DSPDLOG_COMPILED_LIB
-I/Users/clausklein/Workspace/cpp/spdlog/include -O3 -DNDEBUG -Wall -Wextra
-Wconversion -pedantic -Werror -Wfatal-errors -std=c++11 -o
CMakeFiles/spdlog.dir/src/spdlog.cpp.o -c
/Users/clausklein/Workspace/cpp/spdlog/src/spdlog.cpp",
+ "command": "/opt/local/bin/clang++ -DSPDLOG_COMPILED_LIB -I../include -O3
-DNDEBUG -Wall -Wextra -Wconversion -pedantic -Werror -Wfatal-errors
-std=c++11 -o CMakeFiles/spdlog.dir/src/spdlog.cpp.o -c
/Users/clausklein/Workspace/cpp/spdlog/src/spdlog.cpp",
"file": "/Users/clausklein/Workspace/cpp/spdlog/src/spdlog.cpp"
},
+
Claus-MBP:spdlog clausklein$ make setup
mkdir -p build
ln -sf scripts/.clang-format .
ln -sf scripts/.clang-tidy .
cd build && cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_CXX_COMPILER=/opt/local/bin/clang++ ..
-- use ccache
-- The CXX compiler identification is Clang 7.0.1
-- Check for working CXX compiler: /opt/local/bin/clang++
-- Check for working CXX compiler: /opt/local/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build spdlog: 1.4.0
-- spdlog include path: /Users/clausklein/Workspace/cpp/spdlog/include
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Build type: Release
-- Generating examples
-- Generating tests
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'libsystemd'
-- No package 'libsystemd' found
-- Generating install
-- Configuring done
-- Generating done
-- Build files have been written to:
/Users/clausklein/Workspace/cpp/spdlog/build
touch .configure
ln -sf /Users/clausklein/Workspace/cpp/spdlog/build/compile_commands.json .
Claus-MBP:spdlog clausklein$ grep -w include build/build.ninja | sort -u
INCLUDES = -I../include
include rules.ninja
Claus-MBP:spdlog clausklein$ cmake --version
cmake version 3.14.5
CMake suite maintained and supported by Kitware (kitware.com/cmake).
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers