diff --git a/.conda/voxelizer/build.sh b/.conda/voxelizer/build.sh index 583dfbeec..783091b53 100644 --- a/.conda/voxelizer/build.sh +++ b/.conda/voxelizer/build.sh @@ -2,9 +2,23 @@ source "$RECIPE_DIR/../cross-compile-setup.sh" export CMAKE_CXX_FLAGS=$PATCHED_CXXFLAGS -cd src/Voxelizer # Use the --prefix flag here because we are # not using the *host* python to do this. We are (against Anaconda's recommendations) # using the *build* python here, since we actually need to do cross compilation # not really sure how to do the cross compilation with python. -pip install --prefix=$PREFIX +###DANpip install --prefix=$PREFIX + +cd src/Voxelizer +mkdir -p build +cd build +cmake .. \ + -D CMAKE_BUILD_TYPE:STRING=RELEASE \ + -D CMAKE_INSTALL_PREFIX:PATH=$PREFIX \ + -D CMAKE_CXX_STANDARD:STRING=17 \ + -D VECTOR_ARCH_FLAGS="$VECTOR_ARCH_FLAGS" \ + -D STANDALONE_VOXELIZER=ON \ + $CMAKE_ARGS \ + $SRC_DIR \ + -D CMAKE_CXX_FLAGS="$PATCHED_CXXFLAGS" \ + +make install diff --git a/.conda/voxelizer/meta.yaml b/.conda/voxelizer/meta.yaml index 7343ebf81..ac9179a93 100644 --- a/.conda/voxelizer/meta.yaml +++ b/.conda/voxelizer/meta.yaml @@ -16,16 +16,17 @@ requirements: - cmake >=3.17.0 - {{ compiler('cxx') }}={{ linux_compiler_version }} # [linux] - {{ compiler('cxx') }}={{ macos_compiler_version }} # [osx] - - python={{ python }} - - pybind11 - - setuptools + - elements + #- python={{ python }} + #- pybind11 + #- setuptools host: - - python={{ python }} + #- python={{ python }} - elements - - llvm-openmp + - llvm-openmp # [osx] run: - - python={{ python }} - - llvm-openmp + #- python={{ python }} + #- llvm-openmp # [osx] test: imports: diff --git a/src/Voxelizer/CMakeLists.txt b/src/Voxelizer/CMakeLists.txt index d34f4ebc6..8e745786c 100644 --- a/src/Voxelizer/CMakeLists.txt +++ b/src/Voxelizer/CMakeLists.txt @@ -7,6 +7,8 @@ set(CMAKE_CXX_STANDARD 17) #find_package(Kokkos REQUIRED) #find_package(Matar REQUIRED) find_package(Elements REQUIRED) + +if (NOT STANDALONE_VOXELIZER) find_package(MPI REQUIRED) # Assume if the CXX compiler exists, the rest do too. @@ -21,6 +23,9 @@ if(NOT DISTRIBUTION) set(CMAKE_C_FLAGS "${Trilinos_C_COMPILER_FLAGS} ${CMAKE_C_FLAGS}") set(CMAKE_Fortran_FLAGS "${Trilinos_Fortran_COMPILER_FLAGS} ${CMAKE_Fortran_FLAGS}") endif() +include_directories(${Trilinos_INCLUDE_DIRS} ${Trilinos_TPL_INCLUDE_DIRS}) +link_directories(${Trilinos_LIBRARY_DIRS} ${Trilinos_TPL_LIBRARY_DIRS}) +endif() # end non-standalone #add_definitions(-DHAVE_KOKKOS=1) @@ -29,9 +34,6 @@ target_include_directories(voxelizer PUBLIC include) #target_link_libraries(voxelizer matar Kokkos::kokkos) target_link_libraries(voxelizer Elements) -include_directories(${Trilinos_INCLUDE_DIRS} ${Trilinos_TPL_INCLUDE_DIRS}) -link_directories(${Trilinos_LIBRARY_DIRS} ${Trilinos_TPL_LIBRARY_DIRS}) - add_executable(fierro-voxelizer src/main.cpp) target_link_libraries(fierro-voxelizer voxelizer) #target_compile_options(fierro-voxelizer PRIVATE "-fopenmp")