You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CMakeLists.txt
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -102,6 +102,17 @@ if (ENABLE_FUZZING)
102
102
set (ENABLE_PROTOBUF 1)
103
103
endif()
104
104
105
+
option (ENABLE_WOBOQ_CODEBROWSER"Build for woboq codebrowser"OFF)
106
+
107
+
if (ENABLE_WOBOQ_CODEBROWSER)
108
+
set (ENABLE_EMBEDDED_COMPILER 0)
109
+
set (CMAKE_C_FLAGS"${CMAKE_C_FLAGS} -Wno-poison-system-directories")
110
+
# woboq codebrowser uses clang tooling, and they could add default system
111
+
# clang includes, and later clang will warn for those added by itself
112
+
# includes.
113
+
set (CMAKE_CXX_FLAGS"${CMAKE_CXX_FLAGS} -Wno-poison-system-directories")
114
+
endif()
115
+
105
116
# Global libraries
106
117
# See:
107
118
# - default_libs.cmake
@@ -259,8 +270,8 @@ endif ()
259
270
option (ENABLE_BUILD_PATH_MAPPING"Enable remapping of file source paths in debug info, predefined preprocessor macros, and __builtin_FILE(). It's used to generate reproducible builds. See https://reproducible-builds.org/docs/build-path"${ENABLE_BUILD_PATH_MAPPING_DEFAULT})
260
271
261
272
if (ENABLE_BUILD_PATH_MAPPING)
262
-
set (COMPILER_FLAGS "${COMPILER_FLAGS} -ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
263
-
set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")
273
+
set (COMPILER_FLAGS "${COMPILER_FLAGS} -ffile-prefix-map=${PROJECT_SOURCE_DIR}=.")
274
+
set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -ffile-prefix-map=${PROJECT_SOURCE_DIR}=.")
264
275
endif ()
265
276
266
277
option (ENABLE_BUILD_PROFILING"Enable profiling of build time"OFF)
@@ -557,7 +568,7 @@ if (NATIVE_BUILD_TARGETS
557
568
)
558
569
message (STATUS"Building native targets...")
559
570
560
-
set (NATIVE_BUILD_DIR "${CMAKE_BINARY_DIR}/native")
571
+
set (NATIVE_BUILD_DIR "${PROJECT_BINARY_DIR}/native")
0 commit comments