Kaydet (Commit) 95de46e5 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Added helloworld test

üst bf924c60
......@@ -100,3 +100,10 @@ ENV/
#vi & vim swaps
*.swp
*.swo
#For helloworld
.deps/
CMakeCache.txt
CMakeFiles/
*.cmake
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.7
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/zaryob/Repositories/inary/tests/helloworld/helloworld
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/zaryob/Repositories/inary
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target install/strip
install/strip: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip
# Special rule for the target install/strip
install/strip/fast: install/strip
.PHONY : install/strip/fast
# Special rule for the target install/local
install/local: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local
# Special rule for the target install/local
install/local/fast: install/local
.PHONY : install/local/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
/usr/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake -P cmake_install.cmake
.PHONY : install
# Special rule for the target install
install/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/usr/bin/cmake -P cmake_install.cmake
.PHONY : install/fast
# Special rule for the target list_install_components
list_install_components:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
.PHONY : list_install_components
# Special rule for the target list_install_components
list_install_components/fast: list_install_components
.PHONY : list_install_components/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start /home/zaryob/Repositories/inary/CMakeFiles /home/zaryob/Repositories/inary/CMakeFiles/progress.marks
$(MAKE) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start /home/zaryob/Repositories/inary/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named helloworld
# Build rule for target.
helloworld: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 helloworld
.PHONY : helloworld
# fast build rule for target.
helloworld/fast:
$(MAKE) -f CMakeFiles/helloworld.dir/build.make CMakeFiles/helloworld.dir/build
.PHONY : helloworld/fast
src/helloworld.o: src/helloworld.cxx.o
.PHONY : src/helloworld.o
# target to build an object file
src/helloworld.cxx.o:
$(MAKE) -f CMakeFiles/helloworld.dir/build.make CMakeFiles/helloworld.dir/src/helloworld.cxx.o
.PHONY : src/helloworld.cxx.o
src/helloworld.i: src/helloworld.cxx.i
.PHONY : src/helloworld.i
# target to preprocess a source file
src/helloworld.cxx.i:
$(MAKE) -f CMakeFiles/helloworld.dir/build.make CMakeFiles/helloworld.dir/src/helloworld.cxx.i
.PHONY : src/helloworld.cxx.i
src/helloworld.s: src/helloworld.cxx.s
.PHONY : src/helloworld.s
# target to generate assembly for a file
src/helloworld.cxx.s:
$(MAKE) -f CMakeFiles/helloworld.dir/build.make CMakeFiles/helloworld.dir/src/helloworld.cxx.s
.PHONY : src/helloworld.cxx.s
src/utility.o: src/utility.cxx.o
.PHONY : src/utility.o
# target to build an object file
src/utility.cxx.o:
$(MAKE) -f CMakeFiles/helloworld.dir/build.make CMakeFiles/helloworld.dir/src/utility.cxx.o
.PHONY : src/utility.cxx.o
src/utility.i: src/utility.cxx.i
.PHONY : src/utility.i
# target to preprocess a source file
src/utility.cxx.i:
$(MAKE) -f CMakeFiles/helloworld.dir/build.make CMakeFiles/helloworld.dir/src/utility.cxx.i
.PHONY : src/utility.cxx.i
src/utility.s: src/utility.cxx.s
.PHONY : src/utility.s
# target to generate assembly for a file
src/utility.cxx.s:
$(MAKE) -f CMakeFiles/helloworld.dir/build.make CMakeFiles/helloworld.dir/src/utility.cxx.s
.PHONY : src/utility.cxx.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... install/strip"
@echo "... install/local"
@echo "... helloworld"
@echo "... rebuild_cache"
@echo "... edit_cache"
@echo "... install"
@echo "... list_install_components"
@echo "... src/helloworld.o"
@echo "... src/helloworld.i"
@echo "... src/helloworld.s"
@echo "... src/utility.o"
@echo "... src/utility.i"
@echo "... src/utility.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018, Suleyman POYRAZ (Zaryob)
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
from inary.actionsapi import cmaketools
from inary.actionsapi import inarytools
from inary.actionsapi import shelltools
from inary.actionsapi import get
WorkDir = "hello-cmake"
def setup():
cmaketools.configure()
def build():
cmaketools.make()
def install():
autotools.install()
inarytools.dodir("/var/opt/helloworld")
inarytools.dodoc("doc/hellodoc")
inarytools.doexe("helloworld", "/var/opt/helloworld")
inarytools.doinfo("doc/*")
inarytools.dolib("src/helloworld.o")
'''/opt/hello'''
inarytools.insinto("/var/opt/", "src/helloworld", "hello")
'''/opt/hi'''
inarytools.insinto("/var/opt/", "src/helloworld", "hi")
inarytools.domove("/var/opt/hello", "/opt/")
inarytools.domove("/opt/hi", "/var/", "goodbye")
inarytools.dobin("helloworld")
inarytools.dobin("helloworld", "/bin")
inarytools.dosbin("helloworld")
inarytools.dosbin("helloworld", "/sbin")
inarytools.dosed("src/helloworld.cpp", "Hello world", "Goodbye world")
inarytools.dosym("helloworld", "/usr/sbin/goodbye")
inarytools.dosym("helloworld", "/usr/bin/goodbye")
inarytools.dodir("/home/skeletuser")
inarytools.removeDir("/home/skeletuser")
inarytools.removeDir("/home")
inarytools.newdoc("src/helloworld.cpp", "goodbyeworld.cpp")
shelltools.touch("%s/opt/sulin" % get.installDIR())
shelltools.copy("%s/opt/sulin" % get.installDIR(), "%s/opt/skelet" % get.installDIR())
shelltools.move("%s/opt/sulin" % get.installDIR(), "%s/opt/SULIN" % get.installDIR())
shelltools.copytree("%s/opt/" % get.installDIR(), "%s/sys/" % get.installDIR())
shelltools.unlink("%s/sys/helloworld/helloworld" % get.installDIR())
shelltools.unlinkDir("%s/sys/helloworld" % get.installDIR())
libtools.gen_usr_ldscript("helloworld.o")
PROJECT (helloworld)
# CMake 2.6 required
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# Python is required
FIND_PACKAGE(PkgConfig)
# Application name
SET (APP_NAME "helloworld")
SET (APP_SUFFIX "2")
# Uncomment this for production releases.
SET (VERSION_SUFFIX "")
#SET (FLAGS "-g -O0 -Wcast-align -Wno-uninitialized -Wall -fstrict-aliasing")
SET (FLAGS "-g -O0 -Wno-uninitialized -Wall -fstrict-aliasing")
# Uncomment this for gprof profiling
# SET (FLAGS "-g -O0 -Werror -Wcast-align -Wno-uninitialized -Wall -fstrict-aliasing -fprofile-arcs -ftest-coverage")
SET (CMAKE_C_FLAGS "${FLAGS}")
# Uncomment this for sparse building
# SET (CMAKE_C_COMPILER cgcc)
# Append name suffix, if specified
IF (APP_SUFFIX)
SET (APP_NAME "${APP_NAME}${APP_SUFFIX}")
ENDIF (APP_SUFFIX)
INCLUDE_DIRECTORIES (include/)
# Define version, config dir, data dir and log file.
SET (SOURCES src/helloworld.cxx
src/utility.cxx)
# Compile scom from specified sources
ADD_EXECUTABLE (helloworld ${SOURCES})
# Install scom to /usr/bin/<app-name>
INSTALL (PROGRAMS helloworld
DESTINATION /usr/bin)
//
//
// ANSI Standard C++ Library Includes
//
//
// C++ Standard Library
#include <typeinfo>
#include <stdexcept>
#include <memory>
#include <new>
// Containers
#include <string>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <valarray>
#include <iterator>
#include <algorithm>
#include <functional>
#include <numeric>
// Adaptors
#include <queue>
#include <stack>
// I/O
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <locale>
#include <cstdlib>
#include <cstdio>
#include <cassert>
#include <cerrno>
#include <cfloat>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <ctime>
#include <cstring>
#include <clocale>
using namespace std;
// General Interface file
#ifndef General_Interface
#define General_Interface
#include "ciso.hxx"
#include "utility.hxx"
#endif
#ifndef Utility_Interface
#define Utility_Interface
#include "general.hxx"
namespace Utility {
class CPU_Time {
public:
CPU_Time() : clock_rep( clock() ) {} // current time
CPU_Time(clock_t c) : clock_rep(c) {}
//Time(time_t t) : time_rep(t) {}
//operator const time_t() { return time_rep; }
CPU_Time operator -(const CPU_Time rhs) {
return CPU_Time(clock_rep - rhs.clock_rep);
}
ostream& print(ostream& out = cout) {
out << double(clock_rep)/CLOCKS_PER_SEC << " seconds";
return out;
}
private:
clock_t clock_rep;
};
inline ostream& operator <<(ostream& out, CPU_Time t) {
return t.print(out);
}
// simple counter class
class Counter {
public:
Counter(int val): value(val) {}
int operator()() { return value++; }
int check() { return value; }
private:
int value;
};
// wrapper for rand functions
class Rand {
public:
static void init() {
seed += time(0);
srand(seed);
srand(rand());
}
static double rand_double (double upper_bound) {
return double(rand()) * upper_bound / RAND_MAX;
}
static int rand_int (int upper_bound) {
return rand() % upper_bound;
}
private:
static int seed;
};
} // namespace
#endif
#include "general.hxx"
int main(int argc, char *argv[])
{
cout << "Hello world" << endl;
return 0;
}
#include "utility.hxx"
namespace Utility {
int Rand::seed;
}
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE INARY SYSTEM "http://sulin.org/test/inary/inary-spec.dtd">
<INARY>
<Source>
<Name>helloworld</Name>
<Homepage>http://www.uludag.org.tr</Homepage>
<Packager>
<Name>John Blonde</Name>
<Email>john@blonde.com</Email>
</Packager>
<License>GPL-2</License>
<IsA>category</IsA>
<PartOf>component</PartOf>
<Summary xml:lang="en">ActionsAPI test suit</Summary>
<Description xml:lang="en">ActionsAPI test suit</Description>
<Archive type="tarxz" sha1sum="650ff7153aaec65aef71563068154617ca8913d0">http://localhost/helloworld.tar.xz</Archive>
</Source>
<Package>
<Name>helloworld</Name>
<Files>
<Path fileType="binary">/</Path>
</Files>
</Package>
<History>
<Update release="1">
<Date>2018-04-28</Date>
<Version>2.0</Version>
</Update>
</History>
</INARY>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment