Coder Social home page Coder Social logo

helloworld's People

Contributors

cristianadam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

helloworld's Issues

License this project

Description

This project currently doesn't include a LICENSE file, nor is there information about licensing inside the READMT.md. As a result, it is currently all-rights-reserved, and other people cannot download and use it legally.

Thank you for creating this great project! It would be cool if it can be distributed under an open source license.

Use case

  • I'm working on the CMake tooling of Nixpkgs (the official repository of a cross-platform package manager Nix), and plans to add some test packages for the CI. This project would be a great test target if it could be distributed under an open-source license.

  • People are trying to contribute via pull requests (#3). It requires a license to create a clean ground of contributions. An all-rights-reserved project merging an all-rights-reserved PR will results in a mixture that no one can use legally.

How can I compile versions for ios and android?

Dear cristianadam
Thank you for sharing this project, this project is very useful to me. How can I extend this project to other platforms?
For example, I want to compile the HelloWorld library including (ios, android(arm64-v8a,armeabi-v7a), windows (x86_64, x64), linux, macos, Raspberry Pi)
Thanks!

MSVC compiler lookup fails with windows-2022

Hello,

we are using the basic build script here to run our post merge testing on MSVC for https://github.com/gromacs/gromacs and it is been working fine.

Since the default wndows-latest environment changed to windows-2022, the compiler lookup fails (see here for an example failing build: https://github.com/gromacs/gromacs/runs/5229802627?check_suite_focus=true). I just wanted to let you know about the issue in case you are planning to update the files here.

Thanks for the helpful tool!

Cheers

Paul

build fails with Mingw when used with gtest

I am using the example from gtest docs:

Here is my toplevel CMakeLists.txt:

cmake_minimum_required(VERSION 3.24)

project(
  test_mingw
  VERSION 0.1.0
  HOMEPAGE_URL ""
  LANGUAGES CXX
)

set(CMAKE_CXX_STANDARD 17)


include(FetchContent)
FetchContent_Declare(
  googletest
  URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)

# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)


add_executable(
  hello_test
  src/hello_test.cc
)
target_link_libraries(
  hello_test
  GTest::gtest_main
)

include(GoogleTest)
gtest_discover_tests(hello_test)

hello_test.cc:

#include <gtest/gtest.h>

TEST(HelloTest, BasicAssertions) {
  // Expect two strings not to be equal.
  EXPECT_STRNE("hello", "world");
  // Expect equality.
  EXPECT_EQ(7 * 6, 42);
}

int main(int argc, char **argv)
{
    testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}

It builds fine on Windows MSVC, Macos Clang, Linux GCC, but fails using Mingw GCC, here is error shown:

FAILED: hello_test.exe hello_test[1]_tests.cmake D:/a/tsst/tsst/build/hello_test[1]_tests.cmake 
cmd.exe /C "cd . && C:\ProgramData\chocolatey\bin\g++.exe -O3 -DNDEBUG  CMakeFiles/hello_test.dir/src/hello_test.cc.obj -o hello_test.exe -Wl,--out-implib,libhello_test.dll.a -Wl,--major-image-version,0,--minor-image-version,0  lib/libgtest_main.a  lib/libgtest.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cmd.exe /C "cd /D D:\a\tsst\tsst\build && D:\a\tsst\tsst\cmake-3.24.3-windows-x86_64\bin\cmake.exe -D TEST_TARGET=hello_test -D TEST_EXECUTABLE=D:/a/tsst/tsst/build/hello_test.exe -D TEST_EXECUTOR= -D TEST_WORKING_DIR=D:/a/tsst/tsst/build -D TEST_EXTRA_ARGS= -D TEST_PROPERTIES= -D TEST_PREFIX= -D TEST_SUFFIX= -D TEST_FILTER= -D NO_PRETTY_TYPES=FALSE -D NO_PRETTY_VALUES=FALSE -D TEST_LIST=hello_test_TESTS -D CTEST_FILE=D:/a/tsst/tsst/build/hello_test[1]_tests.cmake -D TEST_DISCOVERY_TIMEOUT=5 -D TEST_XML_OUTPUT_DIR= -P D:/a/tsst/tsst/cmake-3.24.3-windows-x86_64/share/cmake-3.24/Modules/GoogleTestAddTests.cmake""
CMake Error at D:/a/tsst/tsst/cmake-3.24.3-windows-x86_64/share/cmake-3.24/Modules/GoogleTestAddTests.cmake:112 (message):
  Error running test executable.

    Path: 'D:/a/tsst/tsst/build/hello_test.exe'
    Result: Exit code 0xc0000139

  

    Output:
      

Call Stack (most recent call first):
  D:/a/tsst/tsst/cmake-3.24.3-windows-x86_64/share/cmake-3.24/Modules/GoogleTestAddTests.cmake:225 (gtest_discover_tests_impl)


ninja: build stopped: subcommand failed.

Build works fine without building gtest, and it fails when building test executable with gtest

Working Directory

When I set the job directory using

defaults:
  run:
    working-directory: ./ARM_Lite_Compiler

the action fails in Configure, which yields

CMake Error at CMakeLists.txt:3 (PROJECT):
  Running

   'ninja' '--version'

  failed with:

   No such file or directory


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/home/runner/work/ARM_Lite/ARM_Lite/ARM_Lite_Compiler/build/CMakeFiles/CMakeOutput.log".
CMake Error at /home/runner/work/_temp/5f649009-61c2-41ed-8dbc-2bbb832adf25:32 (message):
  Bad exit status


Error: Process completed with exit code 1.

The work I am doing is here.

proposed changes to workflow

Would you accept a PR that does these things:

BTW: thank you so much for the clear article and example code here, it's been so useful.

code.qt.io down?

Wrong place, but where to report it? I am not a paying customer. Found no way to report it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.