Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow system package installation for conan by default #287

Merged
merged 2 commits into from
Nov 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/Conan.cmake
Original file line number Diff line number Diff line change
@@ -169,6 +169,9 @@ macro(_run_conan1)
# Pass either autodetected settings or a conan profile
${CONAN_SETTINGS}
${OUTPUT_QUIET}
CONF
-c tools.system.package_manager:mode=install
-c tools.system.package_manager:sudo=True
)
endforeach()
endif()
@@ -217,7 +220,11 @@ macro(_run_conan2)
endif()

if(NOT _args_INSTALL_ARGS)
set(_args_INSTALL_ARGS "--build=missing")
set(_args_INSTALL_ARGS
--build=missing
-c tools.system.package_manager:mode=install
-c tools.system.package_manager:sudo=True
)
endif()

set(CONAN_HOST_PROFILE "${_args_HOST_PROFILE}" CACHE STRING "Conan host profile" FORCE)

Unchanged files with check annotations Beta

#include <fmt/ranges.h>
// test std libraries
#include <iostream>

Check warning on line 7 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, gcc, true)

included header iostream is not used directly [misc-include-cleaner]

Check warning on line 7 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, llvm, true)

included header iostream is not used directly [misc-include-cleaner]

Check warning on line 7 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, llvm, true)

included header iostream is not used directly [misc-include-cleaner]

Check warning on line 7 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, gcc, true)

included header iostream is not used directly [misc-include-cleaner]
#include <string>

Check warning on line 8 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, gcc, true)

included header string is not used directly [misc-include-cleaner]

Check warning on line 8 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, llvm, true)

included header string is not used directly [misc-include-cleaner]

Check warning on line 8 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, llvm, true)

included header string is not used directly [misc-include-cleaner]

Check warning on line 8 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, gcc, true)

included header string is not used directly [misc-include-cleaner]
#include <string_view>

Check warning on line 9 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, gcc, true)

included header string_view is not used directly [misc-include-cleaner]

Check warning on line 9 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, llvm, true)

included header string_view is not used directly [misc-include-cleaner]

Check warning on line 9 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, gcc, true)

included header string_view is not used directly [misc-include-cleaner]
// test c libraries
#include <cassert>
#include <cctype>

Check warning on line 13 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, llvm, true)

included header cctype is not used directly [misc-include-cleaner]
#include <cstddef>

Check warning on line 14 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, gcc, true)

included header cstddef is not used directly [misc-include-cleaner]

Check warning on line 14 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, llvm, true)

included header cstddef is not used directly [misc-include-cleaner]

Check warning on line 14 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, gcc, true)

included header cstddef is not used directly [misc-include-cleaner]
#include <cstdint>

Check warning on line 15 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, gcc, true)

included header cstdint is not used directly [misc-include-cleaner]

Check warning on line 15 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, llvm, true)

included header cstdint is not used directly [misc-include-cleaner]

Check warning on line 15 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, gcc, true)

included header cstdint is not used directly [misc-include-cleaner]
#include <cstring>

Check warning on line 16 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, llvm, true)

included header cstring is not used directly [misc-include-cleaner]
int main() {
fmt::print("Hello from fmt{}", "!");

Check warning on line 19 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, gcc, true)

no header providing "fmt::print" is directly included [misc-include-cleaner]

Check warning on line 19 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, llvm, true)

no header providing "fmt::print" is directly included [misc-include-cleaner]

Check warning on line 19 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, gcc, true)

no header providing "fmt::print" is directly included [misc-include-cleaner]
Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3);

Check warning on line 21 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, gcc, true)

no header providing "Eigen::VectorXd" is directly included [misc-include-cleaner]

Check warning on line 21 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, llvm, true)

no header providing "Eigen::VectorXd" is directly included [misc-include-cleaner]

Check warning on line 21 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, gcc, true)

no header providing "Eigen::VectorXd" is directly included [misc-include-cleaner]
fmt::print("[{}]", fmt::join(eigen_vec, ", "));
#if !defined(__MINGW32__) && !defined(__MSYS__)// TODO fails
Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1);

Check warning on line 25 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, gcc, true)

10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]

Check warning on line 25 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, gcc, true)

10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]

Check warning on line 25 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, gcc, true)

10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]

Check warning on line 25 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, llvm, true)

10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]

Check warning on line 25 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, llvm, true)

10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]

Check warning on line 25 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, llvm, true)

