File tree Expand file tree Collapse file tree 6 files changed +40
-0
lines changed
Expand file tree Collapse file tree 6 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.0.0)
2+
3+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /bin)
4+ add_subdirectory ( "src" )
Original file line number Diff line number Diff line change 1+ FROM spritsail/alpine-cmake:latest as builder
2+
3+ WORKDIR /app
4+ ADD . /app
5+ RUN mkdir build && cd build && cmake .. && make
6+
7+ FROM alpine:latest as runner
8+ COPY --from=builder /app/build/bin /usr/bin
9+ CMD ["hello_world" ]
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.0.0)
2+ project (hello_world VERSION 0.1.0)
3+
4+ include (CTest)
5+ enable_testing ()
6+
7+ add_executable (hello_world main.cpp mybody.cpp)
8+
9+ target_link_libraries (hello_world PUBLIC "-static" )
10+ set (CPACK_PROJECT_NAME ${PROJECT_NAME} )
11+ set (CPACK_PROJECT_VERSION ${PROJECT_VERSION} )
12+ include (CPack)
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ #include " myheader.h"
3+
4+ int main (){
5+ std::cout << greeting ( " World!" ) << std::endl;
6+ }
Original file line number Diff line number Diff line change 1+ #include " myheader.h"
2+
3+ std::string greeting ( const std::string& who )
4+ {
5+ return " Hello " + who;
6+ }
Original file line number Diff line number Diff line change 1+ #include < string>
2+
3+ std::string greeting ( const std::string& who );
You can’t perform that action at this time.
0 commit comments