You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ok Nabla target builds with refactored single config build options header, now need to get rid of define.h and move it to interface compile definition properties to support install usage requirements
message(${_NBL_CMAKE_STATUS_}"Memory consumption issue detected! To protect you from compile and linker errors, please read this message.\n\nYour total physical memory is ${_NBL_TOTAL_PHYSICAL_MEMORY_} MBs, your OS is currently using ${_NBL_CURRENTLY_USED_PHYSICAL_MEMORY_} MBs and consumption of your memory with requested ${_NBL_JOBS_AMOUNT_} jobs in Debug configuration may be around ${_NBL_DEBUG_MEMORY_CONSUPTION_WITH_ALL_JOBS_} MBs. Please override '_NBL_JOBS_AMOUNT_' variable by setting it as cache variable and lower the jobs! If you want to continue anyway, please define 'NBL_MEMORY_CONSUMPTION_CHECK_SKIP' but be aware - you are doing it on your own risk of possible build failures.")
option(NBL_FAST_MATH "Enable fast low-precision math"ON)
179
+
option(NBL_FAST_MATH "Enable fast low-precision math"OFF) # the reason OFF is by default now is the var controling it at build time was set AFTER BuildConfigOptions was generated - resulting in the feature being always OFF regardless the value xD - so just for sanity, keeping the same behaviour by default
189
180
option(NBL_BUILD_EXAMPLES "Enable building examples"ON)
190
181
option(NBL_BUILD_MITSUBA_LOADER "Enable nbl::ext::MitsubaLoader?"OFF) # TODO: once it compies turn this ON by default!
Copy file name to clipboardExpand all lines: src/nbl/CMakeLists.txt
+55-16Lines changed: 55 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -79,11 +79,21 @@ if(NBL_BUILD_ANDROID)
79
79
set(NBL_BUILD_MITSUBA_LOADER OFFCACHEBOOL"Android doesn't need this loader, if you want it, pay us.'" FORCE)
80
80
endif()
81
81
82
-
nbl_generate_conf_files()
82
+
if(NBL_FAST_MATH)
83
+
set(__NBL_FAST_MATH 1) # this could be in BUILD_INTERFACE, the feature is header only and currently install consumer is forced to use what we used at configure time with no option to toggle it
84
+
# it should be called _NBL_COMPILE_WITH_FAST_MATH to let user known the lib itself was compiled with the feature and __NBL_FAST_MATH should be separate thing to let control it with install build
85
+
endif()
86
+
87
+
if(NBL_TARGET_ARCH_ARM)
88
+
# this should be PRIVATE or at least scoped to build interface only (as currently)
89
+
# list(APPEND PUBLIC_DEFINITIONS $<BUILD_INTERFACE:_NBL_TARGET_ARCH_ARM_>) # TODO: uncomment in the future
target_compile_definitions(${NBL_TARGET}PUBLIC"$<TARGET_PROPERTY:Nabla,INTERFACE_COMPILE_DEFINITIONS>") # workaround because must use Nabla headers without linking Nabla to itself..
$<TARGET_PROPERTY:Nabla,INTERFACE_INCLUDE_DIRECTORIES> # only for xxHash256 include directory, we DO NOT want to link it nor use it
10
10
)
11
+
target_compile_definitions(${EXECUTABLE_NAME}PUBLIC"$<TARGET_PROPERTY:Nabla,INTERFACE_COMPILE_DEFINITIONS>") # workaround because must use Nabla headers without linking Nabla to itself..
0 commit comments