File tree Expand file tree Collapse file tree 7 files changed +557
-545
lines changed
Expand file tree Collapse file tree 7 files changed +557
-545
lines changed Original file line number Diff line number Diff line change 2626 cd build
2727 cmake ..
2828 make
29+ echo "Build completed successfully."
30+ echo "testing build output"
31+ make run
2932
3033 - name : Build Debian Package
3134 run : |
Original file line number Diff line number Diff line change 2727 cd build
2828 cmake ..
2929 make
30+ echo "Build completed successfully."
31+ echo "Testing build output"
32+ make run
Original file line number Diff line number Diff line change 1- # Minimum CMake version required
2- cmake_minimum_required (VERSION 3.5)
1+ cmake_minimum_required (VERSION 3.10)
32
4- # Set the project name
5- project (nepdate-cli)
3+ project (nepdate-cli VERSION 2.0.0)
4+
5+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /bin)
6+
7+ add_executable (nepdate-cli src/main.cpp)
8+
9+ # Allow user to override this on cmake command line
10+ if (NOT DEFINED CMAKE_INSTALL_PREFIX )
11+ set (CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "Install path prefix" )
12+ endif ()
13+
14+ install (TARGETS nepdate-cli
15+ RUNTIME DESTINATION bin
16+ )
17+
18+ configure_file (
19+ "${CMAKE_CURRENT_SOURCE_DIR} /cmake_uninstall.cmake.in"
20+ "${CMAKE_CURRENT_BINARY_DIR} /cmake_uninstall.cmake"
21+ IMMEDIATE @ONLY
22+ )
23+
24+ add_custom_target (uninstall
25+ COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR} /cmake_uninstall.cmake
26+ )
27+
28+ add_custom_target (run
29+ COMMAND $<TARGET_FILE:nepdate-cli>
30+ DEPENDS nepdate-cli
31+ WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
32+ )
633
7- # Add the src subdirectory
8- add_subdirectory (src)
Original file line number Diff line number Diff line change 1+ set (INSTALL_MANIFEST_FILE "@CMAKE_BINARY_DIR@/install_manifest.txt" )
2+
3+ if (NOT EXISTS "${INSTALL_MANIFEST_FILE} " )
4+ message (FATAL_ERROR "Cannot find install manifest: ${INSTALL_MANIFEST_FILE} " )
5+ endif ()
6+
7+ file (READ "${INSTALL_MANIFEST_FILE} " files )
8+ string (REPLACE "\n " ";" files "${files} " )
9+
10+ foreach (file ${files} )
11+ message (STATUS "Removing ${file} " )
12+ execute_process (COMMAND ${CMAKE_COMMAND} -E remove "${file} " )
13+ endforeach ()
14+
15+ file (REMOVE "${INSTALL_MANIFEST_FILE} " )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments