-
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 crosscompiling settings (#43)
Signed-off-by: msclock <msclock@qq.com>
- Loading branch information
Showing
5 changed files
with
33 additions
and
0 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
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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#[[ | ||
Default to installation. | ||
]] | ||
include_guard(GLOBAL) |
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
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 |
---|---|---|
@@ -1,3 +1,27 @@ | ||
#[[ | ||
Default to test | ||
]] | ||
|
||
include_guard(GLOBAL) | ||
|
||
# This variable is only used when ``CMAKE_CROSSCOMPILING`` is on. It should | ||
# point to a command on the host system that can run executable built for the | ||
# target system. | ||
if(WIN32 AND NOT ${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows") | ||
# We're building for Windows on a different operating system. | ||
find_program( | ||
WINE | ||
NAMES "wine" "wine64" "wine-development" | ||
DOC "Wine (to run tests)") | ||
|
||
if(WINE) | ||
message( | ||
STATUS "The following Wine binary will be used to run tests: \"${WINE}\"") | ||
set(CMAKE_CROSSCOMPILING_EMULATOR ${WINE}) | ||
else() | ||
message( | ||
WARNING | ||
"You are cross-compiling for Windows but don't have Wine, you will not be able to run tests." | ||
) | ||
endif() | ||
endif() |