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

Side by Side Diff: CMakeLists.txt

Issue 904473004: Rebased localmods in libcxx to 223109. (Closed)
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « .gitignore ('k') | OWNERS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # See www/CMake.html for instructions on how to build libcxx with CMake. 1 # See www/CMake.html for instructions on how to build libcxx with CMake.
2 2
3 #=============================================================================== 3 #===============================================================================
4 # Setup Project 4 # Setup Project
5 #=============================================================================== 5 #===============================================================================
6 6
7 project(libcxx CXX C) 7 project(libcxx CXX C)
8 cmake_minimum_required(VERSION 2.8) 8 cmake_minimum_required(VERSION 2.8)
9 9
10 set(PACKAGE_NAME libcxx) 10 set(PACKAGE_NAME libcxx)
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 # Declare libc++ configuration variables. 88 # Declare libc++ configuration variables.
89 # They are intended for use as follows: 89 # They are intended for use as follows:
90 # LIBCXX_CXX_FLAGS: General flags for both the compiler and linker. 90 # LIBCXX_CXX_FLAGS: General flags for both the compiler and linker.
91 # LIBCXX_COMPILE_FLAGS: Compile only flags. 91 # LIBCXX_COMPILE_FLAGS: Compile only flags.
92 # LIBCXX_LINK_FLAGS: Linker only flags. 92 # LIBCXX_LINK_FLAGS: Linker only flags.
93 set(LIBCXX_CXX_FLAGS "") 93 set(LIBCXX_CXX_FLAGS "")
94 set(LIBCXX_COMPILE_FLAGS "") 94 set(LIBCXX_COMPILE_FLAGS "")
95 set(LIBCXX_LINK_FLAGS "") 95 set(LIBCXX_LINK_FLAGS "")
96 96
97 # Configure compiler. 97 # Configure compiler.
98 include(config-ix) 98 # @LOCALMOD-START Use a custom compiler config because cmake try_compile always
99 # tries to link an executable and linking doesnt work during bootstrap without
100 # libnacl.
101 if (CMAKE_SYSTEM_NAME STREQUAL "nacl")
102 include(config-ix-pnacl)
103 else()
104 include(config-ix)
105 endif()
106 # @LOCALMOD-END
99 # Configure ABI library 107 # Configure ABI library
100 include(HandleLibCXXABI) 108 include(HandleLibCXXABI)
101 109
102 #=============================================================================== 110 #===============================================================================
103 # Setup Compiler Flags 111 # Setup Compiler Flags
104 #=============================================================================== 112 #===============================================================================
105 113
106 # Get required flags. 114 # Get required flags.
107 # On all systems the system c++ standard library headers need to be excluded. 115 # On all systems the system c++ standard library headers need to be excluded.
108 if (MSVC) 116 if (MSVC)
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 list(APPEND LIBCXX_CXX_FLAGS "-fsanitize=thread") 241 list(APPEND LIBCXX_CXX_FLAGS "-fsanitize=thread")
234 else() 242 else()
235 message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANIT IZER}") 243 message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANIT IZER}")
236 endif() 244 endif()
237 elseif(MSVC) 245 elseif(MSVC)
238 message(WARNING "LLVM_USE_SANITIZER is not supported with MSVC") 246 message(WARNING "LLVM_USE_SANITIZER is not supported with MSVC")
239 endif() 247 endif()
240 endif() 248 endif()
241 249
242 string(REPLACE ";" " " LIBCXX_CXX_FLAGS "${LIBCXX_CXX_FLAGS}") 250 string(REPLACE ";" " " LIBCXX_CXX_FLAGS "${LIBCXX_CXX_FLAGS}")
243 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBCXX_CXX_FLAGS}") 251 # @LOCALMOD reverse the order, so that we can override -std=...
252 set(CMAKE_CXX_FLAGS "${LIBCXX_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
244 253
245 #=============================================================================== 254 #===============================================================================
246 # Setup Source Code 255 # Setup Source Code
247 #=============================================================================== 256 #===============================================================================
248 257
249 include_directories(include) 258 include_directories(include)
250 add_subdirectory(include) 259 add_subdirectory(include)
251 260
252 # Add source code. This also contains all of the logic for deciding linker flags 261 # Add source code. This also contains all of the logic for deciding linker flags
253 # soname, etc... 262 # soname, etc...
254 add_subdirectory(lib) 263 add_subdirectory(lib)
255 264
256 #=============================================================================== 265 #===============================================================================
257 # Setup Tests 266 # Setup Tests
258 #=============================================================================== 267 #===============================================================================
259 268
260 add_subdirectory(test) 269 add_subdirectory(test)
OLDNEW
« no previous file with comments | « .gitignore ('k') | OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698