10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
fmt::print("[{}]", fmt::join(eigen_vec2, ", "));
#endif
// *p = 1;
// trigger compiler warnings, clang-tidy, and cppcheck
int a;

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, gcc, true)

unused variable 'a' [clang-diagnostic-unused-variable]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (ubuntu-22.04, gcc, true)

variable 'a' is not initialized [cppcoreguidelines-init-variables]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, gcc, true)

unused variable 'a' [clang-diagnostic-unused-variable]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, gcc, true)

variable 'a' is not initialized [cppcoreguidelines-init-variables]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, gcc, true)

variable name 'a' is too short, expected at least 3 characters [readability-identifier-length]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, gcc, true)

Unused variable: a [unusedVariable]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, gcc, true)

unused variable 'a' [-Wunused-variable]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, gcc, true)

unused variable 'a' [clang-diagnostic-unused-variable]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, gcc, true)

variable 'a' is not initialized [cppcoreguidelines-init-variables]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, llvm, true)

unused variable 'a' [clang-diagnostic-unused-variable]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, llvm, true)

variable 'a' is not initialized [cppcoreguidelines-init-variables]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, llvm, true)

variable name 'a' is too short, expected at least 3 characters [readability-identifier-length]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, llvm, true)

Unused variable: a [unusedVariable]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, llvm, true)

unused variable 'a' [-Wunused-variable]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, llvm, true)

unused variable 'a' [clang-diagnostic-unused-variable]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (macos-13, llvm, true)

variable 'a' is not initialized [cppcoreguidelines-init-variables]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, gcc, true)

unused variable 'a' [clang-diagnostic-unused-variable]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, gcc, true)

variable 'a' is not initialized [cppcoreguidelines-init-variables]

Check warning on line 34 in tests/myproj/src/main/main.cpp

GitHub Actions / Test (windows-2022, gcc, true)

variable name 'a' is too short, expected at least 3 characters [readability-identifier-length]
}
#include <fmt/ranges.h>
// test std libraries
#include <iostream>

Check warning on line 7 in tests/myproj/src/mylib2/lib.cpp

GitHub Actions / Test (ubuntu-22.04, llvm, true)

included header iostream is not used directly [misc-include-cleaner]
#include <string>

Check warning on line 8 in tests/myproj/src/mylib2/lib.cpp

GitHub Actions / Test (ubuntu-22.04, llvm, true)

included header string is not used directly [misc-include-cleaner]
#include <string_view>

Check warning on line 9 in tests/myproj/src/mylib2/lib.cpp

GitHub Actions / Test (ubuntu-22.04, llvm, true)

included header string_view is not used directly [misc-include-cleaner]
// test c libraries
#include <cassert>
#include <cctype>
#include <cstddef>

Check warning on line 14 in tests/myproj/src/mylib2/lib.cpp

GitHub Actions / Test (ubuntu-22.04, llvm, true)

included header cstddef is not used directly [misc-include-cleaner]
#include <cstdint>

Check warning on line 15 in tests/myproj/src/mylib2/lib.cpp

GitHub Actions / Test (ubuntu-22.04, llvm, true)

included header cstdint is not used directly [misc-include-cleaner]
#include <cstring>
int some_fun2() {
fmt::print("Hello from fmt{}", "!");

Check warning on line 19 in tests/myproj/src/mylib2/lib.cpp

GitHub Actions / Test (ubuntu-22.04, llvm, true)

no header providing "fmt::print" is directly included [misc-include-cleaner]
Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3);

Check warning on line 21 in tests/myproj/src/mylib2/lib.cpp

GitHub Actions / Test (ubuntu-22.04, llvm, true)

no header providing "Eigen::VectorXd" is directly included [misc-include-cleaner]
fmt::print("[{}]", fmt::join(eigen_vec, ", "));
#if !defined(__MINGW32__) && !defined(__MSYS__)// TODO fails
Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1);

Check warning on line 25 in tests/myproj/src/mylib2/lib.cpp

GitHub Actions / Test (ubuntu-22.04, llvm, true)

10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]

Check warning on line 25 in tests/myproj/src/mylib2/lib.cpp

GitHub Actions / Test (macos-13, gcc, true)

10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]

Check warning on line 25 in tests/myproj/src/mylib2/lib.cpp

GitHub Actions / Test (macos-13, llvm, true)

10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
fmt::print("[{}]", fmt::join(eigen_vec2, ", "));
#endif