-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2decomp-integration' of github.com:Nanoseb/x3d2 into 2d…
…ecomp-integration
- Loading branch information
Showing
3 changed files
with
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# - Find the 2decomp-fft library | ||
find_package(decomp2d | ||
PATHS ${CMAKE_SOURCE_DIR}/decomp2d/build) | ||
if (decomp2d_FOUND) | ||
message(STATUS "2decomp-fft FOUND") | ||
else(decomp2d_FOUND) | ||
message(STATUS "2decomp-fft PATH not available we'll try to download and install") | ||
configure_file(${CMAKE_SOURCE_DIR}/cmake/decomp2d/downloadBuild2decomp.cmake.in decomp2d-build/CMakeLists.txt) | ||
#message("Second CMAKE_GENERATOR ${CMAKE_GENERATOR}") | ||
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . | ||
RESULT_VARIABLE result | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/decomp2d-build ) | ||
if(result) | ||
message(FATAL_ERROR "CMake step for 2decomp-fft failed: ${result}") | ||
else() | ||
message("CMake step for 2decomp-fft completed (${result}).") | ||
endif() | ||
execute_process(COMMAND ${CMAKE_COMMAND} --build . | ||
RESULT_VARIABLE result | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/decomp2d-build ) | ||
if(result) | ||
message(FATAL_ERROR "Build step for 2decomp-fft failed: ${result}") | ||
endif() | ||
set(D2D_ROOT ${CMAKE_CURRENT_BINARY_DIR}/decomp2d-build/downloadBuild2decomp-prefix/src/downloadBuild2decomp-build) | ||
find_package(decomp2d REQUIRED | ||
PATHS ${D2D_ROOT}) | ||
endif(decomp2d_FOUND) |
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,26 @@ | ||
# downloadBuild2decomp.cmake.in | ||
# | ||
cmake_minimum_required(VERSION 3.0.2) | ||
|
||
project(downloadBuild2decomp NONE) | ||
|
||
include(ExternalProject) | ||
|
||
ExternalProject_Add(downloadBuild2decomp | ||
GIT_REPOSITORY "https://github.com/xcompact3d/2decomp-fft" | ||
GIT_TAG "v2.0.3" | ||
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/decomp2d-src" | ||
INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/decomp2d-opt" | ||
TEST_COMMAND "" | ||
) | ||
|
||
#ExternalProject_Add(downloadBuild2decomp | ||
# GIT_REPOSITORY "https://github.com/xcompact3d/2decomp-fft" | ||
# GIT_TAG "main" | ||
# CONFIGURE_COMMAND "cmake -S ${CMAKE_CURRENT_BINARY_DIR}/decomp2d-src " | ||
# BUILD_COMMAND "" | ||
# INSTALL_COMMAND "" | ||
# TEST_COMMAND "" | ||
# SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/decomp2d-src" | ||
# BINARY_DIR "" | ||
# INSTALL_DIR "" |
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