Skip to content

Commit 008b17a

Browse files
committed
Added NBL_GIT_LOG define
1 parent 3efbdbe commit 008b17a

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,13 @@ execute_process(
233233
)
234234
set(NBL_BUILD_URL "https://github.com/Devsh-Graphics-Programming/Nabla/commit/${NBL_GIT_SHA}")
235235

236+
execute_process(
237+
COMMAND git log -1
238+
WORKING_DIRECTORY "${NBL_ROOT_PATH}"
239+
OUTPUT_VARIABLE NBL_GIT_LOG
240+
OUTPUT_STRIP_TRAILING_WHITESPACE
241+
)
242+
236243
add_subdirectory(src/nbl) # Nabla code | Moved cmakelists.txt from source/Nabla to src/nbl
237244

238245
if(NBL_BUILD_TOOLS)

examples_tests

include/nbl/config/BuildConfigOptions.h.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,6 @@
5454
// TODO: This has to disapppear from the main header and go to the OptiX extension header + config
5555
#cmakedefine OPTIX_INCLUDE_DIR "@OPTIX_INCLUDE_DIR@"
5656

57+
#cmakedefine NBL_GIT_LOG R"(@NBL_GIT_LOG@)"
58+
5759
#endif

src/nbl/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,6 @@ add_library(Nabla STATIC
387387

388388
target_compile_definitions(Nabla
389389
PUBLIC NBL_BUILD_URL="${NBL_BUILD_URL}"
390-
PUBLIC NBL_GIT_SHA="${NBL_GIT_SHA}"
391-
PUBLIC NBL_GIT_LOG="${NBL_GIT_LOG}"
392390
)
393391

394392
#TODO maybe make a macro to do this (note: it's also used in common.cmake)

0 commit comments

Comments
 (0)