Skip to content

Commit

Permalink
Merge pull request #664 from danieldk/remove-build-path
Browse files Browse the repository at this point in the history
Strip build directory prefix in the __FILE__ macro
  • Loading branch information
taku910 committed Jun 17, 2021
2 parents cbfc6b3 + cab2e3c commit d8711f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ option(SPM_USE_EXTERNAL_ABSL "Use external protobuf" OFF)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 10.0) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0))
string(APPEND CMAKE_CXX_FLAGS " -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=''")
endif()

if (UNIX)
include(GNUInstallDirs)
set(prefix ${CMAKE_INSTALL_PREFIX})
Expand Down

0 comments on commit d8711f5

Please sign in to comment.