Skip to content

Commit 940a4e2

Browse files
committed
lib: Do not use private makefile targets in CMakelists.txt
By extending the scope of changes introduced in commit fc32552 ("build: CMakeLists.txt Do not use private makefile targets (#5819)") we mitigate the following error produced by BitBake in Yocto ERROR: fluentbit-3.1.9-r0 do_package_qa: QA Issue: File /usr/bin/fluent-bit in package fluentbit contains reference to TMPDIR [buildpaths] ERROR: fluentbit-3.1.9-r0 do_package_qa: Fatal QA errors were found, failing task. stemming from $ strings packages-split/fluentbit/usr/bin/fluent-bit ... $(subst /yocto/upstream/build/tmp/work/cortexa57-poky-linux/fluentbit/3.1.9/git/,,$(abspath $<)) ... Signed-off-by: Niko Mauno <[email protected]>
1 parent 8fc1d25 commit 940a4e2

File tree

4 files changed

+6
-22
lines changed

4 files changed

+6
-22
lines changed

lib/cfl/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,8 @@ if(NOT MSVC)
4040
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
4141
endif()
4242

43-
# Define __FILENAME__ consistently across Operating Systems
44-
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
45-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath $$<))\"'")
46-
else()
47-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__")
48-
endif()
43+
# Define __FILENAME__
44+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__")
4945

5046

5147

lib/cmetrics/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,8 @@ if(NOT MSVC)
6060
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
6161
endif()
6262

63-
# Define __CMT_FILENAME__ consistently across Operating Systems
64-
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
65-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath $$<))\"'")
66-
else()
67-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__=__FILE__")
68-
endif()
63+
# Define __CMT_FILENAME__
64+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__=__FILE__")
6965

7066
# Configuration options
7167
option(CMT_DEV "Enable development mode" No)

lib/ctraces/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,8 @@ set(CTR_VERSION_MINOR 5)
3030
set(CTR_VERSION_PATCH 6)
3131
set(CTR_VERSION_STR "${CTR_VERSION_MAJOR}.${CTR_VERSION_MINOR}.${CTR_VERSION_PATCH}")
3232

33-
# Define __FILENAME__ consistently across Operating Systems
34-
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
35-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath $$<))\"'")
36-
else()
37-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__")
38-
endif()
33+
# Define __FILENAME__
34+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__")
3935

4036
# Configuration options
4137
option(CTR_DEV "Enable development mode" No)

lib/monkey/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ include(ExternalProject)
1313
include(GNUInstallDirs)
1414

1515
# Set default compiler options
16-
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
1716
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -Wextra")
18-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath \$$<))\"'")
19-
else()
2017
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__")
21-
endif()
2218

2319
# Monkey Version
2420
set(MK_VERSION_MAJOR 1)

0 commit comments

Comments
 (0)