Open dr-kd opened 1 year ago
Clearly, when CMake was generating the command to compile the test program, it put an empty string as the value for the -arch
option.
This is a wild guess: could you make this change to the top of CMakeLists.txt
and try again?
cmake_minimum_required(VERSION 3.12)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version")
-set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)" CACHE STRING "" FORCE)
+set(CMAKE_OSX_ARCHITECTURES "${ARCHS_STANDARD}" CACHE STRING "" FORCE)
That is, change the round brackets to curly brackets around ARCHS_STANDARD
.
Applying that patch caused a successful build. Thank you very much.
In lieu of a pull request, here's the actual diff - I'll leave it to someone who knows better to do the mechanics of it:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a57ef15..0a5b3af 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version")
-set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD)" CACHE STRING "" FORCE)
+set(CMAKE_OSX_ARCHITECTURES "${ARCHS_STANDARD}" CACHE STRING "" FORCE)
set(JUCE_ENABLE_MODULE_SOURCE_GROUPS ON CACHE BOOL "" FORCE)
set_property(GLOBAL PROPERTY USE_FOLDERS YES)
@singingfish Good news. I am curious what ARCHS_STANDARD
actually is. If you have time, could you add the line
message("ARCHS_STANDARD='${ARCHS_STANDARD}'")
near the top of CMakeLists.txt
and run cmake ..
in your build directory? You don't have to recompile (i.e. you don't have to run cmake --build .
) This should print out its value; I am wondering if it is populated on OSX.
Anyway, I'll do a PR for this soon.
Here's the error log after following the build instructions:
xcode version is: