Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: CMakeLists.txt

Issue 1960393002: Subzero: Add necessary PNaCl files for standalone build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero@master
Patch Set: make format Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Makefile.standalone » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b786204a09cd9436c9cb5ea9639e1b62ac25a8d3..bc0175c12910fcef6d439ffe44e9f7963a2360d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,14 +1,29 @@
+unset(PNACL_LLVM)
+# Define PNACL_LLVM for LLVM_VERSION <= 3.7
+if((NOT LLVM_VERSION_MAJOR GREATER 3) AND (NOT LLVM_VERSION_MINOR GREATER 7))
+ set(PNACL_LLVM 1)
+endif()
+
+if(PNACL_LLVM)
+ add_definitions(
+ -DPNACL_LLVM
+ )
+ set(PNACL_EXTRA_COMPONENTS NaClBitReader NaClBitTestUtils)
+else()
+ include_directories(pnacl-llvm/include)
+ file(GLOB pnacl_llvm_SRCS "pnacl-llvm/*.cpp")
+endif()
+
set(LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
Core
IRReader
- NaClBitReader
- NaClBitTestUtils
Support
+ ${PNACL_EXTRA_COMPONENTS}
)
file(GLOB pnacl_sz_SRCS "src/*.cpp")
-add_llvm_tool(pnacl-sz ${pnacl_sz_SRCS})
+add_llvm_tool(pnacl-sz ${pnacl_sz_SRCS} ${pnacl_llvm_SRCS})
if(PNACL_BROWSER_TRANSLATOR)
add_definitions(
@@ -35,11 +50,4 @@ else()
add_compile_options(-Wno-undefined-var-template)
endif()
-# Define PNACL_LLVM for LLVM_VERSION <= 3.7
-if((NOT LLVM_VERSION_MAJOR GREATER 3) AND (NOT LLVM_VERSION_MINOR GREATER 7))
- add_definitions(
- -DPNACL_LLVM
- )
-endif()
-
target_link_libraries(pnacl-sz pthread)
« no previous file with comments | « no previous file | Makefile.standalone » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698