Closed ClausKlein closed 2 years ago
with current project_options
v0.18.0 I get this:
bash-3.2$ !cmake
cmake -B build -S . -G Ninja
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- The C compiler identification is AppleClang 13.0.0.13000029
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Developer mode is ON. For production, use `-DENABLE_DEVELOPER_MODE:BOOL=OFF`. Building the project for the developer...
-- Setting build type to 'RelWithDebInfo' as none was specified.
-- /usr/local/bin/ccache found and enabled
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
Building Tests. Be sure to check out test/constexpr_tests for constexpr
testing
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/clausklein/Workspace/cpp/cpp_starter_project/build
bash-3.2$ ninja -C build
ninja: Entering directory `build'
[1/9] Building CXX object test/CMakeFiles/tests.dir/tests.cpp.o
Checking /Users/clausklein/Workspace/cpp/cpp_starter_project/test/tests.cpp ...
Checking /Users/clausklein/Workspace/cpp/cpp_starter_project/test/tests.cpp: NDEBUG=1...
[2/9] Building CXX object test/CMakeFiles/relaxed_constexpr_tests.dir/constexpr_tests.cpp.o
Checking /Users/clausklein/Workspace/cpp/cpp_starter_project/test/constexpr_tests.cpp ...
Checking /Users/clausklein/Workspace/cpp/cpp_starter_project/test/constexpr_tests.cpp: CATCH_CONFIG_RUNTIME_STATIC_REQUIRE=1;NDEBUG=1...
[3/9] Building CXX object test/CMakeFiles/constexpr_tests.dir/constexpr_tests.cpp.o
Checking /Users/clausklein/Workspace/cpp/cpp_starter_project/test/constexpr_tests.cpp ...
Checking /Users/clausklein/Workspace/cpp/cpp_starter_project/test/constexpr_tests.cpp: NDEBUG=1...
[4/9] Building CXX object src/CMakeFiles/intro.dir/main.cpp.o
FAILED: src/CMakeFiles/intro.dir/main.cpp.o
/usr/local/Cellar/cmake/3.22.1/bin/cmake -E __run_co_compile --launcher=/usr/local/bin/ccache --tidy="/usr/local/opt/llvm/bin/clang-tidy;-extra-arg=-Wno-unknown-warning-option;-warnings-as-errors=*;-extra-arg=-std=c++20;--extra-arg-before=--driver-mode=g++" --cppcheck="/usr/local/bin/cppcheck;--template=gcc;--enable=style,performance,warning,portability;--inline-suppr;--suppress=internalAstError;--suppress=unmatchedSuppression;--inconclusive;--error-exitcode=2;--std=c++20" --source=/Users/clausklein/Workspace/cpp/cpp_starter_project/src/main.cpp -- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DFMT_LOCALE -DFMT_SHARED -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -I/Users/clausklein/Workspace/cpp/cpp_starter_project/build -isystem /usr/local/include/docopt -isystem /usr/local/include -O2 -g -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -fcolor-diagnostics -fsanitize=address,undefined -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wimplicit-fallthrough -Werror -std=c++2a -MD -MT src/CMakeFiles/intro.dir/main.cpp.o -MF src/CMakeFiles/intro.dir/main.cpp.o.d -o src/CMakeFiles/intro.dir/main.cpp.o -c /Users/clausklein/Workspace/cpp/cpp_starter_project/src/main.cpp
/usr/local/include/spdlog/tweakme.h:74:9: error: 'SPDLOG_FMT_EXTERNAL' macro redefined [clang-diagnostic-macro-redefined,-warnings-as-errors]
#define SPDLOG_FMT_EXTERNAL
^
note: previous definition is here
91756 warnings generated.
Suppressed 91755 warnings (91755 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
1 warning treated as error
[5/9] Building CXX object test/CMakeFiles/catch_main.dir/catch_main.cpp.o
Checking /Users/clausklein/Workspace/cpp/cpp_starter_project/test/catch_main.cpp ...
Checking /Users/clausklein/Workspace/cpp/cpp_starter_project/test/catch_main.cpp: NDEBUG=1...
ninja: build stopped: subcommand failed.
bash-3.2$
This should all be fixed now as we have gone to great lengths to test on as many platforms as we can. Can you verify?
Yes, it works now. Thanks
I have problems with the default project options on OSX:
The clang-tidy check issue an warning:
But the build generates an error for this?