Skip to content

Commit

Permalink
kram - builds - remove fastl, more comments on win CMake, add showBui…
Browse files Browse the repository at this point in the history
…ldTImingSummary
  • Loading branch information
alecazam committed Sep 15, 2024
1 parent 2fde0e0 commit f9ad36b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 26 deletions.
6 changes: 3 additions & 3 deletions kramv/KramViewerMain.mm
Original file line number Diff line number Diff line change
Expand Up @@ -633,9 +633,9 @@ - (void)awakeFromNib
// this is sandbox or root if not sandboxed
// This is objC call...
// This has to be in a .mm file to call
//std::string traceDir = [NSHomeDirectory() UTF8String];
//traceDir += "/Traces/";
//_data.setPerfDirectory(traceDir.c_str());
std::string traceDir = [NSHomeDirectory() UTF8String];
traceDir += "/traces/";
_data.setPerfDirectory(traceDir.c_str());

// TODO: see if can only open this
// KLOGI("Viewer", "AwakeFromNIB");
Expand Down
26 changes: 11 additions & 15 deletions libkram/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ option(BCENC "Compile BCenc Encoder" ON)
option(COMP "Compile Compressonator Encoder" ON)

option(EASTL "Compile EASTL" OFF)
option(FASTL "Compile FASTL" OFF)

# convert ON to 1, UGH
set(COMPILE_ATE 0)
Expand Down Expand Up @@ -67,13 +66,6 @@ if (EASTL)
set(COMPILE_EASTL 1)
endif()

# replace parts of std/stdl with fastl
set(COMPILE_FASTL 0)
if (FASTL)
set(COMPILE_FASTL 1)
endif()


#-----------------------------------------------------
# libkram

Expand Down Expand Up @@ -131,9 +123,6 @@ file(GLOB_RECURSE libSources CONFIGURE_DEPENDS
"${SOURCE_DIR}/eastl/*.cpp"
"${SOURCE_DIR}/eastl/*.h"

"${SOURCE_DIR}/fastl/*.cpp"
"${SOURCE_DIR}/fastl/*.h"

"${SOURCE_DIR}/lodepng/lodepng.cpp"
"${SOURCE_DIR}/lodepng/lodepng.h"

Expand Down Expand Up @@ -246,9 +235,17 @@ if (BUILD_MAC)

elseif (BUILD_WIN)


# TODO: turn on C++20
# TODO: switch to clang, then switch args, but clang-cl will take MSVC args

# this is MSVC setting, but needs to be here and on karmc and thumbnail
# /std:c++20
#
# this is setting clang-cl
# set(CMAKE_CXX_COMPILER "clang-cl")

# TODO: switch to add_target_definitions
# TODO: turn on C++17
# TODO: switch to clang

# to turn off exceptions/rtti use /GR and /EHsc replacement
string(REGEX REPLACE "/GR" "/GR-" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
Expand Down Expand Up @@ -283,8 +280,7 @@ target_precompile_headers(${myTargetLib} PRIVATE
target_compile_definitions(${myTargetLib}
PUBLIC
"-DCOMPILE_EASTL=${COMPILE_EASTL}"
"-DCOMPILE_FASTL=${COMPILE_FASTL}"


PRIVATE
"-DCOMPILE_ATE=${COMPILE_ATE}"
"-DCOMPILE_BCENC=${COMPILE_BCENC}"
Expand Down
4 changes: 2 additions & 2 deletions libkram/kram/KramTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ Perf::Perf()
{
// TODO: should set alongsize exe by default
#if KRAM_WIN
setPerfDirectory("C:/Traces/");
setPerfDirectory("C:/traces/");
#else
// sandboxed apps won't reach this, but unsandboxed exe can
setPerfDirectory("/Users/Alec/devref/kram/tests/traces/");
setPerfDirectory("/Users/Alec/traces/");
#endif
}

Expand Down
13 changes: 7 additions & 6 deletions scripts/cibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,40 +66,41 @@ if [[ $buildType == macos ]]; then
# this dir already exists, so don't have to mkdir
pushd build2

xargs=-showBuildTimingSummary
# build libraries
# see here about destination arg
# https://github.com/appcelerator/titanium_mobile/pull/13098
echo "::group::kram-ios"
xcodebuild build -sdk iphoneos -workspace kram.xcworkspace -scheme kram-ios -configuration Release -destination generic/platform=iOS CONFIGURATION_BUILD_DIR=${binPath} BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild build -sdk iphoneos -workspace kram.xcworkspace -scheme kram-ios -configuration Release ${xargs} -destination generic/platform=iOS CONFIGURATION_BUILD_DIR=${binPath} BUILD_LIBRARY_FOR_DISTRIBUTION=YES
echo "::endgroup::"

echo "::group::kram"
xcodebuild build -sdk macosx -workspace kram.xcworkspace -scheme kram -configuration Release -destination generic/platform=macOS CONFIGURATION_BUILD_DIR=${binPath} BUILD_LIBRARY_FOR_DISTRIBUTION=YES
xcodebuild build -sdk macosx -workspace kram.xcworkspace -scheme kram -configuration Release ${xargs} -destination generic/platform=macOS CONFIGURATION_BUILD_DIR=${binPath} BUILD_LIBRARY_FOR_DISTRIBUTION=YES
echo "::endgroup::"

# install apps so they are signed
# can't specify empty INSTALL_PATH, or xcodebuild succeeds but copies nothing to bin
echo "::group::kramc"
xcodebuild install -sdk macosx -workspace kram.xcworkspace -scheme kramc -configuration Release -destination generic/platform=macOS DSTROOT=${binHolderPath} INSTALL_PATH=bin
xcodebuild install -sdk macosx -workspace kram.xcworkspace -scheme kramc -configuration Release ${xargs} -destination generic/platform=macOS DSTROOT=${binHolderPath} INSTALL_PATH=bin
echo "::endgroup::"

echo "::group::kramv"
xcodebuild install -sdk macosx -workspace kram.xcworkspace -scheme kramv -configuration Release -destination generic/platform=macOS DSTROOT=${binHolderPath} INSTALL_PATH=bin
xcodebuild install -sdk macosx -workspace kram.xcworkspace -scheme kramv -configuration Release ${xargs} -destination generic/platform=macOS DSTROOT=${binHolderPath} INSTALL_PATH=bin
echo "::endgroup::"

popd

# build hlslparser to bin directory
pushd hlslparser
echo "::group::hlsl-parser"
xcodebuild install -sdk macosx -project hlslparser.xcodeproj -configuration Release -destination generic/platform=macOS DSTROOT=${binHolderPath} INSTALL_PATH=bin
xcodebuild install -sdk macosx -project hlslparser.xcodeproj -configuration Release ${xargs} -destination generic/platform=macOS DSTROOT=${binHolderPath} INSTALL_PATH=bin
echo "::endgroup::"
popd

# build kram-profile to bin directory
pushd kram-profile
echo "::group::kram-profiler"
xcodebuild install -sdk macosx -project kram-profile.xcodeproj -configuration Release -destination generic/platform=macOS DSTROOT=${binHolderPath} INSTALL_PATH=bin
xcodebuild install -sdk macosx -project kram-profile.xcodeproj -configuration Release ${xargs} -destination generic/platform=macOS DSTROOT=${binHolderPath} INSTALL_PATH=bin
echo "::endgroup::"
popd

Expand Down

0 comments on commit f9ad36b

Please sign in to comment.