diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df0c1ea2..92c3eaf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,10 +15,9 @@ jobs: os: - windows-2022 - ubuntu-22.04 - - macos-13 - # - macos-14 + - macos-14 compiler: - - llvm + - llvm-19 - gcc vcvarsall: - true @@ -63,7 +62,7 @@ jobs: cmake: true ninja: true vcpkg: true - conan: 2.6.0 + conan: true cppcheck: true cmakelang: true clang-tidy: true diff --git a/README.md b/README.md index e9cad220..4ba45513 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ include(${_project_options_SOURCE_DIR}/Index.cmake) # install vcpkg dependencies: - should be called before defining project() run_vcpkg( VCPKG_URL "https://github.com/microsoft/vcpkg.git" - VCPKG_REV "86a181505ac6460f98496a79abdee6a0f49905ec" + VCPKG_REV "0cb95c860ea83aafc1b24350510b30dec535989a" ) # Install conan dependencies: - should be called before defining project() run_conan() diff --git a/cspell.config.yaml b/cspell.config.yaml index 9ff57172..185b18be 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -11,6 +11,7 @@ allowCompoundWords: true enableGlobDot: true words: - aarch + - cmakelang - aminya - Amnet - anotherproj diff --git a/docs/src/project_options_example.md b/docs/src/project_options_example.md index 3affbf80..d95c9c19 100644 --- a/docs/src/project_options_example.md +++ b/docs/src/project_options_example.md @@ -30,7 +30,7 @@ include(${_project_options_SOURCE_DIR}/Index.cmake) # install vcpkg dependencies: - should be called before defining project() run_vcpkg( VCPKG_URL "https://github.com/microsoft/vcpkg.git" - VCPKG_REV "86a181505ac6460f98496a79abdee6a0f49905ec" + VCPKG_REV "0cb95c860ea83aafc1b24350510b30dec535989a" ) # Install conan dependencies: - should be called before defining project() run_conan() diff --git a/src/Index.cmake b/src/Index.cmake index a04538df..cddc381f 100644 --- a/src/Index.cmake +++ b/src/Index.cmake @@ -18,6 +18,11 @@ if(POLICY CMP0141) cmake_policy(SET CMP0141 NEW) endif() +if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.31.0") + # normalize install directories + cmake_policy(SET CMP0177 NEW) +endif() + # only useable here set(ProjectOptions_SRC_DIR "${CMAKE_CURRENT_LIST_DIR}") diff --git a/src/Vcpkg.cmake b/src/Vcpkg.cmake index 2cbb8984..0bec717d 100644 --- a/src/Vcpkg.cmake +++ b/src/Vcpkg.cmake @@ -170,7 +170,7 @@ Or by specifying the options run_vcpkg( VCPKG_URL "https://github.com/microsoft/vcpkg.git" - VCPKG_REV "86a181505ac6460f98496a79abdee6a0f49905ec" + VCPKG_REV "0cb95c860ea83aafc1b24350510b30dec535989a" ENABLE_VCPKG_UPDATE ) diff --git a/tests/emscripten/main.cpp b/tests/emscripten/main.cpp index 7e674a92..7daec985 100644 --- a/tests/emscripten/main.cpp +++ b/tests/emscripten/main.cpp @@ -13,6 +13,6 @@ #endif int main() { - printf("hello, world!\n"); - return 0; + printf("hello, world!\n"); + return 0; } \ No newline at end of file diff --git a/tests/install/src/another_main.cpp b/tests/install/src/another_main.cpp index 4b80c7b0..f14a6747 100644 --- a/tests/install/src/another_main.cpp +++ b/tests/install/src/another_main.cpp @@ -2,6 +2,6 @@ #include int main() { - some_fun2(); - return some_fun2(); + some_fun2(); + return some_fun2(); } \ No newline at end of file diff --git a/tests/install/vcpkg.json b/tests/install/vcpkg.json index a38c3b13..6ee51161 100644 --- a/tests/install/vcpkg.json +++ b/tests/install/vcpkg.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "another-project", "version-string": "0.1.0", - "builtin-baseline": "86a181505ac6460f98496a79abdee6a0f49905ec", + "builtin-baseline": "0cb95c860ea83aafc1b24350510b30dec535989a", "dependencies": [ { "name": "eigen3", diff --git a/tests/minimal/main.cpp b/tests/minimal/main.cpp index 0296dc98..115ff095 100644 --- a/tests/minimal/main.cpp +++ b/tests/minimal/main.cpp @@ -1,6 +1,6 @@ #include int main() { - fmt::print("Hello World!"); - return 0; + fmt::print("Hello World!"); + return 0; } \ No newline at end of file diff --git a/tests/myproj/CMakeLists.txt b/tests/myproj/CMakeLists.txt index ec8b0040..8768e68b 100644 --- a/tests/myproj/CMakeLists.txt +++ b/tests/myproj/CMakeLists.txt @@ -18,7 +18,7 @@ if(ENABLE_CROSS_COMPILING) endif() run_vcpkg(VCPKG_URL "https://github.com/microsoft/vcpkg.git" VCPKG_REV - "86a181505ac6460f98496a79abdee6a0f49905ec" ENABLE_VCPKG_UPDATE + "0cb95c860ea83aafc1b24350510b30dec535989a" ENABLE_VCPKG_UPDATE ) run_conan() diff --git a/tests/myproj/include/mylib/lib.hpp b/tests/myproj/include/mylib/lib.hpp index 8d2ed226..f74c7bad 100644 --- a/tests/myproj/include/mylib/lib.hpp +++ b/tests/myproj/include/mylib/lib.hpp @@ -18,13 +18,13 @@ #include int some_fun() { - fmt::print("Hello from fmt{}", "!"); + fmt::print("Hello from fmt{}", "!"); - // populate an Eigen vector with the values - auto eigen_vec = Eigen::VectorXd::LinSpaced(10, 0, 1); + // populate an Eigen vector with the values + auto eigen_vec = Eigen::VectorXd::LinSpaced(10, 0, 1); - // print the vector - fmt::print("[{}]", fmt::join(eigen_vec, ", ")); + // print the vector + fmt::print("[{}]", fmt::join(eigen_vec, ", ")); - return 0; + return 0; } diff --git a/tests/myproj/libs/mythirdpartylib/include/Foo.hpp b/tests/myproj/libs/mythirdpartylib/include/Foo.hpp index 52915fce..26aa7e0e 100644 --- a/tests/myproj/libs/mythirdpartylib/include/Foo.hpp +++ b/tests/myproj/libs/mythirdpartylib/include/Foo.hpp @@ -8,18 +8,18 @@ namespace mythirdpartylib { class MYTHIRDPARTYLIB_EXPORT Foo { - public: - Foo() = default; +public: + Foo() = default; - /*implicit*/ Foo(int a) : m_a(a) {} + /*implicit*/ Foo(int a) : m_a(a) {} - int a() const { return m_a; } + int a() const { return m_a; } - void update(bool b, bool c, bool d); - void bad(std::vector &v); + void update(bool b, bool c, bool d); + void bad(std::vector &v); - private: - int m_a; +private: + int m_a; }; -}// namespace mythirdpartylib \ No newline at end of file +} // namespace mythirdpartylib \ No newline at end of file diff --git a/tests/myproj/libs/mythirdpartylib/src/Foo.cpp b/tests/myproj/libs/mythirdpartylib/src/Foo.cpp index c8d279e7..9e777af4 100644 --- a/tests/myproj/libs/mythirdpartylib/src/Foo.cpp +++ b/tests/myproj/libs/mythirdpartylib/src/Foo.cpp @@ -3,22 +3,22 @@ namespace mythirdpartylib { void Foo::update(bool b, bool c, bool d) { - int e = b + d; - m_a = e; + int e = b + d; + m_a = e; } void Foo::bad(std::vector &v) { - std::string val = "hello"; - int index = -1;// bad, plus should use gsl::index - for (int i = 0; i < v.size(); ++i) { - if (v[i] == val) { - index = i; - break; - } + std::string val = "hello"; + int index = -1; // bad, plus should use gsl::index + for (int i = 0; i < v.size(); ++i) { + if (v[i] == val) { + index = i; + break; } + } } static Foo foo(5); static Foo bar = 42; -}// namespace mythirdpartylib \ No newline at end of file +} // namespace mythirdpartylib \ No newline at end of file diff --git a/tests/myproj/src/main/main.cpp b/tests/myproj/src/main/main.cpp index 65c8ad70..25cc0b59 100644 --- a/tests/myproj/src/main/main.cpp +++ b/tests/myproj/src/main/main.cpp @@ -16,20 +16,20 @@ #include int main() { - fmt::print("Hello from fmt{}", "!"); + fmt::print("Hello from fmt{}", "!"); - Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3); - fmt::print("[{}]", fmt::join(eigen_vec, ", ")); + Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3); + fmt::print("[{}]", fmt::join(eigen_vec, ", ")); -#if !defined(__MINGW32__) && !defined(__MSYS__)// TODO fails - Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1); - fmt::print("[{}]", fmt::join(eigen_vec2, ", ")); +#if !defined(__MINGW32__) && !defined(__MSYS__) // TODO fails + Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1); + fmt::print("[{}]", fmt::join(eigen_vec2, ", ")); #endif - // trigger address sanitizer - // int *p = nullptr; - // *p = 1; + // trigger address sanitizer + // int *p = nullptr; + // *p = 1; - // trigger compiler warnings, clang-tidy, and cppcheck - int a; + // trigger compiler warnings, clang-tidy, and cppcheck + int a; } diff --git a/tests/myproj/src/mylib2/lib.cpp b/tests/myproj/src/mylib2/lib.cpp index 15cd1b02..01524a76 100644 --- a/tests/myproj/src/mylib2/lib.cpp +++ b/tests/myproj/src/mylib2/lib.cpp @@ -16,15 +16,15 @@ #include int some_fun2() { - fmt::print("Hello from fmt{}", "!"); + fmt::print("Hello from fmt{}", "!"); - Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3); - fmt::print("[{}]", fmt::join(eigen_vec, ", ")); + Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3); + fmt::print("[{}]", fmt::join(eigen_vec, ", ")); -#if !defined(__MINGW32__) && !defined(__MSYS__)// TODO fails - Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1); - fmt::print("[{}]", fmt::join(eigen_vec2, ", ")); +#if !defined(__MINGW32__) && !defined(__MSYS__) // TODO fails + Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1); + fmt::print("[{}]", fmt::join(eigen_vec2, ", ")); #endif - return 0; + return 0; } diff --git a/tests/myproj/vcpkg.json b/tests/myproj/vcpkg.json index cb7a84b8..35d9e80c 100644 --- a/tests/myproj/vcpkg.json +++ b/tests/myproj/vcpkg.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "myproject", "version-string": "0.1.0", - "builtin-baseline": "86a181505ac6460f98496a79abdee6a0f49905ec", + "builtin-baseline": "0cb95c860ea83aafc1b24350510b30dec535989a", "dependencies": [ { "name": "eigen3", diff --git a/tests/rpi3/main.c b/tests/rpi3/main.c index cfe6ef9c..bfb7d28e 100644 --- a/tests/rpi3/main.c +++ b/tests/rpi3/main.c @@ -5,11 +5,11 @@ char uart_getc() { return 'a'; } void uart_puts(char *s) {} void main() { - uart_init(); + uart_init(); - uart_puts("Hello World!\n"); + uart_puts("Hello World!\n"); - while (1) { - uart_send(uart_getc()); - } + while (1) { + uart_send(uart_getc()); + } } \ No newline at end of file diff --git a/tests/rpi3/main.cpp b/tests/rpi3/main.cpp index b94615d2..4706104d 100644 --- a/tests/rpi3/main.cpp +++ b/tests/rpi3/main.cpp @@ -1,6 +1,6 @@ #include int main() { - std::cout << "Hello World!"; - return 0; + std::cout << "Hello World!"; + return 0; } \ No newline at end of file diff --git a/tests/rpi4-vcpkg/main.cpp b/tests/rpi4-vcpkg/main.cpp index 0296dc98..115ff095 100644 --- a/tests/rpi4-vcpkg/main.cpp +++ b/tests/rpi4-vcpkg/main.cpp @@ -1,6 +1,6 @@ #include int main() { - fmt::print("Hello World!"); - return 0; + fmt::print("Hello World!"); + return 0; } \ No newline at end of file diff --git a/tests/rpi4/main.cpp b/tests/rpi4/main.cpp index b94615d2..4706104d 100644 --- a/tests/rpi4/main.cpp +++ b/tests/rpi4/main.cpp @@ -1,6 +1,6 @@ #include int main() { - std::cout << "Hello World!"; - return 0; + std::cout << "Hello World!"; + return 0; } \ No newline at end of file