diff --git a/com.amd.aparapi.jni/build.xml b/com.amd.aparapi.jni/build.xml index 990caf723f1c67a224b93aca08f1c49e59112c69..7a06656b235cd7a12bc619be3e745eb522b00979 100644 --- a/com.amd.aparapi.jni/build.xml +++ b/com.amd.aparapi.jni/build.xml @@ -529,7 +529,6 @@ First consider editing the properties in build.properties <arg value="-g" /> <arg value="-fPIC" /> <arg value="-I/System/Library/Frameworks/JavaVM.framework/Headers" /> - <arg value="-I/System/Library/Frameworks/OpenCL.framework/Headers" /> <arg value="-Iinclude" /> <arg value="-shared" /> <arg value="-o" /> @@ -543,6 +542,7 @@ First consider editing the properties in build.properties <arg value="src/cpp/clHelper.cpp" /> <arg value="-framework" /> <arg value="OpenCL" /> + <arg value="-Wno-write-strings" /> </exec> </target> @@ -627,6 +627,22 @@ First consider editing the properties in build.properties </exec> </target> - <target name="cltest" depends="check,msvc_cltest" /> + <target name="mac_cltest" if="use.gcc_mac"> + <mkdir dir="${basedir}/dist"/> + <echo message="gcc cltest ${os.arch}" /> + <exec executable="g++"> + <arg value="-O3" /> + <arg value="-g" /> + <arg value="-fPIC" /> + <arg value="-I/System/Library/Frameworks/JavaVM.framework/Headers" /> + <arg value="-Iinclude" /> + <arg value="-o" /> + <arg value="${basedir}/dist/cltest" /> + <arg value="src/cpp/cltest.cpp" /> + <arg value="-framework" /> + <arg value="OpenCL" /> + </exec> + </target> + <target name="cltest" depends="check,msvc_cltest,mac_cltest" /> </project> diff --git a/com.amd.aparapi.jni/src/cpp/cltest.cpp b/com.amd.aparapi.jni/src/cpp/cltest.cpp index 8ec9d9978165b38a7aecc15a60e81e8aa2a650dc..9604dbeb9e44ea0677b44887185810f4193b04a4 100644 --- a/com.amd.aparapi.jni/src/cpp/cltest.cpp +++ b/com.amd.aparapi.jni/src/cpp/cltest.cpp @@ -16,7 +16,7 @@ #ifndef __APPLE__ #include <CL/cl.h> #else -#include <cl.h> +#include <opencl/opencl.h> #endif diff --git a/com.amd.aparapi.jni/src/cpp/common.h b/com.amd.aparapi.jni/src/cpp/common.h index 0ee588e6121a147cfa771ddc0e55db6ea2811768..1abcb7e907b5c5128614b3067c2c806dd8d6d316 100644 --- a/com.amd.aparapi.jni/src/cpp/common.h +++ b/com.amd.aparapi.jni/src/cpp/common.h @@ -56,7 +56,7 @@ #ifndef __APPLE__ #include <CL/cl.h> #else -#include <cl.h> +#include <opencl/opencl.h> #endif #include <jni.h>