-
Notifications
You must be signed in to change notification settings - Fork 106
Building with ninja
fails
#844
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
Comments
Do you mean doing something like : add_library(objlib_utilsf OBJECT ${CMAKE_SOURCE_DIR}/src/tests/utilsf.F90)
add_executable(pcgns_ftest ${pcgns_ftest_FILES} $<TARGET_OBJECTS:objlib_utilsf>)
add_executable(test_poly_unstructured_f90 ${test_poly_unstructured_f90_FILES} $<TARGET_OBJECTS:objlib_utilsf>) |
Close. I believe that is a deprecated way of doing it. Nowadays it's just like linking to a # Could also move this up a level
add_library(test_utils OBJECT ../utilsf.F90)
add_executable(pcgns_ftest ${pcgns_ftest_FILES})
target_link_libraries(pcgns_ftest PRIVATE test_utils)
add_executable(test_poly_unstructured_f90 ${test_poly_unstructured_f90_FILES})
target_link_libraries(test_poly_unstructured_f90 PRIVATE test_utils) (although for better visibility in that change, I would also remove the variables Because the build failed, I did not check if there are other equivalent failures that need to be patched. |
#845 should help with the ninja build |
@LecrisUT I tried to compile with Ninja to reproduce the issue but I do not manage to get the fortran to compile properly. Which version of Ninja do you recommend for a correct Fortran support ? |
I believe CMake only has one check for Ninja 1.11, but it should still work before that. What errors are you seeing? |
While trying to change the generator from
Makefile
toNinja
in Fedora we found out a build failure due to:The issue comes from duplications in (
utilsf.F90
)CGNS/src/ptests/CMakeLists.txt
Lines 96 to 115 in df2f656
The solution is to make either a
STATIC
orOBJECT
library that contains theutilsf.F90
and add it as atarget_link_libraries
instead.The text was updated successfully, but these errors were encountered: