Closed mcraveiro closed 7 years ago
Hi @FrancescoCasalegno , could you or someone from BBP take a look at this issue please?
Actually @WeiliangChenOIST before you guys waste your time, let me just have a quick go - I think this may be a CMake thing rather than your code; your usage of CMake looks fine. I am testing it with a different library to see if there is something wrong with my CMake version (3.7.2 on Debian unstable).
Ok interesting so my test reveals that my CMake version works fine. On a totally separate project, using standard SWIG from CMake:
find_package(SWIG REQUIRED)
I get the expected error:
CMake Error at /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.7/Modules/FindSWIG.cmake:63 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:95 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/marco/Development/DomainDrivenConsulting/dogen/build/output/gcc/Release/CMakeFiles/CMakeOutput.log".
See also "/home/marco/Development/DomainDrivenConsulting/dogen/build/output/gcc/Release/CMakeFiles/CMakeError.log".
Error running CMake.
The plot thickens. There is something not quite right with your CMake file. Investigating some more...
I found the bug: REQUIRED was not implemented properly in CMake/FindSWIG3.cmake. I will send a pull request in 5 minutes.
Ah most interesting - will be very curious to see the patch! grazie mille @FrancescoCasalegno
Hi STEPS developers,
I just noticed a minor bug on your build system: even though SWIG is marked as required, CMake still goes ahead and generates all the makefiles:
The normal CMake behaviour is to bomb out when a required dependency is missing. I am investigating as to why this is not working correctly, your CMake files look fine at first glance.