-
Notifications
You must be signed in to change notification settings - Fork 9
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
CMake 3.3.2 #16
Comments
Hi @jacopo-chevallard , sorry, but I was not aware of the FPL issues... Currently I'm using CMAKE 3.2.3. I'm going to download and try to reproduce your issue. Thanks for reporting it! 👍 |
@jacopo-chevallard I have tried with CMake 3.5.2 and it works fine for me. In the CMakeLists.txt file in the test folder, I build the test target names from the test filenames. It seems that CMake is telling you that you are trying to create more than 1 test with the same name and, in the case of FPL, it only occurs if some files have the same name (????). I have experienced that temporary emacs files (.#filename.f90) can be understood like "valid" sources for the test targets and cause this kind of problems. Please, check that your tests folders does not contain any extra file before the CMake configure step. I have to think how can I fix this... Let me know if it works for you! :) |
Sorry, I had lost track of this issue. In the end, I commented out from CMake the compilation of the tests, and just built the library. I confirm, however, that even after updating to CMake 3.5.2 I get the same error. I just tried the following commands
and obtained again the errors reported above. |
first of all, the git command to clone that you have to use to also clone submodules is: Are you sure that you don't have extra files in Sorry, but I'm not able to reproduce the error you are reporting ... it compiles as expected for me using different versions of CMake. |
Are you also testing on a Mac OS X? |
No, sorry I don't have access to Mac OS X. I will be very grateful if you could tell me what happens if you try to change It could help to understand what files are in conflict. |
If i replace
|
Yes ... of course ... it was my fault, sorry. This is a valid (for me) #################################################################
# TESTS
#################################################################
FILE(GLOB_RECURSE TESTS_SRC *.f90 *.F90)
SET(TESTS_SRC ${TESTS_SRC} PARENT_SCOPE)
#################################################################
# EXTERNAL LIBRARIES
#################################################################
FOREACH(TEST_SRC ${TESTS_SRC})
GET_FILENAME_COMPONENT(EXE_NAME ${TEST_SRC} NAME_WE)
GET_FILENAME_COMPONENT(FILE_EXT ${TEST_SRC} EXT)
SET(EXE_NAME "${EXE_NAME}${FILE_EXT}")
ADD_EXECUTABLE(${EXE_NAME} ${TEST_SRC})
TARGET_LINK_LIBRARIES(${EXE_NAME} ${LIB})
FOREACH (EXT_LIB ${EXT_LIBS})
IF(DEFINED ${PROJECT_NAME}_ENABLE_${EXT_LIB} AND ${PROJECT_NAME}_ENABLE_${EXT_LIB} AND ${EXT_LIB}_FOUND)
TARGET_LINK_LIBRARIES(${EXE_NAME} ${${EXT_LIB}_LIBRARIES})
ENDIF()
ENDFOREACH()
ADD_TEST(${EXE_NAME}_TEST ${EXECUTABLE_OUTPUT_PATH}/${EXE_NAME})
ENDFOREACH() |
I still get the same errors with the above |
Ok, sorry. I need to get access to Mac OS X to try what is happening by myself... I think that the best (temporal) option now is to create an option in the main It's ok for you? |
Sure, this is what I did manually, by removing the compilation of the tests. In any case, this is a wonderful module, definitely the nearest thing to a Python dictionary for Fortran that I've seen around, I'm using it extensively in my codes, for instance to pass the equivalent of **kwargs to routines. Great job! :) |
Thanks, you are so kind! :) Let me know any suggestion to improve FPL! |
use: cmake -DFPL_ENABLE_TESTS=ON -DFPL_ENABLE_EXAMPLES=ON $SOURCE_DIR First aproach (but not a real solution) to solve issue #16
use: cmake -DFPL_ENABLE_TESTS=ON -DFPL_ENABLE_EXAMPLES=ON $SOURCE_DIR First aproach (but not a real solution) to solve issue #16
Hi @jacopo-chevallard , I still without understanding the problem ... But I've read that if you add |
use: cmake -DFPL_ENABLE_TESTS=ON -DFPL_ENABLE_EXAMPLES=ON $SOURCE_DIR First aproach (but not a real solution) to solve issue #16
I'm having troubles in compiling FPL with CMake 3.3.2 on a Mac OS X (with GCC 5.2)
If I run
cmake ..
from mybuild
directory I getAny idea?
The text was updated successfully, but these errors were encountered: