Skip to content

Commit

Permalink
build: fix ninja build (#188)
Browse files Browse the repository at this point in the history
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 <thomas@devoogdt.com>
  • Loading branch information
ThomasDevoogdt committed Apr 8, 2024
1 parent 925afca commit 7f8f2ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ endif()

# Define __CMT_FILENAME__ consistently across Operating Systems
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__='\"$$(subst ${CMAKE_SOURCE_DIR}/,,$$(abspath $$<))\"'")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__CMT_FILENAME__=__FILE__")
endif()
Expand Down

0 comments on commit 7f8f2ac

Please sign in to comment.