Skip to content

Commit 9a46492

Browse files
committed
Updating to be "profilable".
1 parent 4375415 commit 9a46492

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

examples/main/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ add_executable(${TARGET} main.cpp)
33
install(TARGETS ${TARGET} RUNTIME)
44
target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_17)
6+
target_link_options(${TARGET} PUBLIC /PROFILE)

ggml/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ include(CheckIncludeFileCXX)
44

55
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
66

7+
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF /PROFILE")
8+
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF /PROFILE")
9+
710
if (NOT XCODE AND NOT MSVC AND NOT CMAKE_BUILD_TYPE)
811
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
912
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
@@ -32,7 +35,7 @@ else()
3235
endif()
3336
endif()
3437

35-
# remove the lib prefix on win32 mingw
38+
3639
if (WIN32)
3740
set(CMAKE_STATIC_LIBRARY_PREFIX "")
3841
set(CMAKE_SHARED_LIBRARY_PREFIX "")

0 commit comments

Comments
 (0)