Skip to content

Commit 8cc1067

Browse files
Fixes #308, update Readme about CLang
Fixes #310 Add -DPCEM_MARCH to allow changing to different Arch for optimizations.
1 parent 850ef6e commit 8cc1067

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} -DDEBUG")
4040
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} -DDEBUG")
4141

4242
if(${PCEM_CPU_TYPE} STREQUAL "x86_64")
43-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=x86-64-v2 -D_FILE_OFFSET_BITS=64")
44-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64-v2 -D_FILE_OFFSET_BITS=64")
43+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64")
44+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64")
4545
endif()
4646

4747
set(PCEM_VERSION_STRING "vNext" CACHE STRING "PCem Version String")
@@ -58,6 +58,13 @@ message("System Processor: ${PCEM_CPU_TYPE}")
5858
message("PCem Display Engine: ${PCEM_DISPLAY_ENGINE}")
5959
message("***************************************************************")
6060

61+
if(${PCEM_CPU_TYPE} STREQUAL "x86_64")
62+
set(PCEM_MARCH "x86-64-v2" CACHE STRING "march CPU architecture")
63+
message("MArch: ${PCEM_MARCH}")
64+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=${PCEM_MARCH}")
65+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${PCEM_MARCH}")
66+
endif()
67+
6168
option(PLUGIN_ENGINE "Build PCem with plugin support" ON)
6269
message("Plugin Support: ${PLUGIN_ENGINE}")
6370

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# [PCem](https://pcem-emulator.co.uk/)
22
![Test Debug Builds](https://github.com/sarah-walker-pcem/pcem/actions/workflows/test-debug-builds.yml/badge.svg)
33
![Test Release Builds](https://github.com/sarah-walker-pcem/pcem/actions/workflows/test-release-builds.yml/badge.svg)
4+
![Test Release Builds (With Logging and Debugging)](https://github.com/sarah-walker-pcem/pcem/actions/workflows/test-relwithdebinfo-builds.yml/badge.svg)
5+
46
## Download: [Windows](https://pcem-emulator.co.uk/files/PCemV17Win.zip)/[Linux](https://pcem-emulator.co.uk/files/PCemV17Linux.tar.gz)/[vNext (Wise Global Solutions Mirror)](https://mirror.wiseglobalsolutions.com/pcem/)
57

68
Latest version: <b>v17</b> [Changelog](CHANGELOG.md)
@@ -19,23 +21,19 @@ You will need the following libraries and buildtools (and their dependencies):
1921
- OpenAL
2022
- CMake
2123
- Ninja (Recommended, but you can use a Makefile generator if you prefer)
24+
- CLang Toolchain
2225

23-
Open a terminal window, navigate to the PCem directory then enter:
26+
Open a terminal window, navigate to the PCem directory, create a build directory, then enter in that build directory:
2427
### Linux/BSD
2528
```
26-
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release .
27-
ninja
28-
```
29-
30-
### Windows (MSYS2)
31-
```
32-
cmake -G "Ninja" -DMSYS=TRUE -DCMAKE_BUILD_TYPE=Release .
29+
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release ..
3330
ninja
3431
```
3532

3633
then `./src/pcem` to run.
3734

38-
The Linux/BSD versions store BIOS ROM images, configuration files, and other data in `~/.pcem`
35+
BIOS ROM images, configuration files, and other data are stored in `~/.pcem`. You can also create a `.pcem` folder with
36+
the Binary, and run it in a portable mode.
3937

4038
You can specify the Display Engine using `-DPCEM_DISPLAY_ENGINE=` The only valid option you have at this time is
4139
wxWidgets
@@ -49,7 +47,9 @@ default value.
4947
-DUSE_PCAP_NETWORKING=ON : Build with pcap networking support. (Needs USE_NETWORKING to compile) Requires libpcap.
5048
-DUSE_ALSA=OFF : Build with support for MIDI output through ALSA. Requires libasound. (Linux Only)
5149
-DFORCE_X11=ON : Enables a hack to force X11 on Wayland systems. See #128 for details. (Linux Only)
52-
-DPLUGIN_ENGINE=ON : Build with plugin support. Builds libpcem-plugin-api and links PCem with it.
50+
-DPLUGIN_ENGINE=ON : Build with plugin support. Builds libpcem-plugin-api and links PCem with it.
51+
-DPCEM_MARCH=x86_64-v2 : Change the architecture used for generated instructions, by default we set it for
52+
>= Nehalem for Intel, and >= Bulldozer for AMD.
5353
```
5454

5555
If you are using -DCMAKE_BUILD_TYPE=Debug, there are some more debug options you can enable if needed

0 commit comments

Comments
 (0)