diff --git a/cspell.config.yaml b/cspell.config.yaml index 27316dc3..578690f5 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -10,6 +10,8 @@ language: en, en-GB allowCompoundWords: true enableGlobDot: true words: + - awalsh + - pkgs - aarch - aminya - Amnet diff --git a/src/Optimization.cmake b/src/Optimization.cmake index 68058e42..6dc3ad47 100644 --- a/src/Optimization.cmake +++ b/src/Optimization.cmake @@ -37,13 +37,16 @@ endmacro() # Disable C++ exceptions for the given project. macro(disable_exceptions _project_name) - target_compile_options(${_project_name} INTERFACE $<$:/EHs-c- /D_HAS_EXCEPTIONS=0>) - target_compile_options(${_project_name} INTERFACE $<$>:-fno-exceptions - -fno-unwind-tables>) + target_compile_options(${_project_name} INTERFACE $<$,$>:/EHs-c- + /D_HAS_EXCEPTIONS=0>) + target_compile_options( + ${_project_name} INTERFACE $<$,$>>:-fno-exceptions + -fno-unwind-tables>) endmacro() # Disable C++ RTTI (Run-Time Type Information) for the given project. macro(disable_rtti _project_name) - target_compile_options(${_project_name} INTERFACE $<$:/GR->) - target_compile_options(${_project_name} INTERFACE $<$>:-fno-rtti>) + target_compile_options(${_project_name} INTERFACE $<$,$>:/GR->) + target_compile_options(${_project_name} + INTERFACE $<$,$>>:-fno-rtti>) endmacro() 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/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/include/mylib/lib.hpp b/tests/myproj/include/mylib/lib.hpp index e808b290..6ecad59b 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("{}", eigen_vec); + // print the vector + fmt::print("{}", 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 8493180a..3dc72141 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("{}", eigen_vec); + Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3); + fmt::print("{}", eigen_vec); -#if !defined(__MINGW32__) && !defined(__MSYS__)// TODO fails - Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1); - fmt::print("{}", eigen_vec2); +#if !defined(__MINGW32__) && !defined(__MSYS__) // TODO fails + Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1); + fmt::print("{}", 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 41e4b510..38458dce 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("{}", eigen_vec); + Eigen::VectorXd eigen_vec = Eigen::Vector3d(1, 2, 3); + fmt::print("{}", eigen_vec); -#if !defined(__MINGW32__) && !defined(__MSYS__)// TODO fails - Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1); - fmt::print("{}", eigen_vec2); +#if !defined(__MINGW32__) && !defined(__MSYS__) // TODO fails + Eigen::VectorXd eigen_vec2 = Eigen::VectorXd::LinSpaced(10, 0, 1); + fmt::print("{}", eigen_vec2); #endif - return 0; + return 0; } diff --git a/tests/rpi3/main.c b/tests/rpi3/main.c index 764e0c1e..c18a0350 100644 --- a/tests/rpi3/main.c +++ b/tests/rpi3/main.c @@ -1,6 +1,6 @@ #include int main() { - printf("Hello World\n"); - return 0; + printf("Hello World\n"); + return 0; } \ 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