diff --git a/CMakeLists.txt b/CMakeLists.txt index 36e067b..ac4359b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD_EXTENSIONS OFF) option(SLED_BUILD_BENCHMARK "Build benchmark" OFF) option(SLED_BUILD_TESTS "Build tests" OFF) -option(SLED_LOCATION_STRIPPED_PATH "" "src/base/location.cc") +option(SLED_LOCATION_PATH "" "sled/src/system/location.cc") set(BUILD_STATIC ON) set(BUILD_RTTR_DYNAMIC OFF) @@ -22,8 +22,9 @@ endif() if (NOT TARGET fmt) add_subdirectory(3party/fmt EXCLUDE_FROM_ALL) endif() -if (SLED_LOCATION_STRIPPED_PATH) - target_compile_definitions(sled PRIVATE __SLED_LOCATION_STRIPPED_PATH="${SLED_LOCATION_STRIPPED_PATH}") + +if (SLED_LOCATION_PATH) + target_compile_definitions(sled PRIVATE __SLED_LOCATION_PATH="${SLED_LOCATION_PATH}") endif() # add_subdirectory(3party/eigen EXCLUDE_FROM_ALL) target_include_directories(sled PUBLIC 3party/eigen) diff --git a/src/system/location.cc b/src/system/location.cc index 4b1ebc7..b60f958 100644 --- a/src/system/location.cc +++ b/src/system/location.cc @@ -5,8 +5,8 @@ namespace sled { size_t StrippedPathLength() { -#ifdef __SLED_LOCATION_STRIPPED_PATH - const char *my_path = __SLED_LOCATION_STRIPPED_PATH; +#ifdef __SLED_LOCATION_PATH + const char *my_path = __SLED_LOCATION_PATH; #else const char *my_path = "sled/src/system/location.cc"; #endif