diff --git a/AutomatedTests/CMakeLists.txt b/AutomatedTests/CMakeLists.txt index 7b49a44b3c..e5038c0283 100644 --- a/AutomatedTests/CMakeLists.txt +++ b/AutomatedTests/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.3) find_program(LAUNCH_APPL LaunchAPPL PATH "${CMAKE_INSTALL_PREFIX}/../bin/") execute_process(COMMAND ${LAUNCH_APPL} --list-emulators OUTPUT_VARIABLE EMULATOR_LIST) -separate_arguments(EMULATOR_LIST) +string(REPLACE "\n" ";" EMULATOR_LIST ${EMULATOR_LIST}) if(CMAKE_SYSTEM_NAME MATCHES "RetroCarbon") if("carbon" IN_LIST EMULATOR_LIST) @@ -19,6 +19,7 @@ else() set(RETRO68_LAUNCH_METHOD NONE CACHE String "How to launch Mac applications (for automated testing)") endif() endif() + set(RETRO68_TEST_CONFIG "--timeout=10" CACHE String "Options to pass to LaunchAPPL when running tests") if(RETRO68_LAUNCH_METHOD MATCHES "NONE") diff --git a/CMakeLists.txt b/CMakeLists.txt index dd10799454..62b549c54c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,9 @@ cmake_minimum_required(VERSION 3.3) project(Retro) set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED TRUE) +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD_REQUIRED TRUE) if(CMAKE_SYSTEM_NAME MATCHES Retro.*) diff --git a/LaunchAPPL/MakeExecutable.cc b/LaunchAPPL/MakeExecutable.cc index b2f08304b5..5d3f5c58e6 100644 --- a/LaunchAPPL/MakeExecutable.cc +++ b/LaunchAPPL/MakeExecutable.cc @@ -1,5 +1,6 @@ #include #include +#include #include #include diff --git a/LaunchAPPL/MiniVMac.cc b/LaunchAPPL/MiniVMac.cc index d1bc432e28..ac0d2ae422 100644 --- a/LaunchAPPL/MiniVMac.cc +++ b/LaunchAPPL/MiniVMac.cc @@ -63,7 +63,7 @@ static void copyDirectoryRecursively(const fs::path& sourceDir, const fs::path& for (const auto& dirEnt : fs::recursive_directory_iterator{sourceDir}) { const auto& path = dirEnt.path(); - auto relativePathStr = path.lexically_relative(sourceDir); + auto relativePathStr = path.string().substr(sourceDir.string().size()); fs::copy(path, destinationDir / relativePathStr); } } diff --git a/README.md b/README.md index e7756fe3a9..5325cbb324 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ the build directory. If you're building this on a PowerMac running Mac OS X 10.4, tell the build script to use the gcc you've installed via tigerbrew: - ../Retro68/build-toolchain.bash --host-cxx-compiler=g++-5 + ../Retro68/build-toolchain.bash --host-cxx-compiler=g++-5 --host-c-compiler=gcc-5 ### Build options and recompiling diff --git a/build-toolchain.bash b/build-toolchain.bash index 55a75c2fbe..339acb2acf 100755 --- a/build-toolchain.bash +++ b/build-toolchain.bash @@ -64,7 +64,11 @@ for ARG in $*; do CLEAN_AFTER_BUILD=true ;; --host-cxx-compiler=*) - HOST_CMAKE_FLAGS[${#HOST_CMAKE_FLAGS}]="-DCMAKE_CXX_COMPILER=${ARG#*=}" + HOST_CMAKE_FLAGS[${#HOST_CMAKE_FLAGS[@]}]="-DCMAKE_CXX_COMPILER=${ARG#*=}" + ;; + --host-c-compiler=*) + HOST_CMAKE_FLAGS[${#HOST_CMAKE_FLAGS[@]}]="-DCMAKE_C_COMPILER=${ARG#*=}" + HOST_C_COMPILER="${ARG#*=}" ;; --help) usage