-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to refactory the CMakeLists.txt files
- Loading branch information
1 parent
48c0954
commit b8eac3a
Showing
6 changed files
with
127 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,120 +1,111 @@ | ||
Executing workflow step 1 of 5: configure preset "dev" | ||
|
||
Preset CMake variables: | ||
|
||
CMAKE_BUILD_TYPE="Debug" | ||
CMAKE_CXX_EXTENSIONS="OFF" | ||
CMAKE_CXX_FLAGS="-fstack-protector-strong -Wall -Wextra -Wpedantic -Wno-conversion -Wno-sign-conversion -Wcast-qual -Wformat=2 -Wundef -Werror=float-equal -Wshadow -Wcast-align -Wunused -Wnull-dereference -Wdouble-promotion -Wno-implicit-fallthrough -Wextra-semi -Woverloaded-virtual -Wnon-virtual-dtor -Wno-old-style-cast" | ||
CMAKE_CXX_STANDARD="20" | ||
CMAKE_CXX_STANDARD_REQUIRED="ON" | ||
CMAKE_EXPORT_COMPILE_COMMANDS="ON" | ||
CMAKE_BUILD_TYPE="Release" | ||
CMAKE_CXX_EXTENSIONS:BOOL="TRUE" | ||
CMAKE_CXX_FLAGS_DEBUG="-fstack-protector-strong -Wall -Wextra -Wpedantic -Wno-conversion -Wno-sign-conversion -Wcast-qual -Wformat=2 -Wundef -Wno-float-equal -Wshadow -Wcast-align -Wunused -Wnull-dereference -Wdouble-promotion -Wno-implicit-fallthrough -Wextra-semi -Woverloaded-virtual -Wnon-virtual-dtor -Wno-old-style-cast" | ||
CMAKE_CXX_STANDARD="23" | ||
CMAKE_CXX_STANDARD_REQUIRED:BOOL="TRUE" | ||
CMAKE_INSTALL_PREFIX:PATH="/Users/clausklein/Workspace/cpp/cxx20/fmt-module/stagedir" | ||
CMAKE_PREFIX_PATH:STRING="/Users/clausklein/Workspace/cpp/cxx20/fmt-module/stagedir" | ||
FMT_DEVELOPER_MODE="ON" | ||
FMT_DEVELOPER_MODE:BOOL="TRUE" | ||
|
||
-- use ccache | ||
-- The CXX compiler identification is Clang 19.1.4 | ||
-- The CXX compiler identification is Clang 19.1.6 | ||
-- Detecting CXX compiler ABI info | ||
-- Detecting CXX compiler ABI info - done | ||
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ - skipped | ||
-- Check for working CXX compiler: /usr/local/Cellar/llvm/19.1.6/bin/clang++ - skipped | ||
-- Detecting CXX compile features | ||
-- Detecting CXX compile features - done | ||
'brew' '--prefix' 'llvm@19' | ||
-- LLVM_PREFIX=/usr/local/opt/llvm | ||
-- LLVM_ROOT=/usr/local/Cellar/llvm/19.1.6 | ||
-- LLVM_LIBC_SOURCE=/usr/local/opt/llvm/share/libc++/v1 | ||
-- CMAKE_CXX_COMPILER_IMPORT_STD= | ||
-- CPPdefinitions=FMT_USE_FCNTL=0;FMT_MODULE;HAS_STDLIB_MODULES | ||
-- Found Git: /usr/local/bin/git (found version "2.47.1") | ||
-- CPM: Adding package [email protected] (11.0.2 at /Users/clausklein/.cache/CPM/fmt/cccb77ae9609d2768ed80dd42cec54f77b1f1455) | ||
-- The C compiler identification is Clang 19.1.4 | ||
-- Detecting C compiler ABI info | ||
-- Detecting C compiler ABI info - done | ||
-- Check for working C compiler: /usr/local/opt/llvm/bin/clang - skipped | ||
-- Detecting C compile features | ||
-- Detecting C compile features - done | ||
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD | ||
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success | ||
-- Found Threads: TRUE | ||
-- CPM: Adding package [email protected] (v1.15.2 at /Users/clausklein/.cache/CPM/googletest/63d366a111d035db343a038884a22e44986dcf4d) | ||
-- Module tests to be built: | ||
-- Configuring done (1.9s) | ||
-- Generating done (0.0s) | ||
-- Build files have been written to: /Users/clausklein/Workspace/cpp/cxx20/fmt-module/build/dev | ||
-- CPM: Adding package [email protected] (11.1.1 at /Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5) | ||
CMake Warning at tests/CMakeLists.txt:50 (message): | ||
ADD_STDLIB_MODULES=stdlib | ||
|
||
Executing workflow step 2 of 5: build preset "dev" | ||
|
||
[1/4] Generating CXX dyndep file tests/CMakeFiles/header-only-test.dir/CXX.dd | ||
[1/2] Install the project... | ||
-- Install configuration: "Debug" | ||
-- Installing: /Users/clausklein/Workspace/cpp/cxx20/fmt-module/stagedir/lib/cmake/fmt/fmtTargets.cmake | ||
-- Module tests to be built: header-only-test | ||
-- Configuring done (1.0s) | ||
-- Generating done (0.0s) | ||
-- Build files have been written to: /Users/clausklein/Workspace/cpp/cxx20/fmt-module/build | ||
|
||
Executing workflow step 3 of 5: build preset "verify" | ||
[1/18] "/usr/local/Cellar/llvm/19.1.6/bin/clang-scan-deps" -format=p1689 -- /usr/local/Cellar/llvm/19.1.6/bin/clang++ | ||
-DFMT_MODULE -DFMT_USE_FCNTL=0 -DHAS_STDLIB_MODULES | ||
-I/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include -O3 -DNDEBUG -std=gnu++23 | ||
-fexperimental-library -stdlib=libc++ -x c++ /Users/clausklein/Workspace/cpp/cxx20/fmt-module/module/fmt.cppm -c -o | ||
CMakeFiles/fmt.dir/module/fmt.cppm.o -resource-dir "/usr/local/Cellar/llvm/19.1.6/lib/clang/19" -MT | ||
CMakeFiles/fmt.dir/module/fmt.cppm.o.ddi -MD -MF CMakeFiles/fmt.dir/module/fmt.cppm.o.ddi.d > | ||
CMakeFiles/fmt.dir/module/fmt.cppm.o.ddi.tmp && mv CMakeFiles/fmt.dir/module/fmt.cppm.o.ddi.tmp | ||
CMakeFiles/fmt.dir/module/fmt.cppm.o.ddi | ||
|
||
[1/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/base.h.cxx.o | ||
[2/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/args.h.cxx.o | ||
[3/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/chrono.h.cxx.o | ||
[4/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/format.h.cxx.o | ||
[5/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/compile.h.cxx.o | ||
[6/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/os.h.cxx.o | ||
[7/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/color.h.cxx.o | ||
[8/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/format-inl.h.cxx.o | ||
[9/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/ostream.h.cxx.o | ||
[10/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/core.h.cxx.o | ||
[11/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/printf.h.cxx.o | ||
[12/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/ranges.h.cxx.o | ||
[13/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/std.h.cxx.o | ||
[14/14] Building CXX object CMakeFiles/fmt-header-only_verify_interface_header_sets.dir/fmt-header-only_verify_interface_header_sets/fmt/xchar.h.cxx.o | ||
[2/18] "/usr/local/Cellar/llvm/19.1.6/bin/clang-scan-deps" -format=p1689 -- /usr/local/Cellar/llvm/19.1.6/bin/clang++ | ||
-D_LIBCPP_HAS_NO_LOCALIZATION -O3 -DNDEBUG -std=gnu++23 -fexperimental-library -stdlib=libc++ | ||
-Wno-reserved-module-identifier -x c++ /usr/local/opt/llvm/share/libc++/v1/std.cppm -c -o | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.cppm.o -resource-dir | ||
"/usr/local/Cellar/llvm/19.1.6/lib/clang/19" -MT | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.cppm.o.ddi -MD -MF | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.cppm.o.ddi.d > | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.cppm.o.ddi.tmp && mv | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.cppm.o.ddi.tmp | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.cppm.o.ddi | ||
|
||
Executing workflow step 4 of 5: test preset "dev" | ||
[3/18] "/usr/local/Cellar/llvm/19.1.6/bin/clang-scan-deps" -format=p1689 -- /usr/local/Cellar/llvm/19.1.6/bin/clang++ | ||
-D_LIBCPP_HAS_NO_LOCALIZATION -O3 -DNDEBUG -std=gnu++23 -fexperimental-library -stdlib=libc++ | ||
-Wno-reserved-module-identifier -x c++ /usr/local/opt/llvm/share/libc++/v1/std.compat.cppm -c -o | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.compat.cppm.o -resource-dir | ||
"/usr/local/Cellar/llvm/19.1.6/lib/clang/19" -MT | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.compat.cppm.o.ddi -MD -MF | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.compat.cppm.o.ddi.d > | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.compat.cppm.o.ddi.tmp && mv | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.compat.cppm.o.ddi.tmp | ||
tests/CMakeFiles/stdlib.dir/usr/local/opt/llvm/share/libc++/v1/std.compat.cppm.o.ddi | ||
|
||
Test project /Users/clausklein/Workspace/cpp/cxx20/fmt-module/build/dev | ||
Start 1: find-package-test | ||
Start 2: header-only-test | ||
1/2 Test #2: header-only-test ................. Passed 0.01 sec | ||
2/2 Test #1: find-package-test ................ Passed 3.02 sec | ||
[4/18] /usr/local/bin/cmake -E cmake_ninja_dyndep --tdi=CMakeFiles/fmt.dir/CXXDependInfo.json --lang=CXX --modmapfmt=clang | ||
--dd=CMakeFiles/fmt.dir/CXX.dd @CMakeFiles/fmt.dir/CXX.dd.rsp | ||
|
||
100% tests passed, 0 tests failed out of 2 | ||
[5/18] "/usr/local/Cellar/llvm/19.1.6/bin/clang-scan-deps" -format=p1689 -- /usr/local/Cellar/llvm/19.1.6/bin/clang++ | ||
-DFMT_MODULE -DFMT_USE_FCNTL=0 -DHAS_STDLIB_MODULES -D_LIBCPP_HAS_NO_LOCALIZATION | ||
-I/Users/clausklein/.cache/CPM/fmt/297020319ba1d5d14e1599714def59a1788711c5/include -O3 -DNDEBUG -std=gnu++23 | ||
-fexperimental-library -stdlib=libc++ -x c++ /Users/clausklein/Workspace/cpp/cxx20/fmt-module/tests/header-only-test.cc -c | ||
-o tests/CMakeFiles/header-only-test.dir/header-only-test.cc.o -resource-dir "/usr/local/Cellar/llvm/19.1.6/lib/clang/19" | ||
-MT tests/CMakeFiles/header-only-test.dir/header-only-test.cc.o.ddi -MD -MF | ||
tests/CMakeFiles/header-only-test.dir/header-only-test.cc.o.ddi.d > | ||
tests/CMakeFiles/header-only-test.dir/header-only-test.cc.o.ddi.tmp && mv | ||
tests/CMakeFiles/header-only-test.dir/header-only-test.cc.o.ddi.tmp | ||
tests/CMakeFiles/header-only-test.dir/header-only-test.cc.o.ddi | ||
|
||
Total Test time (real) = 3.02 sec | ||
[6/18] /usr/local/bin/cmake -E cmake_ninja_dyndep --tdi=tests/CMakeFiles/stdlib.dir/CXXDependInfo.json --lang=CXX | ||
--modmapfmt=clang --dd=tests/CMakeFiles/stdlib.dir/CXX.dd @tests/CMakeFiles/stdlib.dir/CXX.dd.rsp | ||
|
||
Executing workflow step 5 of 5: package preset "dev" | ||
[7/18] "/usr/local/Cellar/llvm/19.1.6/bin/clang-scan-deps" -format=p1689 -- /usr/local/Cellar/llvm/19.1.6/bin/clang++ | ||
-D_LIBCPP_HAS_NO_LOCALIZATION -O3 -DNDEBUG -std=gnu++23 -fexperimental-library -stdlib=libc++ -x c++ | ||
/Users/clausklein/Workspace/cpp/cxx20/fmt-module/tests/header-only-test.cc -c -o | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o -resource-dir | ||
"/usr/local/Cellar/llvm/19.1.6/lib/clang/19" -MT | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o.ddi -MD -MF | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o.ddi.d > | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o.ddi.tmp && mv | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o.ddi.tmp | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o.ddi | ||
|
||
CPack: Create package using TGZ | ||
CPack: Install projects | ||
CPack: - Install project: fmt [] | ||
CPack: Create package | ||
CPack: - package: /Users/clausklein/Workspace/cpp/cxx20/fmt-module/build/dev/fmt-11.0.2-Darwin.tar.gz generated. | ||
Enabled checks: | ||
misc-header-include-cycle | ||
misc-include-cleaner | ||
FAILED: module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o.ddi | ||
|
||
Running clang-tidy for 1 files out of 19 in compilation database ... | ||
[1/1][2.1s] /usr/local/opt/llvm/bin/clang-tidy -checks=-*,misc-header-*,misc-include-* -p=build/dev /Users/clausklein/Workspace/cpp/cxx20/fmt-module/tests/header-only-test.cc | ||
/Users/clausklein/.cache/CPM/fmt/cccb77ae9609d2768ed80dd42cec54f77b1f1455/include/fmt/format.h:41:10: warning: circular header file dependency detected while including 'base.h', please check the include path [misc-header-include-cycle] | ||
41 | #include "base.h" | ||
| ^ | ||
/Users/clausklein/.cache/CPM/fmt/cccb77ae9609d2768ed80dd42cec54f77b1f1455/include/fmt/base.h:3075:12: note: 'format.h' included from here | ||
3075 | # include "format.h" | ||
| ^ | ||
/Users/clausklein/Workspace/cpp/cxx20/fmt-module/tests/header-only-test.cc:3:10: note: 'base.h' included from here | ||
3 | #include "fmt/base.h" | ||
| ^ | ||
/Users/clausklein/Workspace/cpp/cxx20/fmt-module/tests/header-only-test.cc:4:1: warning: included header ostream.h is not used directly [misc-include-cleaner] | ||
4 | #include "fmt/ostream.h" | ||
| ^~~~~~~~~~~~~~~~~~~~~~~~ | ||
5 | #include "gtest/gtest.h" | ||
/Users/clausklein/Workspace/cpp/cxx20/fmt-module/tests/header-only-test.cc:13:18: warning: no header providing "fmt::format" is directly included [misc-include-cleaner] | ||
4 | #include "fmt/ostream.h" | ||
5 | #include "gtest/gtest.h" | ||
6 | | ||
7 | #ifndef FMT_HEADER_ONLY | ||
8 | # error "Not in the header-only mode." | ||
9 | #endif | ||
10 | | ||
11 | TEST(header_only_test, format) | ||
12 | { | ||
13 | EXPECT_EQ(fmt::format("foo"), "foo"); | ||
| ^ | ||
4 warnings generated. | ||
Suppressed 1 warnings (1 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. | ||
"/usr/local/Cellar/llvm/19.1.6/bin/clang-scan-deps" -format=p1689 -- /usr/local/Cellar/llvm/19.1.6/bin/clang++ | ||
-D_LIBCPP_HAS_NO_LOCALIZATION -O3 -DNDEBUG -std=gnu++23 -fexperimental-library -stdlib=libc++ -x c++ | ||
/Users/clausklein/Workspace/cpp/cxx20/fmt-module/tests/header-only-test.cc -c -o | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o -resource-dir | ||
"/usr/local/Cellar/llvm/19.1.6/lib/clang/19" -MT | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o.ddi -MD -MF | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o.ddi.d > | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o.ddi.tmp && mv | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o.ddi.tmp | ||
module/tests/CMakeFiles/module_header-only-test.dir/__/__/tests/header-only-test.cc.o.ddi | ||
|
||
ninja: Entering directory `build/dev' | ||
[1/1] Checking spelling | ||
Used config files: | ||
1: .codespellrc | ||
Error while scanning dependencies for /Users/clausklein/Workspace/cpp/cxx20/fmt-module/tests/header-only-test.cc: | ||
/Users/clausklein/Workspace/cpp/cxx20/fmt-module/tests/header-only-test.cc:16:12: fatal error: 'fmt/base.h' file not found | ||
ninja: build stopped: subcommand failed. | ||
make: *** [test] Error 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.