windows cmake mingw生成

cmake -G”Unix Makefiles”要这样才可以,




D:\My Documents\qtproject\llvm\test_cmake>cmake -G”Unix Makefiles”
— The C compiler identification is GNU 4.5.0
— The CXX compiler identification is GNU 4.5.0
— Check for working C compiler: E:/Programe/MinGW/bin/cc.exe
— Check for working C compiler: E:/Programe/MinGW/bin/cc.exe — works
— Detecting C compiler ABI info
— Detecting C compiler ABI info – done
— Check for working CXX compiler: E:/Programe/MinGW/bin/g++.exe
— Check for working CXX compiler: E:/Programe/MinGW/bin/g++.exe — works
— Detecting CXX compiler ABI info
— Detecting CXX compiler ABI info – done
— Config
        
    

mingw clang compiler-rt 编译错误

错误信息提示如下:


[ 0%] Built target compiler-rt-headers
[ 0%] Building C object projects/compiler-rt/lib/CMakeFiles/clang_rt.i386.dir/enable_execute_stack.c.obj
D:\llvm-3.3.src\projects\compiler-rt\lib\enable_execute_stack.c:13:22: fatal error: sys/mman.h: No such file or director
y
compilation terminated.
mingw32-make.exe[2]: *** [projects/compiler-rt/lib/CMakeFiles/clang_rt.i386.dir/enable_execute_stack.c.obj] Error 1
mingw32-make.exe[1]: *** [projects/compiler-rt/lib/CMakeFiles/clang_rt.i386.dir/all] Error 2
mingw32-make.exe: *** [all] Error 2
发现mingw include路径下没有sys/mman.h 然后去下载个,这个过程找了好久。妹的,最后贴出下载

自动删除共享内存key


ipcs|grep evildev|awk ‘{cmd=””;if($1==”m”) cmd=”ipcrm -M “$3; else if($1==”s”) cmd=”ipcrm -S “$3; else if($1==”q”) cmd=”ipcrm -Q”$3;print cmd ;system(cmd);}’
 
ipcs|grep evildev|awk ‘{cmd=””;if($1==”m”) cmd=”ipcrm -M “$3; else if($1==”s”) cmd=”ipcrm -S “$3; else if($1==”q”) cmd=”ipcrm -Q”$3;print cmd ;system(cmd);}’