Fixed issues with MSVC/CMake build macros

This commit is contained in:
Linus Probert 2018-05-01 13:18:05 +02:00
parent 5efef180a5
commit b219c76e81
1 changed files with 5 additions and 1 deletions

View File

@ -85,7 +85,11 @@ if (NOT WIN32)
endif (NOT WIN32)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__FNAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
if (NOT MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__FNAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
else (NOT MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__FNAME__=__FILE__")
endif (NOT MSVC)
# PROGRAMS:
add_executable(breakhack