XCode doesnt support files per configuration, using the old method (#3789)

- some warn fixes
- fixed release linking issue

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-01 08:19:08 -07:00
committed by GitHub
parent 26241e95ac
commit 2d2a7f4623
12 changed files with 43 additions and 54 deletions
-8
View File
@@ -84,12 +84,6 @@ AZ_POP_DISABLE_WARNING
#include "IEditorPanelUtils.h"
#include "EditorPanelUtils.h"
// even in Release mode, the editor will return its heap, because there's no Profile build configuration for the editor
#ifdef _RELEASE
#undef _RELEASE
#endif
#include "Core/QtEditorApplication.h" // for Editor::EditorQtApplication
static CCryEditDoc * theDocument;
@@ -104,8 +98,6 @@ static CCryEditDoc * theDocument;
#define VERIFY(EXPRESSION) { auto e = EXPRESSION; assert(e); }
#endif
#undef GetCommandLine
const char* CEditorImpl::m_crashLogFileName = "SessionStatus/editor_statuses.json";
CEditorImpl::CEditorImpl()
@@ -72,11 +72,8 @@ namespace AzFramework
/// Retrieves the app root path for the application.
virtual const char* GetAppRoot() const { return nullptr; }
#pragma push_macro("GetCommandLine")
#undef GetCommandLine
/// Get the Command Line arguments passed in.
virtual const CommandLine* GetCommandLine() { return nullptr; }
#pragma pop_macro("GetCommandLine")
/// Get the Command Line arguments passed in. (Avoids collisions with platform specific macros.)
virtual const CommandLine* GetApplicationCommandLine() { return nullptr; }
-4
View File
@@ -13,10 +13,6 @@
#define CRYINCLUDE_CRYCOMMON_APPLESPECIFIC_H
#pragma once
#if defined(__clang__)
#pragma diagnostic ignore "-W#pragma-messages"
#endif
//////////////////////////////////////////////////////////////////////////
// Standard includes.
//////////////////////////////////////////////////////////////////////////
-4
View File
@@ -118,10 +118,6 @@ struct IConsoleVarSink
// </interfuscator:shuffle>
};
#if defined(GetCommandLine)
#undef GetCommandLine
#endif
// Interface to the arguments of the console command.
struct IConsoleCmdArgs
{
@@ -715,12 +715,7 @@ void AssetProcessingStateDataUnitTest::DataTest(AssetProcessor::AssetDatabaseCon
//try retrieving this source by id
UNIT_TEST_EXPECT_TRUE(stateData->GetJobByJobID(job.m_jobID, job));
if (job.m_jobID == AzToolsFramework::AssetDatabase::InvalidEntryId ||
job.m_jobID != job.m_jobID ||
job.m_sourcePK != job.m_sourcePK ||
job.m_jobKey != job.m_jobKey ||
job.m_fingerprint != job.m_fingerprint ||
job.m_platform != job.m_platform)
if (job.m_jobID == AzToolsFramework::AssetDatabase::InvalidEntryId)
{
Q_EMIT UnitTestFailed("AssetProcessingStateDataTest Failed - GetJobByJobID failed");
return;
@@ -57,9 +57,6 @@
#include <sstream>
// windows headers bring in a macro which conflicts GetCommandLine
#undef GetCommandLine
namespace AssetUtilsInternal
{
static const unsigned int g_RetryWaitInterval = 250; // The amount of time that we are waiting for retry.
@@ -8,7 +8,7 @@
#include "EditorDefs.h"
#include "Resource.h"
#include "Editor/Resource.h"
#include "UiEditorAnimationBus.h"
#include "UiAnimViewCurveEditor.h"
@@ -15,7 +15,7 @@
// ----- End UI_ANIMATION_REVISIT
#include "EditorDefs.h"
#include "Resource.h"
#include "Editor/Resource.h"
#include "UiAnimViewDialog.h"
@@ -8,7 +8,7 @@
#include "EditorDefs.h"
#include "Resource.h"
#include "Editor/Resource.h"
#include "UiEditorAnimationBus.h"
#include "UiAnimViewDopeSheetBase.h"
@@ -8,7 +8,7 @@
#include "EditorDefs.h"
#include "Resource.h"
#include "Editor/Resource.h"
#include "UiEditorAnimationBus.h"
#include "UiAnimViewNodes.h"
#include "UiAnimViewDopeSheetBase.h"
@@ -9,7 +9,7 @@
#include "UiEditorAnimationBus.h"
#include "EditorDefs.h"
#include "Resource.h"
#include "Editor/Resource.h"
#include "UiAnimViewSequenceManager.h"
#include "UiAnimViewSplineCtrl.h"
#include "UiAnimViewSequence.h"
+37 -21
View File
@@ -330,28 +330,44 @@ function(ly_add_target)
set(runtime_dependencies_list SHARED MODULE EXECUTABLE APPLICATION)
if(NOT ly_add_target_IMPORTED AND linking_options IN_LIST runtime_dependencies_list)
# the stamp file will be the one that triggers the execution of the custom rule. At the end
# of running the copy of runtime dependencies, the stamp file is touched so the timestamp is updated.
# Adding a config as part of the name since the stamp file is added to the VS project.
# Note the STAMP_OUTPUT_FILE need to match with the one used in runtime dependencies (e.g. RuntimeDependencies_common.cmake)
set(STAMP_OUTPUT_FILE ${CMAKE_BINARY_DIR}/runtime_dependencies/$<CONFIG>/${ly_add_target_NAME}_$<CONFIG>.stamp)
add_custom_command(
OUTPUT ${STAMP_OUTPUT_FILE}
DEPENDS "$<GENEX_EVAL:$<TARGET_PROPERTY:${ly_add_target_NAME},RUNTIME_DEPENDENCIES_DEPENDS>>"
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/runtime_dependencies/$<CONFIG>/${ly_add_target_NAME}.cmake
COMMENT "Copying ${ly_add_target_NAME} runtime dependencies to output..."
VERBATIM
)
# XCode generator doesnt support different source files per configuration, so we cannot have
# the runtime dependencies using file-tracking, instead, we will have them as a post build step
if(CMAKE_GENERATOR MATCHES Xcode)
add_custom_command(TARGET ${ly_add_target_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/runtime_dependencies/$<CONFIG>/${ly_add_target_NAME}.cmake
COMMENT "Copying ${ly_add_target_NAME} runtime dependencies to output..."
DEPENDS ${CMAKE_BINARY_DIR}/runtime_dependencies/${ly_add_target_NAME}.cmake
COMMENT "Copying runtime dependencies..."
VERBATIM
)
# Unfortunately the VS generator cannot deal with generation expressions as part of the file name, wrapping the
# stamp file on each configuration so it gets properly excluded by the generator
unset(stamp_files_per_config)
foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
set(stamp_file_conf ${CMAKE_BINARY_DIR}/runtime_dependencies/${conf}/${ly_add_target_NAME}_${conf}.stamp)
set_source_files_properties(${stamp_file_conf} PROPERTIES GENERATED TRUE SKIP_AUTOGEN TRUE)
list(APPEND stamp_files_per_config $<$<CONFIG:${conf}>:${stamp_file_conf}>)
endforeach()
target_sources(${ly_add_target_NAME} PRIVATE ${stamp_files_per_config})
else()
# the stamp file will be the one that triggers the execution of the custom rule. At the end
# of running the copy of runtime dependencies, the stamp file is touched so the timestamp is updated.
# Adding a config as part of the name since the stamp file is added to the VS project.
# Note the STAMP_OUTPUT_FILE need to match with the one used in runtime dependencies (e.g. RuntimeDependencies_common.cmake)
set(STAMP_OUTPUT_FILE ${CMAKE_BINARY_DIR}/runtime_dependencies/$<CONFIG>/${ly_add_target_NAME}_$<CONFIG>.stamp)
add_custom_command(
OUTPUT ${STAMP_OUTPUT_FILE}
DEPENDS "$<GENEX_EVAL:$<TARGET_PROPERTY:${ly_add_target_NAME},RUNTIME_DEPENDENCIES_DEPENDS>>"
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/runtime_dependencies/$<CONFIG>/${ly_add_target_NAME}.cmake
COMMENT "Copying ${ly_add_target_NAME} runtime dependencies to output..."
VERBATIM
)
# Unfortunately the VS generator cannot deal with generation expressions as part of the file name, wrapping the
# stamp file on each configuration so it gets properly excluded by the generator
unset(stamp_files_per_config)
foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
set(stamp_file_conf ${CMAKE_BINARY_DIR}/runtime_dependencies/${conf}/${ly_add_target_NAME}_${conf}.stamp)
set_source_files_properties(${stamp_file_conf} PROPERTIES GENERATED TRUE SKIP_AUTOGEN TRUE)
list(APPEND stamp_files_per_config $<$<CONFIG:${conf}>:${stamp_file_conf}>)
endforeach()
target_sources(${ly_add_target_NAME} PRIVATE ${stamp_files_per_config})
endif()
endif()