forked from open-simh/simh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: Ibm1130 simulator build updates
- Add the missing ibm1130.rc GUI resource file to the Windows build so that the GUI renders correctly. - Add a CMakeLists.txt for the IBM1130 utilities. The utilities install in the BIN/ibm1130-utilties subdirectory for Linux, macOS, and BIN/ibm1130-utilities/{Release|Debug} for Windows. Not currently part of the open-simh packaging. - Add "TEST_ARGS" argument to CMake's add_simulator function to disable the IBM 1130 GUI when running RegisterSanityCheck. This fixes an edge case Heisenbug encountered during Github CI/CD tests where ibm1130 appears to hang indefinitely. The cause is the GUI's Pump() thread function being prematurely terminated before all GUI resources are acquired. The net result is an infinite loop in the MS C runtime trying to exit the process while releasing half acquired resources. Note that this never shows up on non-Windows platforms or the SIMH makefile. - Ibm1130/ibm1130_cr.c - Fix printf() warnings (format should be long, not int) - Signed/unsigned mismatch, size_t for array indexing - utils: - Fix warnings in printf() statements (mostly) that are now errors identified by Ubuntu (Linux gcc) build. - Assignments to lvalue casts (e.g., "((uint16 *) buf) += nw") are no longer legitimate C. - Insert const-correctness where suggested, reduce scope on variables when possible and fix unsigned comparisons. - Make some allowances for MSVCRT deprecated function names.
- Loading branch information
Showing
18 changed files
with
385 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
##~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= | ||
## Additional IBM 1130 utilities. Note that these are packaged with the | ||
## ibm1130software.zip file within the ibm1130.zip archive on ibm1130.org. | ||
## | ||
## Where do the resulting executables go? | ||
## Not Windows: BIN/ibm1130-utils | ||
## Windows: BIN/ibm1130-utils/<CONFIG>, where <CONFIG> is Debug, Release | ||
##~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~= | ||
|
||
set(IBM1130_UTILS asm1130 bindump checkdisk disklist diskview mkboot punches) | ||
|
||
## Each utility is created separately -- it could be a foreach loop at the | ||
## risk of reducing future flexibility. | ||
|
||
add_executable(asm1130 asm1130.c util_io.c) | ||
add_executable(bindump bindump.c util_io.c) | ||
add_executable(checkdisk checkdisk.c util_io.c) | ||
add_executable(disklist disklist.c util_io.c) | ||
add_executable(diskview diskview.c util_io.c) | ||
add_executable(mkboot mkboot.c util_io.c) | ||
add_executable(punches punches.c util_io.c) | ||
|
||
## Set the executable output directory: | ||
foreach(util IN LISTS IBM1130_UTILS) | ||
set_target_properties(${util} PROPERTIES | ||
RUNTIME_OUTPUT_DIRECTORY "${SIMH_LEGACY_INSTALL}/ibm1130-utils/" | ||
) | ||
endforeach() | ||
|
||
## Meta-target to build all of the utilites: | ||
add_custom_target(ibm1130-utils DEPENDS ${IBM1130_UTILS}) |
Oops, something went wrong.