-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build Fortran examples #93
Comments
What are the contents of the context.cmake file? and context-*.cmake file? |
The issue is not what is in content.cmake but rather where it is located. The install/opencmisslibs-config.cmake looks for context.cmake via Include the context settings infoinclude(${_CONTEXT_PATH}/context.cmake) with set(_CONTEXT_PATH "${_OPENCMISS_IMPORT_PREFIX}${ARCHPATHNOMPI}") The ${ARCHPATHNOMPI} depends on a number of things like OS, system, compiler, etc. etc. The current opencmisslibs-config.cmake does not check things like compiler etc. etc. before setting the arch path and thus it can not know what the right arch path is. |
In addtion, a number of the compiler variables need to be set before project is called from the orginal example CMakeLists.txt so selecting the compiler/mpi/etc. needs to be done there. |
What do the lines 62:70 show in the opencmisslibs-config.cmake file? |
############################################################################# Assemble architecture-path dependent search locationsset(ARCHPATH /.) |
Trouble is the OCArchitecturePathFunctions etc will need the OPENCMISS_TOOLCHAIN and OPENCMISS_MPI variables etc. to be set and it will not be good enough to set them as the compiler etc. needs to be set before the PROJECT call in the example CMakeLists.txt. |
There are still problems building Fortran examples with the new build system. I updated my setup, manage, cmake_modules to the latest develop versions, completely deleted my build and install trees, and rebuilt OpenCMISS. Trying to build the Burgers Fortran example using the same CMakeLists.txt files that Soroush used gives
cmake -DOpenCMISSLibs_DIR=/data/OpenCMISS/install ../../.
CMake Error at /data/OpenCMISS/install/opencmisslibs-config.cmake:74 (include):
include could not find load file:
Call Stack (most recent call first):
CMakeLists.txt:28 (find_package)
CMake Error at /data/OpenCMISS/install/opencmisslibs-config.cmake:81 (message):
Mismatch between the current context toolchain () and the toolchain in use
(gnu).
Call Stack (most recent call first):
CMakeLists.txt:28 (find_package)
-- Configuring incomplete, errors occurred!
The first error is that the architecture path has not been set properly by the CMake scripts. This is not surprising as the toolchain, MPI etc. etc. is not considered as per #86. This then leads to the second error of mismatch.
The text was updated successfully, but these errors were encountered: