From cdc16291dd9c999ce68727dc92c77d2cf4d62114 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Tue, 24 Dec 2019 17:20:43 -0700 Subject: [PATCH] CMake: `SKIP_COMPOSITING` -> `SKIP_UNITY_BUILD_INCLUSION` The latter is what CMake (3.16+) itself uses; we should start using CMake's own unity build capabilities if available. --- cmake/macros/CompositeSources.cmake | 2 +- dtool/src/dtoolbase/CMakeLists.txt | 2 +- dtool/src/dtoolutil/CMakeLists.txt | 2 +- panda/src/display/CMakeLists.txt | 2 +- panda/src/dxgsg9/CMakeLists.txt | 2 +- panda/src/grutil/CMakeLists.txt | 2 +- panda/src/pgraph/CMakeLists.txt | 2 +- panda/src/pnmimage/CMakeLists.txt | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake/macros/CompositeSources.cmake b/cmake/macros/CompositeSources.cmake index 8d33825808..790e5553bf 100644 --- a/cmake/macros/CompositeSources.cmake +++ b/cmake/macros/CompositeSources.cmake @@ -49,7 +49,7 @@ function(composite_sources target sources_var) get_filename_component(extension "${source}" EXT) get_source_file_property(generated "${source}" GENERATED) get_source_file_property(is_header "${source}" HEADER_FILE_ONLY) - get_source_file_property(skip_compositing "${source}" SKIP_COMPOSITING) + get_source_file_property(skip_compositing "${source}" SKIP_UNITY_BUILD_INCLUSION) # Check if we can safely add this to a composite file. if(NOT generated AND NOT is_header AND NOT skip_compositing AND diff --git a/dtool/src/dtoolbase/CMakeLists.txt b/dtool/src/dtoolbase/CMakeLists.txt index 079e6a4e34..aea0a1196f 100644 --- a/dtool/src/dtoolbase/CMakeLists.txt +++ b/dtool/src/dtoolbase/CMakeLists.txt @@ -83,7 +83,7 @@ set(P3DTOOLBASE_IGATEEXT typeHandle_ext.h ) -set_source_files_properties(indent.cxx PROPERTIES SKIP_COMPOSITING YES) +set_source_files_properties(indent.cxx PROPERTIES SKIP_UNITY_BUILD_INCLUSION YES) composite_sources(p3dtoolbase P3DTOOLBASE_SOURCES) add_component_library(p3dtoolbase NOINIT SYMBOL BUILDING_DTOOL_DTOOLBASE diff --git a/dtool/src/dtoolutil/CMakeLists.txt b/dtool/src/dtoolutil/CMakeLists.txt index 0ad93fd8c5..c3a43c319b 100644 --- a/dtool/src/dtoolutil/CMakeLists.txt +++ b/dtool/src/dtoolutil/CMakeLists.txt @@ -34,7 +34,7 @@ if(APPLE) set_source_files_properties( filename_assist.mm filename_assist.h PROPERTIES WRAP_EXCLUDE YES - SKIP_COMPOSITING YES) + SKIP_UNITY_BUILD_INCLUSION YES) endif() set(P3DTOOLUTIL_SOURCES diff --git a/panda/src/display/CMakeLists.txt b/panda/src/display/CMakeLists.txt index 3af8e1bbb2..d2e50e5fc9 100644 --- a/panda/src/display/CMakeLists.txt +++ b/panda/src/display/CMakeLists.txt @@ -91,7 +91,7 @@ if(APPLE) endif() # This is a large file; let's build it separately -set_source_files_properties(graphicsStateGuardian.cxx PROPERTIES SKIP_COMPOSITING YES) +set_source_files_properties(graphicsStateGuardian.cxx PROPERTIES SKIP_UNITY_BUILD_INCLUSION YES) composite_sources(p3display P3DISPLAY_SOURCES) add_component_library(p3display SYMBOL BUILDING_PANDA_DISPLAY diff --git a/panda/src/dxgsg9/CMakeLists.txt b/panda/src/dxgsg9/CMakeLists.txt index 6442a95e76..dd7ad9ff7f 100644 --- a/panda/src/dxgsg9/CMakeLists.txt +++ b/panda/src/dxgsg9/CMakeLists.txt @@ -36,7 +36,7 @@ set(P3DXGSG9_SOURCES ) # This is a large file; let's build it separately -set_source_files_properties(dxGraphicsStateGuardian9.cxx PROPERTIES SKIP_COMPOSITING YES) +set_source_files_properties(dxGraphicsStateGuardian9.cxx PROPERTIES SKIP_UNITY_BUILD_INCLUSION YES) composite_sources(p3dxgsg9 P3DXGSG9_SOURCES) add_component_library(p3dxgsg9 SYMBOL BUILDING_PANDADX diff --git a/panda/src/grutil/CMakeLists.txt b/panda/src/grutil/CMakeLists.txt index 5d3fb2c9a9..bffcce6559 100644 --- a/panda/src/grutil/CMakeLists.txt +++ b/panda/src/grutil/CMakeLists.txt @@ -39,7 +39,7 @@ set(P3GRUTIL_SOURCES ) # This is a large file; let's build it separately -set_source_files_properties(multitexReducer.cxx PROPERTIES SKIP_COMPOSITING YES) +set_source_files_properties(multitexReducer.cxx PROPERTIES SKIP_UNITY_BUILD_INCLUSION YES) composite_sources(p3grutil P3GRUTIL_SOURCES) add_component_library(p3grutil SYMBOL BUILDING_PANDA_GRUTIL diff --git a/panda/src/pgraph/CMakeLists.txt b/panda/src/pgraph/CMakeLists.txt index 178623eb3d..80559490c8 100644 --- a/panda/src/pgraph/CMakeLists.txt +++ b/panda/src/pgraph/CMakeLists.txt @@ -222,7 +222,7 @@ set(P3PGRAPH_IGATEEXT ) # This is a large file; let's build it separately -set_source_files_properties(nodePath.cxx PROPERTIES SKIP_COMPOSITING YES) +set_source_files_properties(nodePath.cxx PROPERTIES SKIP_UNITY_BUILD_INCLUSION YES) composite_sources(p3pgraph P3PGRAPH_SOURCES) add_component_library(p3pgraph SYMBOL BUILDING_PANDA_PGRAPH diff --git a/panda/src/pnmimage/CMakeLists.txt b/panda/src/pnmimage/CMakeLists.txt index e22656a41d..8c6e17abac 100644 --- a/panda/src/pnmimage/CMakeLists.txt +++ b/panda/src/pnmimage/CMakeLists.txt @@ -35,7 +35,7 @@ set(P3PNMIMAGE_IGATEEXT if(HAVE_SSE2 AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR MATCHES "86") # It's only necessary to do this on 32-bit x86; 64-bit makes SSE2 builtin. set_source_files_properties(convert_srgb_sse2.cxx PROPERTIES - SKIP_COMPOSITING YES + SKIP_UNITY_BUILD_INCLUSION YES COMPILE_FLAGS -msse2) endif()