From 0a79b7c58392ffb31049ed358e28812b59dd70a8 Mon Sep 17 00:00:00 2001 From: Thomas Devoogdt Date: Mon, 8 Apr 2024 02:10:04 +0200 Subject: [PATCH] build: fix ninja build (#39) 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 $$) FLAGS = -Wall -D__FILENAME__='"$(subst /home/thode/external/cfl/,,$(ab... ^ near here Signed-off-by: Thomas Devoogdt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dbdd62e..7613e5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ endif() # 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()