Skip to content

Commit 92270f1

Browse files
committed
cmake: do not write buildinfo files when SourceGenerator isn't included
1 parent fc75870 commit 92270f1

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

cmake/DaemonPlatform/Architecture.cmake

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ daemon_set_intrinsics()
9898
set("DAEMON_ARCH_${DAEMON_ARCH}" ON)
9999
set("DAEMON_NACL_ARCH_${DAEMON_NACL_ARCH}" ON)
100100

101-
# Add printable strings to the executable.
102-
daemon_add_buildinfo("char*" "DAEMON_ARCH_STRING" "\"${DAEMON_ARCH}\"")
103-
daemon_add_buildinfo("char*" "DAEMON_NACL_ARCH_STRING" "\"${DAEMON_NACL_ARCH}\"")
101+
if (DAEMON_SOURCE_GENERATOR)
102+
# Add printable strings to the executable.
103+
daemon_add_buildinfo("char*" "DAEMON_ARCH_STRING" "\"${DAEMON_ARCH}\"")
104+
daemon_add_buildinfo("char*" "DAEMON_NACL_ARCH_STRING" "\"${DAEMON_NACL_ARCH}\"")
105+
endif()

cmake/DaemonPlatform/Compiler.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ foreach(lang C;CXX)
197197
# > if (DAEMON_CXX_COMPILER_Clang)
198198
set("${compiler_var_name}" ON)
199199

200-
# Add printable string to the executable.
201-
daemon_add_buildinfo("char*" "DAEMON_${lang}_COMPILER_STRING" "\"${DAEMON_${lang}_COMPILER_STRING}\"")
200+
if (DAEMON_SOURCE_GENERATOR)
201+
# Add printable string to the executable.
202+
daemon_add_buildinfo("char*" "DAEMON_${lang}_COMPILER_STRING" "\"${DAEMON_${lang}_COMPILER_STRING}\"")
203+
endif()
202204
endforeach()

0 commit comments

Comments
 (0)