-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: add common modules and runpath paths
Signed-off-by: msclock <[email protected]>
- Loading branch information
Showing
4 changed files
with
60 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#[[ | ||
This module provides some common tools. | ||
]] | ||
|
||
include_guard(GLOBAL) | ||
|
||
#[[ | ||
Show project version friendly | ||
]] | ||
macro(show_project_version) | ||
message(STATUS "PROJECT_VRESION finally:${PROJECT_VERSION}") | ||
message(STATUS "CMAKE_PROJECT_VERSION_MAJOR: ${CMAKE_PROJECT_VERSION_MAJOR}") | ||
message(STATUS "CMAKE_PROJECT_VERSION_MINOR: ${CMAKE_PROJECT_VERSION_MINOR}") | ||
message(STATUS "CMAKE_PROJECT_VERSION_PATCH: ${CMAKE_PROJECT_VERSION_PATCH}") | ||
message(STATUS "CMAKE_PROJECT_VERSION_TWEAK: ${CMAKE_PROJECT_VERSION_TWEAK}") | ||
message(STATUS "CMAKE_PROJECT_VERSION finally:${CMAKE_PROJECT_VERSION}") | ||
endmacro() | ||
|
||
#[[ | ||
Show vcpkg configurition | ||
]] | ||
macro(show_vcpkg_configuration) | ||
message(STATUS "VCPKG_HOST_TRIPLET ${VCPKG_HOST_TRIPLET}") | ||
message(STATUS "VCPKG_INSTALLED_DIR ${VCPKG_INSTALLED_DIR}") | ||
message(STATUS "VCPKG_TARGET_TRIPLET ${VCPKG_TARGET_TRIPLET}") | ||
message(STATUS "VCPKG_LIBRARY_LINKAGE ${VCPKG_LIBRARY_LINKAGE}") | ||
message(STATUS "VCPKG_TARGET_IS_WINDOWS ${VCPKG_TARGET_IS_WINDOWS}") | ||
message(STATUS "VCPKG_TARGET_IS_MINGW ${VCPKG_TARGET_IS_MINGW}") | ||
endmacro() | ||
|
||
|
||
# Debug configuration | ||
macro(add_debug_macro) | ||
if(CMAKE_BUILD_TYPE STREQUAL Debug) | ||
add_definitions(-D_DEBUG) | ||
message(STATUS "Ensure _DEBUG is defined for Debug configuration") | ||
endif() | ||
endmacro() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#[[ | ||
This module provides some common tools. | ||
]] | ||
|
||
include_guard(GLOBAL) | ||
|
||
#[[ | ||
Show installation directories | ||
]] | ||
macro(show_installation) | ||
foreach(_p LIB BIN INCLUDE CMAKE) | ||
file(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${_p}DIR} _path) | ||
message(STATUS "Show ${_p} components installation path: ${_path}") | ||
unset(_path) | ||
endforeach() | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters