From 10777cd8743be001ae4995398699f1de260d20a6 Mon Sep 17 00:00:00 2001 From: Thomas Devoogdt Date: Mon, 8 Apr 2024 02:09:35 +0200 Subject: [PATCH] build: fix ninja build (#41) CMake Error: Running '/usr/bin/ninja' '-C' '/home/thode/external/cfl/CMakeFiles/CMakeTmp' '-t' 'recompact' failed with: ninja: error: build.ninja:50: bad $-escape (literal $ must be written as $$) Signed-off-by: Thomas Devoogdt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12ff6d7..af0500e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ set(CTR_VERSION_STR "${CTR_VERSION_MAJOR}.${CTR_VERSION_MINOR}.${CTR_VERSION_PAT # Define __FILENAME__ consistently across Operating Systems if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath $$<))\"'") else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__FILENAME__=__FILE__") endif()