[PATCH] D35898: [OCaml] Respect CMAKE_C_FLAGS for OCaml C files

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 14:15:44 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL309320: [OCaml] Respect CMAKE_C_FLAGS for OCaml C files (authored by mgorny).

Changed prior to commit:
  https://reviews.llvm.org/D35898?vs=108303&id=108524#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D35898

Files:
  llvm/trunk/cmake/modules/AddOCaml.cmake


Index: llvm/trunk/cmake/modules/AddOCaml.cmake
===================================================================
--- llvm/trunk/cmake/modules/AddOCaml.cmake
+++ llvm/trunk/cmake/modules/AddOCaml.cmake
@@ -83,7 +83,7 @@
   endforeach()
 
   string(REPLACE ";" " " ARG_CFLAGS "${ARG_CFLAGS}")
-  set(c_flags "${ARG_CFLAGS} ${LLVM_DEFINITIONS}")
+  set(c_flags "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${ARG_CFLAGS} ${LLVM_DEFINITIONS}")
   foreach( include_dir ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR} )
     set(c_flags "${c_flags} -I${include_dir}")
   endforeach()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35898.108524.patch
Type: text/x-patch
Size: 596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170727/568b0064/attachment.bin>


More information about the llvm-commits mailing list