Skip to content

Instantly share code, notes, and snippets.

@simonlynen
Created October 20, 2014 16:29
Show Gist options
  • Save simonlynen/c1f7ec7c235f1ce21d53 to your computer and use it in GitHub Desktop.
Save simonlynen/c1f7ec7c235f1ce21d53 to your computer and use it in GitHub Desktop.
clang omp osx mex
--- /Users/slynen/Desktop/mex_C++_maci64.xml 2014-10-20 15:45:15.000000000 +0200
+++ /Users/slynen/Desktop/mex_C++_maci64_patched.xml 2014-10-20 18:27:14.000000000 +0200
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<config
- Name="Xcode Clang++"
- ShortName="Clang++"
+ Name="Clang-OMP"
+ ShortName="Clang-OMP"
Manufacturer="Apple"
Version=""
Language="C++"
@@ -27,16 +27,16 @@
CMDLINE200="$LDXX $LDFLAGS $LINKOPTIM $LINKEXPORT $OBJS $CXXLIBS $LINKLIBS -o $EXE"
CMDLINE300="rm -f $OBJ"
- CXX="$XCRUN_DIR/xcrun -sdk macosx$SDKVER clang++"
+ CXX="$XCRUN_DIR/xcrun -sdk macosx$SDKVER /Users/slynen/clang_omp/llvm/build/Release/bin/clang2++"
DEFINES="$MATLABMEX"
MATLABMEX="-DMATLAB_MEX_FILE "
- CXXFLAGS="-fno-common -arch x86_64 -mmacosx-version-min=$SDKVER -fexceptions -isysroot $ISYSROOT -fobjc-arc"
- INCLUDE="-I&quot;$MATLABROOT/extern/include&quot; -I&quot;$MATLABROOT/simulink/include&quot;"
+ CXXFLAGS="-fno-common -fopenmp -arch x86_64 -mmacosx-version-min=$SDKVER -fexceptions -isysroot $ISYSROOT -fobjc-arc"
+ INCLUDE="-I&quot;$MATLABROOT/extern/include&quot; -I&quot;$MATLABROOT/simulink/include&quot; -I&quot;/Library/Developer/CommandLineTools/usr/include/c++/v1/&quot;"
CXXOPTIMFLAGS="-O2 -DNDEBUG"
CXXDEBUGFLAGS="-g"
LDXX="$CXX"
- LDFLAGS="-Wl,-twolevel_namespace -undefined error -arch x86_64 -mmacosx-version-min=$SDKVER -Wl,-syslibroot,$ISYSROOT -framework Cocoa $LDBUNDLE $LINKEXPORT"
+ LDFLAGS="-Wl,-twolevel_namespace -fopenmp -L/Users/slynen/clang_omp/openmp -undefined error -arch x86_64 -mmacosx-version-min=$SDKVER -Wl,-syslibroot,$ISYSROOT -framework Cocoa $LDBUNDLE $LINKEXPORT"
LDBUNDLE="-bundle "
LINKEXPORT="-Wl,-exported_symbols_list,&quot;$MATLABROOT/extern/lib/maci64/mexFunction.map&quot;"
LINKLIBS="-L&quot;$MATLABROOT/bin/maci64&quot; -lmx -lmex -lmat"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment