[Openmp-dev] Newest CMake build system patch

Peyton, Jonathan L jonathan.l.peyton at intel.com
Thu Jul 17 14:04:23 PDT 2014


New features:
1) Option to use build.pl-like build by specifying -DUSE_BUILDPL_RULES=true|false , default is false.  When true, on Linux and Windows, builds will be compiled with debug info and optimization turned on (-g -O2) and then after the build is finished the debug info is stripped out into a separate file (libiomp5.dbg).
2) Use CMAKE_BUILD_TYPE=Release/Debug/RelWithDebInfo, default is Release (except on Visual Studio it is Debug.  I don't know why).  CMake will automatically control debug and -O flags this way.  Got rid of build_type option.
3) Got rid of .dir build recipe and instead use file(make_directory ...)
4) Very basic Visual Studio support.  Can be compiled with Unix Makefiles or NMake Makefiles on Windows.
5) Got rid of all compiler flags,  so no more if(${CLANG}) or anything like that.
6) There are tool chain files for popular compilers within the cmake/ directory.  For example, there is cmake/GNU/AsmFlags.cmake cmake/GNU/CFlags.cmake and cmake/GNU/FortranFlags.cmake.
These can be expanded by seeing how CMake defines ${CMAKE_C_COMPILER_ID} for a particular compiler and then adding a directory within cmake/ called ${CMAKE_C_COMPILER_ID} and then creating AsmFlags.cmake and CFlags.cmake.  If these files don't exist for a particular compiler, a warning is given to the user.
7) Option to either use or disregard predefined linker flags by specifying -DUSE_PREDEFINED_LINKER_FLAGS=true|false, default is true.  When true, the linker flags inside CommonFlags.cmake are used.  When false, they are ignored and the default CMake linker flags are used.
8) Option to either use or disregard adaptive locks (TSX-based x86 locks) by specifying -DUSE_ADAPTIVE_LOCKS=true|false, default is true for IA-32 and Intel(r) 64 architectures, false otherwise.
9) Options to APPEND user specific flags via:
-DUSER_C_FLAGS=<C Compiler flags>
-DUSER_CXX_FLAGS=<C++ Compiler flags>
-DUSER_ASM_FLAGS=<asm flags>
-DUSER_LD_FLAGS=<linker flags>
-DUSER_LD_LIB_FLAGS=<linked in libraries>
-DUSER_F_FLAGS=<Fortran Compiler flags>

Some of these details are in Build_With_CMake.txt.

To remove previous patches:
patch -p0 -RE < initial_intel_cmake.patch
patch -p0 -RE < second_intel_cmake.patch

To apply this patch:
patch -p0 < third_intel_cmake.patch

I am hoping this is going to get pushed to trunk.  Then we can make smaller changes to it.
Questions? Comments?

-- Johnny

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20140717/51fc06a0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: third_intel_cmake.patch
Type: application/octet-stream
Size: 134206 bytes
Desc: third_intel_cmake.patch
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20140717/51fc06a0/attachment.obj>


More information about the Openmp-dev mailing list