Commit acd214b5 authored by Malte Heithoff's avatar Malte Heithoff
Browse files

Build test

parent c91661de
cmake_minimum_required(VERSION 3.0)
enable_language(CXX)
set(SERIALLOOPINCLUDE target/generated-sources-cpp/serialLoop)
set(SIMPLELOOPINCLUDE target/generated-sources-cpp/simpleLoop)
set(OSCILLATIONINCLUDE target/generated-sources-cpp/oscillation)
add_subdirectory(${SERIALLOOPINCLUDE})
add_subdirectory(${SIMPLELOOPINCLUDE})
add_subdirectory(${OSCILLATIONINCLUDE})
add_subdirectory(looptest)
\ No newline at end of file
if exist build del /F /Q build
mkdir build
cd build
cmake ..
cmake --build . --config release
cd ..
\ No newline at end of file
rm -rf build
mkdir build && cd build
cmake ..
cmake --build . --config release
cd ..
\ No newline at end of file
cmake_minimum_required(VERSION 3.5)
project(LoopTest CXX)
set(CMAKE_CXX_STANDARD 11)
message("JO ${CMAKE_CURRENT_SOURCE_DIR} ${OSCILLATIONINCLUDE}")
add_executable(Oscillation mainOscillation.cpp)
target_include_directories(Oscillation PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(Oscillation de_monticore_lang_monticar_semantics_loops_oscillation ${LIBS})
export(TARGETS Oscillation FILE Oscillation.cmake)
add_executable(SerialLoop mainSerialLoop.cpp)
target_include_directories(SerialLoop PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(SerialLoop de_monticore_lang_monticar_semantics_loops_serialLoop ${LIBS})
export(TARGETS SerialLoop FILE SerialLoop.cmake)
add_executable(SimpleLoop mainSimpleLoop.cpp)
target_include_directories(SimpleLoop PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(SimpleLoop de_monticore_lang_monticar_semantics_loops_simpleLoop ${LIBS})
export(TARGETS SimpleLoop FILE SimpleLoop.cmake)
#include "de_monticore_lang_monticar_semantics_loops_oscillation.h"
int main(int argc, char** argv)
{
de_monticore_lang_monticar_semantics_loops_oscillation instance;
instance.init();
int i;
for (i=1; i<atof(argv[1]); i++) {
instance.execute();
std::cout << instance.out1 << "\n";
}
return 0;
}
\ No newline at end of file
#include "de_monticore_lang_monticar_semantics_loops_serialLoop.h"
int main(int argc, char** argv)
{
de_monticore_lang_monticar_semantics_loops_serialLoop instance;
instance.init();
int i;
for (i=1; i<argc; i++) {
instance.in1 = atof(argv[i]);
instance.execute();
std::cout << instance.out1 << "\n";
}
return 0;
}
\ No newline at end of file
#include "de_monticore_lang_monticar_semantics_loops_simpleLoop.h"
int main(int argc, char** argv)
{
de_monticore_lang_monticar_semantics_loops_simpleLoop instance;
instance.init();
int i;
for (i=1; i<argc; i++) {
instance.in1 = atof(argv[i]);
instance.execute();
std::cout << instance.out1 << "\n";
}
return 0;
}
\ No newline at end of file
Supports Markdown
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