Closed victorsndvg closed 7 years ago
Dear @victorsndvg
your are my preferred *CMake pusher" :smile:
I like to support as more build-tools as possible, but I do not know CMake, thus your help is more than welcome. Feel free to create a pull request from your forks, I will happy to accept them :clap:
Thank you very much!
P.S. the PDE experiments are going well... @francescosalvadore and @andreadimascio are genius... as soon as we obtain some results we will like to read your opinions.
@szaghi ,
note that in PENF I have split the main penf.F90 file in 4 files, one per module.
I don't know Fobis and I cannot change your compilation system.
If you are interested in this changes I can perform the merge request.
PDE looks very promising! :)
The fobos file (the FoBiS makefile equivalent) will not need to be changed as long as PENF.F90 is the main library entry: FoBiS build PENF.F90 as target, no matter if it depends on other sources. In case, all dependency of PENF.90 is automatically rebuilt. Moreover, building PENF.90 without fobos is as simple as type FoBiS build -t PENF.90
with the same automatic dependency check.
Please, go with your PR, I will happy to accept it.
P.S. PDE tests are very promising, but we are impinging on some issues of the abstract API design... we hope to obtain something for the next autumn, August is coming...
Hi @szaghi ,
I have seen that you use symbolic links of the added submodules. Can I delete it or is a must for the Fobis compilation system?
I think how to manage this with CMake
@victorsndvg It is not a must, just a convenient workaround to the boring of git submodules....
In my workflow I often (always?) would like to link (as third party dependency) only the sources of external projects, not the whole git repository (with a lot of other files, README, tests, scripts, licenses...). Unfortunately, with git submodule I can only link whole repositories, not single files. I tried to read git subtree but it seems that the same issue arises. Thus, I currently go with this workaround: the external project are sync by git submodule
and live into the src/third_party
directory. This directory is explicitely ignored by FoBiS. The necessary sources are sym linked into other src/#dirs
.
Another issues is the multiple instances of submodules when more than one submodules are present. Let us consider VTKFortran: it depends on PENF and StringiFor (and others), but StringiFor depends also on PENF... with git submodules I have two PENF, the principal one and the one inside the StringiFor submodule...
I really like to have the possibility to specify as dependency single files of a git repository to avoid such multiple-cascade hierarchy that is very confusing...
Ok, i'm going to maintain the symbolic link. PENF library has now several files. I've to include a symbolic link per file?
Yes I'm also experiencing this issue. This is why I like to treat external projects as libraries. Finally, if you have duplicated submodules, you can link your executable only against one of the generated libraries (and avoid -Wl,--allow-multiple-definition
) and not to include all symbols in a bigger library.
I think that this follows the "KISS" zen :)
Edit: with CMake i also like to give the possibility to disable tests/examples compilation to avoid "unnecessary" executables when you are using submodules
@victorsndvg you are right, but compiled library in Fortran is a pita to handle... the .mod files are not standard... they may be also incompatible withing the same compiler for different versions of it... a nightmare. The only portable library are source library :smile:
Is the --allow-multiple-definition
a gfortran option?
For KISS zen we must think to a better git workaround, I am not satisfied of git submule, definitely!
With CMake you can force to use the same compiler for 'external projects' compilation (i'm doing it!). If you are in charge of build the entire project (not pieze by pieze) you can be sure that all subprojects will be compatible.
I think --allow-multiple-definition
is a linker (ld) option. I'm using it with gfortran, ifort and xlf.
I'm agree with you about submodules. "Partial submodules" feature is the final solution!
@victorsndvg
Just a couple of considerations about submodules issues...
Currently, I add submodules with the specification to point to the master branch, e.g. StringiFor's modules definition is
[submodule "src/third_party/PENF"]
path = src/third_party/PENF
url = https://github.com/szaghi/PENF
branch = master
[submodule "src/third_party/BeFoR64"]
path = src/third_party/BeFoR64
url = https://github.com/szaghi/BeFoR64
branch = master
The idea is to specify a different branch instead of master
, say the sources
branch:
[submodule "src/third_party/PENF"]
path = src/third_party/PENF
url = https://github.com/szaghi/PENF
branch = sources
[submodule "src/third_party/BeFoR64"]
path = src/third_party/BeFoR64
url = https://github.com/szaghi/BeFoR64
branch = sources
The sources
branch contains only the main sources of the repository, i.e. for StringiFor it does not contain PENF sources. In this way the submodules into src/third_party
will never clutter the parent-repository with sources duplication.
This completely avoid the trick of sym-links to sanitize
sources.
The downside of this workaround consists mainly in the redundant work to keep in sync sources
branch with the master
one. However, I think such a stuff (keep in sync two branches) can be accomplished by means of git hooks.
What do you think about?
I think that specifying a branch breaks "commit flexibility". Currently you can point to a branch, tag or commit using its commit ID.
I'm agree with you, having a branch with the sources implies redundant work.
I was thinking in adding the path to the sources to the url, somethink like this:
[submodule "src/third_party/PENF"]
path = src/third_party/PENF
url = https://github.com/szaghi/PENF/src/lib
[submodule "src/third_party/BeFoR64"]
path = src/third_party/BeFoR64
url = https://github.com/szaghi/BeFoR64/src/lib
Note the /src/lib
at the end of the url
@victorsndvg I was not aware that we can point the url to a sub-directory... I am trying it now :smile:
as the commit flexibility
is concerned, I found that specifying the master branch solves many submodule init/pull/update
issues...
Noooo, we can't. It is only a proposal for the git team :smile:
@victorsndvg You deceived me :smile:
@victorsndvg
I have created a post-commit hook that takes care of sources
branch any time the master branch is committed. Soon I will test my aforementioned workaround :smile:
Any chance the CMake build script(s) will be merged into the main repository?
Hi Damian, I am traveling for work. When I come back I will merge @victor fork that supports cmake, I am sorry but cmake is too complex for me. I think that in few days we can have a cmake installation ready with the help of Victor. I should come in front of a pc tomorrow.
Il 26/set/2016 11:13, "Damian Rouson" notifications@github.com ha scritto:
Any chance the CMake build script(s) will be merged into the main repository?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/szaghi/FLAP/issues/64#issuecomment-249518956, or mute the thread https://github.com/notifications/unsubscribe-auth/ABlb9u0LMpfm-bLfYwEPAUrFiLQ2VEgJks5qt4yvgaJpZM4JMnSJ .
:clap:
Hi @szaghi , I think that my FLAP fork is not mergeable because is pointing to my PENF fork. If you want i can move my CMake files to a new branch into you repository.
Let me know you preferences!
@victorsndvg Hi Victor, I was writing with my 8-years old smartphone (I plan to bring to 18 :smile: ), my usually bad English becomes unreadable with it :smile:
I meant a manual merging... I will stole your knowledge of CMake to fill my ignorance :smile:
I prefer to call it "share" not "steal" :smile:
Please, feel free to take my CMake files and add them to the original FLAP repository.
I'm trying to learn how to use a CMake feature called configure files. I will tell you if there is any change in the CMake compilation system of FLAP.
@victorsndvg @rouson @zbeekman
My Dear, I have just stolen (sorry shared) Victor's CMake setup. Unluckily, I am not able to test it: Victor has tried to teach me how to build with CMake PENF, but when applied his teachings to FLAP I fail...
The current master branch has Victor's CMake setup. If you can test it (or teach to me the correct commands) I'll appreciate any feedback.
Cheers.
Hi @szaghi ,
it works for me. I'm only doing this:
mkdir build
cd build
cmake [-DFLAP_ENABLE_TESTS=ON] $FLAP_SRC_DIR
make
ctest # only if tests enabled
Can you "share" with us the error message?
Hi @victorsndvg
thank you for your help
stefano@zaghi(12:52 PM Tue Sep 27) on master
~/fortran/FLAP 17 files, 140Kb
→ mkdir build
stefano@zaghi(12:52 PM Tue Sep 27) on master
~/fortran/FLAP 18 files, 144Kb
→ cd build/
/home/stefano/fortran/FLAP/build
stefano@zaghi(12:52 PM Tue Sep 27) on master
~/fortran/FLAP/build 0 files, 8.0Kb
→ cmake -DFLAP_ENABLE_TESTS=ON ../src/lib/
-- The C compiler identification is GNU 6.2.1
-- The CXX compiler identification is GNU 6.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:6 (SET):
Cannot set "LIB_SRC": current scope has no parent.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at CMakeLists.txt:11 (ADD_LIBRARY):
Policy CMP0037 is not set: Target names should not be reserved and should
match a validity pattern. Run "cmake --help-policy CMP0037" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
The target name "/home/stefano/fortran/FLAP/src/lib/flap.f90" is reserved
or not valid for certain CMake features, such as generator expressions, and
may result in undefined behavior.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.6)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
CMake Error: Cannot determine link language for target "/home/stefano/fortran/FLAP/src/lib/flap.f90".
CMake Error: CMake can not determine linker language for target: /home/stefano/fortran/FLAP/src/lib/flap.f90
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
FLAP_ENABLE_TESTS
-- Build files have been written to: /home/stefano/fortran/FLAP/build
stefano@zaghi(12:53 PM Tue Sep 27) on master [?]
~/fortran/FLAP/build 5 files, 40Kb
→ make
make[2]: *** No rule to make target 'CMakeFiles//home/stefano/fortran/FLAP/src/lib/flap.f90.dir/depend'. Stop.
make[1]: *** [CMakeFiles/Makefile2:67: CMakeFiles/home/stefano/fortran/FLAP/src/lib/flap.f90.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
stefano@zaghi(12:53 PM Tue Sep 27) on master [?]
~/fortran/FLAP/build 5 files, 40Kb
→ ctest
*********************************
No test configuration file found!
*********************************
Usage
ctest [options]
stefano@zaghi(12:53 PM Tue Sep 27) on master [?]
~/fortran/FLAP/build 5 files, 40Kb
Oh... maybe the path is not the src/lib but simply the main root of FLAP project?
Yes, you are right. You have to pass the directory containing the main CMakeLists.txt file, try with the root directory of the FLAP clone and tell if it works.
no, this also fails
stefano@zaghi(12:53 PM Tue Sep 27) on master [?]
~/fortran/FLAP/build 5 files, 40Kb
→ rm -rf *
stefano@zaghi(12:55 PM Tue Sep 27) on master
~/fortran/FLAP/build 0 files, 8.0Kb
→ cmake -DFLAP_ENABLE_TESTS=ON ../
-- The Fortran compiler identification is GNU 6.2.1
-- Check for working Fortran compiler: /usr/bin/f95
-- Check for working Fortran compiler: /usr/bin/f95 -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/f95 supports Fortran 90
-- Checking whether /usr/bin/f95 supports Fortran 90 -- yes
-- COMPILER INFO: GNU - f95
-- CMAKE_Fortran_COMPILER full path: /usr/bin/f95
-- CMAKE_Fortran_FLAGS: -fdefault-real-8 -ffree-line-length-0 -cpp -Wimplicit-interface
-- CMAKE_Fortran_FLAGS_RELEASE: -O3
-- CMAKE_Fortran_FLAGS_DEBUG: -g -fbacktrace -fbounds-check -fprofile-arcs -ftest-coverage -Wimplicit-interface
PENF_SRC_PATH: /home/stefano/fortran/FLAP/src/third_party/PENF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stefano/fortran/FLAP/build
stefano@zaghi(12:55 PM Tue Sep 27) on master [?]
~/fortran/FLAP/build 15 files, 100Kb
→ make
/usr/bin/cmake -H/home/stefano/fortran/FLAP -B/home/stefano/fortran/FLAP/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/stefano/fortran/FLAP/build/CMakeFiles /home/stefano/fortran/FLAP/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/stefano/fortran/FLAP/build'
make -f CMakeFiles/PENF.dir/build.make CMakeFiles/PENF.dir/depend
make -f src/lib/CMakeFiles/FLAP.dir/build.make src/lib/CMakeFiles/FLAP.dir/depend
make[2]: Entering directory '/home/stefano/fortran/FLAP/build'
cd /home/stefano/fortran/FLAP/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/stefano/fortran/FLAP /home/stefano/fortran/FLAP /home/stefano/fortran/FLAP/build /home/stefano/fortran/FLAP/build /home/stefano/fortran/FLAP/build/CMakeFiles/PENF.dir/DependInfo.cmake --color=
make[2]: Entering directory '/home/stefano/fortran/FLAP/build'
cd /home/stefano/fortran/FLAP/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/stefano/fortran/FLAP /home/stefano/fortran/FLAP/src/lib /home/stefano/fortran/FLAP/build /home/stefano/fortran/FLAP/build/src/lib /home/stefano/fortran/FLAP/build/src/lib/CMakeFiles/FLAP.dir/DependInfo.cmake --color=
Scanning dependencies of target PENF
make[2]: Leaving directory '/home/stefano/fortran/FLAP/build'
make -f CMakeFiles/PENF.dir/build.make CMakeFiles/PENF.dir/build
make[2]: Entering directory '/home/stefano/fortran/FLAP/build'
Scanning dependencies of target FLAP
[ 3%] Creating directories for 'PENF'
/usr/bin/cmake -E make_directory /home/stefano/fortran/FLAP/src/third_party/PENF
make[2]: Leaving directory '/home/stefano/fortran/FLAP/build'
make -f src/lib/CMakeFiles/FLAP.dir/build.make src/lib/CMakeFiles/FLAP.dir/requires
/usr/bin/cmake -E make_directory /home/stefano/fortran/FLAP/build/third_party/PENF
make[2]: Entering directory '/home/stefano/fortran/FLAP/build'
make -f src/lib/CMakeFiles/FLAP.dir/build.make src/lib/CMakeFiles/FLAP.dir/flap_object_t.f90.o.provides.build
make -f src/lib/CMakeFiles/FLAP.dir/build.make src/lib/CMakeFiles/FLAP.dir/flap_utils_m.f90.o.provides.build
make[3]: Entering directory '/home/stefano/fortran/FLAP/build'
make[3]: Entering directory '/home/stefano/fortran/FLAP/build'
/usr/bin/cmake -E make_directory /home/stefano/fortran/FLAP/build/PENF-prefix
/usr/bin/cmake -E make_directory /home/stefano/fortran/FLAP/build/PENF-prefix/tmp
[ 7%] Building Fortran object src/lib/CMakeFiles/FLAP.dir/flap_utils_m.f90.o
cd /home/stefano/fortran/FLAP/build/src/lib && /usr/bin/f95 -DDEBUG -DGNU -Dmemcheck -I/home/stefano/fortran/FLAP/build/modules -I/home/stefano/fortran/FLAP/build/third_party/PENF/modules -fdefault-real-8 -ffree-line-length-0 -cpp -Wimplicit-interface -g -fbacktrace -fbounds-check -fprofile-arcs -ftest-coverage -Wimplicit-interface -J../../modules -c /home/stefano/fortran/FLAP/src/lib/flap_utils_m.f90 -o CMakeFiles/FLAP.dir/flap_utils_m.f90.o
[ 10%] Building Fortran object src/lib/CMakeFiles/FLAP.dir/flap_object_t.f90.o
cd /home/stefano/fortran/FLAP/build/src/lib && /usr/bin/f95 -DDEBUG -DGNU -Dmemcheck -I/home/stefano/fortran/FLAP/build/modules -I/home/stefano/fortran/FLAP/build/third_party/PENF/modules -fdefault-real-8 -ffree-line-length-0 -cpp -Wimplicit-interface -g -fbacktrace -fbounds-check -fprofile-arcs -ftest-coverage -Wimplicit-interface -J../../modules -c /home/stefano/fortran/FLAP/src/lib/flap_object_t.f90 -o CMakeFiles/FLAP.dir/flap_object_t.f90.o
/usr/bin/cmake -E make_directory /home/stefano/fortran/FLAP/build/PENF-prefix/src/PENF-stamp/.
/usr/bin/cmake -E make_directory /home/stefano/fortran/FLAP/build/PENF-prefix/src
f951: Warning: Nonexistent include directory ‘/home/stefano/fortran/FLAP/build/third_party/PENF/modules’ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory ‘/home/stefano/fortran/FLAP/build/third_party/PENF/modules’ [-Wmissing-include-dirs]
/usr/bin/cmake -E touch /home/stefano/fortran/FLAP/build/PENF-prefix/src/PENF-stamp/./PENF-mkdir
/home/stefano/fortran/FLAP/src/lib/flap_utils_m.f90:6:4:
use penf
1
Fatal Error: Can't open module file ‘penf.mod’ for reading at (1): No such file or directory
compilation terminated.
/home/stefano/fortran/FLAP/src/lib/flap_object_t.f90:7:4:
use penf
1
Fatal Error: Can't open module file ‘penf.mod’ for reading at (1): No such file or directory
compilation terminated.
make[3]: *** [src/lib/CMakeFiles/FLAP.dir/build.make:138: src/lib/CMakeFiles/FLAP.dir/flap_utils_m.f90.o] Error 1
make[3]: Leaving directory '/home/stefano/fortran/FLAP/build'
make[3]: *** [src/lib/CMakeFiles/FLAP.dir/build.make:114: src/lib/CMakeFiles/FLAP.dir/flap_object_t.f90.o] Error 1
make[3]: Leaving directory '/home/stefano/fortran/FLAP/build'
make[2]: *** [src/lib/CMakeFiles/FLAP.dir/build.make:153: src/lib/CMakeFiles/FLAP.dir/flap_utils_m.f90.o.provides] Error 2
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/lib/CMakeFiles/FLAP.dir/build.make:129: src/lib/CMakeFiles/FLAP.dir/flap_object_t.f90.o.provides] Error 2
make[2]: Leaving directory '/home/stefano/fortran/FLAP/build'
make[1]: *** [CMakeFiles/Makefile2:1022: src/lib/CMakeFiles/FLAP.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 14%] No download step for 'PENF'
cd /home/stefano/fortran/FLAP/build/PENF-prefix/src && /usr/bin/cmake -E echo_append
cd /home/stefano/fortran/FLAP/build/PENF-prefix/src && /usr/bin/cmake -E touch /home/stefano/fortran/FLAP/build/PENF-prefix/src/PENF-stamp/./PENF-download
[ 17%] No patch step for 'PENF'
/usr/bin/cmake -E echo_append
[ 21%] No update step for 'PENF'
/usr/bin/cmake -E echo_append
/usr/bin/cmake -E touch /home/stefano/fortran/FLAP/build/PENF-prefix/src/PENF-stamp/./PENF-patch
/usr/bin/cmake -E touch /home/stefano/fortran/FLAP/build/PENF-prefix/src/PENF-stamp/./PENF-update
[ 25%] Performing configure step for 'PENF'
cd /home/stefano/fortran/FLAP/build/third_party/PENF && cmake -DBUILD_SHARED_LIBS= -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_Fortran_COMPILER=/usr/bin/f95 /home/stefano/fortran/FLAP/src/third_party/PENF
-- The Fortran compiler identification is GNU 6.2.1
-- Check for working Fortran compiler: /usr/bin/f95
-- Check for working Fortran compiler: /usr/bin/f95 -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/f95 supports Fortran 90
-- Checking whether /usr/bin/f95 supports Fortran 90 -- yes
-- COMPILER INFO: GNU - f95
-- CMAKE_Fortran_COMPILER full path: /usr/bin/f95
-- CMAKE_Fortran_FLAGS: -fdefault-real-8 -ffree-line-length-0 -cpp -Wimplicit-interface
-- CMAKE_Fortran_FLAGS_RELEASE: -O3
-- CMAKE_Fortran_FLAGS_DEBUG: -g -fbacktrace -fbounds-check -fprofile-arcs -ftest-coverage -Wimplicit-interface
-- Configuring done
-- Generating done
-- Build files have been written to: /home/stefano/fortran/FLAP/build/third_party/PENF
cd /home/stefano/fortran/FLAP/build/third_party/PENF && /usr/bin/cmake -E touch /home/stefano/fortran/FLAP/build/PENF-prefix/src/PENF-stamp/./PENF-configure
[ 28%] Performing build step for 'PENF'
cd /home/stefano/fortran/FLAP/build/third_party/PENF && cmake --build .
make[3]: Entering directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[4]: Entering directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
make[5]: Entering directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
Scanning dependencies of target PENF
make[5]: Leaving directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
make[5]: Entering directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
make[6]: Entering directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
[ 20%] Building Fortran object src/lib/CMakeFiles/PENF.dir/penf_global_parameters_variables.F90.o
make[6]: Leaving directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
make[6]: Entering directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
[ 40%] Building Fortran object src/lib/CMakeFiles/PENF.dir/penf_b_size.F90.o
make[6]: Leaving directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
make[6]: Entering directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
[ 60%] Building Fortran object src/lib/CMakeFiles/PENF.dir/penf_stringify.F90.o
make[6]: Leaving directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
make[5]: Leaving directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
make[5]: Entering directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
[ 80%] Building Fortran object src/lib/CMakeFiles/PENF.dir/penf.F90.o
[100%] Linking Fortran static library ../../lib/libPENF.a
make[5]: Leaving directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
[100%] Built target PENF
make[4]: Leaving directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
make[3]: Leaving directory '/home/stefano/fortran/FLAP/build/third_party/PENF'
cd /home/stefano/fortran/FLAP/build/third_party/PENF && /usr/bin/cmake -E touch /home/stefano/fortran/FLAP/build/PENF-prefix/src/PENF-stamp/./PENF-build
[ 32%] No install step for 'PENF'
cd /home/stefano/fortran/FLAP/build/third_party/PENF && /usr/bin/cmake -E echo_append
cd /home/stefano/fortran/FLAP/build/third_party/PENF && /usr/bin/cmake -E touch /home/stefano/fortran/FLAP/build/PENF-prefix/src/PENF-stamp/./PENF-install
[ 35%] No test step for 'PENF'
cd /home/stefano/fortran/FLAP/build/third_party/PENF && /usr/bin/cmake -E echo_append
cd /home/stefano/fortran/FLAP/build/third_party/PENF && /usr/bin/cmake -E touch /home/stefano/fortran/FLAP/build/PENF-prefix/src/PENF-stamp/./PENF-test
[ 39%] Completed 'PENF'
/usr/bin/cmake -E make_directory /home/stefano/fortran/FLAP/build/CMakeFiles/.
/usr/bin/cmake -E touch /home/stefano/fortran/FLAP/build/CMakeFiles/./PENF-complete
/usr/bin/cmake -E touch /home/stefano/fortran/FLAP/build/PENF-prefix/src/PENF-stamp/./PENF-done
make[2]: Leaving directory '/home/stefano/fortran/FLAP/build'
[ 39%] Built target PENF
make[1]: Leaving directory '/home/stefano/fortran/FLAP/build'
make: *** [Makefile:98: all] Error 2
but in this case the error seems more clear, it does not find PENF
Again, you are right. I've never experienced this problem calling make
, but I get the same error if i use make -j 4
.
Look at this commit to see how to fix it:
https://github.com/victorsndvg/FLAP/commit/038c704d0848c54020954c25ae8617f5eb77da72
Great, I always forget that my current bash setup has a default -j 8
... this bug repeatedly hinges my face... Now that I use FoBiS I forget why I left Make :trollface:
@victorsndvg @rouson
My dear, I think that now FLAP has a good CMake-based building system (thanks to @victorsndvg :pray: :clap: ). I am closing this issue and very soon I'all add more doc on how to build FLAP with CMake and the provided (amended) makefile.
Thank you very much for your help.
Hi @szaghi ,
look at the 2 last commits in my FLAP fork. I did 2 minor changes In CMake compilation system. This changes does not affect to the compilation process of FLAP. This changes are related with how to use FLAP in a bigger software subsystem as an external project (CMake concept). I only add PENF modules directory to the configuration file and change the link order of FLAP and PENF. You can see the diffs here:
@victorsndvg thanks!
Hi @szaghi ,
in my FLAP fork I've added CMakeLists.txt files to compile with CMake in this branch: https://github.com/victorsndvg/FLAP/tree/cmake_and_update_penf
I also did the same with PENF in my fork: https://github.com/victorsndvg/PENF
I need to do that because my projects needs them in this way.
Let me know if you are interested in some of this changes in your repo.
Best regards!