mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
CMake: Interrogate needs -DNDEBUG when -DNDEBUG is passed as a flag
Some buildsystems (Gentoo's Portage, to be specific) are very roughshod about how they use CMake, and might bypass the "configuration types" system altogether, passing their own release flags instead. This change detects that and ensures that Interrogate picks up the NDEBUG flag when it's specified manually.
This commit is contained in:
parent
cde25670d6
commit
a42f1a49a4
@ -228,6 +228,11 @@ function(interrogate_sources target output database language_flags)
|
||||
endif()
|
||||
endforeach(build_type)
|
||||
|
||||
# In case the user (or a distro buildsystem) is throwing NDEBUG in by hand:
|
||||
if(CMAKE_CXX_FLAGS MATCHES ".*NDEBUG.*")
|
||||
list(APPEND define_flags "-DNDEBUG")
|
||||
endif()
|
||||
|
||||
get_filename_component(output_directory "${output}" DIRECTORY)
|
||||
get_filename_component(database_directory "${database}" DIRECTORY)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user