Hey!
I have tried to make a new cmake project with the current cmakelist text
file
SET(TARGET "kfli")
SET(TARGET_SRC
kfli.cc
)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
FIND_PACKAGE(deal.II 9.3.3 QUIET
HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
)
IF(NOT ${deal.II_FOUND})
MESSAGE(FATAL_ERROR "\n"
"*** Could not locate a (sufficiently recent) version of deal.II.
***\n\n"
"You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to
cmake\n"
"or set an environment variable \"DEAL_II_DIR\" that contains this
path."
)
ENDIF()
#
# Are all dependencies fulfilled?
#
IF(NOT DEAL_II_WITH_TRILINOS)
MESSAGE(FATAL_ERROR "
Error! The deal.II library found at ${DEAL_II_PATH} was not configured with
DEAL_II_WITH_TRILINOS = ON
One or all of these are OFF in your installation but are required for this
tutorial step."
)
ENDIF()
DEAL_II_INITIALIZE_CACHED_VARIABLES()
PROJECT(${TARGET})
IF(WIN32)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LTCG")
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Od /MP")
ELSE()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ob2 /Oi /Ot /GL /MP")
ENDIF()
ELSE()
IF(NOT(CMAKE_BUILD_TYPE STREQUAL "Debug"))
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
ENDIF()
ENDIF()
include_directories(${DEAL_II_INCLUDE_DIRS})
add_library(${TARGET} ${TARGET_SRC})
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
DEAL_II_SETUP_TARGET(${TARGET} DEBUG)
ELSE()
DEAL_II_SETUP_TARGET(${TARGET} RELEASE)
ENDIF()
add_subdirectory(examples)
install(TARGETS ${TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
When I run this with
cmake -DDEAL_II_DIR=~/deal.II -DDEAL_II_WITH_MPI=ON
-DDEAL_II_WITH_TRILINOS=ON
-DTRILINOS_DIR=/home/shoopawax/spack/opt/spack/linux-ubuntu22.04-zen2/gcc-11.2.0/trilinos-13.0.1-wa34uf3ac22ppigikuf65nykw73zoovs
-DDEAL_II_WITH_P4EST=ON
-DP4EST_DIR=/home/shoopawax/spack/opt/spack/linux-ubuntu22.04-zen2/gcc-11.2.0/p4est-2.8-h3wrhiw7p5snzhhcnmplwmwmekpynkfo
-DCMAKE_INSTALL_PREFIX=~/deal.II ~/dealii-9.3.3/
The whole deal.ii library is built from scratch and a bunch of folders like
lib, doc, examples, bin, bundles, etc. I don't know what I'm doing wrong. I
copied the cmakelist text from another project on github and that project
runs without building from scratch or multiple folders. What am I doing
wrong?
Best regards,
Kristoffer
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/e5d50972-6691-4f1c-852d-851af058732fn%40googlegroups.com.