Unverified Commit ca53d70f authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

Merge pull request #324905 from pwaller/hello-cpp

hello-cpp: init
parents f27f2d51 f2603c72
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
{
  cmake,
  lib,
  ninja,
  stdenv,
}:

stdenv.mkDerivation {
  name = "hello-cpp";
  src = ./src;
  nativeBuildInputs = [ cmake ninja ];
  meta = {
    description = "Basic sanity check that C++ and cmake infrastructure are working";
    platforms = lib.platforms.all;
    maintainers = stdenv.meta.maintainers or [];
    mainProgram = "hello-cpp";
  };
}
+6 −0
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.10)
project(hello-cpp)

add_executable(hello-cpp main.cpp)

install(TARGETS hello-cpp)
+6 −0
Original line number Diff line number Diff line
#include <iostream>

int main(int argc, char *argv[]) {
    std::cout << "Hello, C++\n";
    return 0;
}