Make cmake include starpu_simgrid_wrap.h only after tests
Because it #define main and thus makes link tests fail.
Merge request reports
Activity
Thanks @thibault. I don't see any potential issue with this merge request as protected by CHAMELEON_SIMULATION. Green light for me.
@furmento btw, that's the reason for the option parsing error in simgrid mode
added 17 commits
-
168c6d1f...45c82f14 - 17 commits from branch
solverstack:master
-
168c6d1f...45c82f14 - 17 commits from branch
@thibault I forced a push on you master branch to rebase this MR and merge it.
added 1 commit
- 40514e2a - Make cmake include starpu_simgrid_wrap.h only after tests
enabled an automatic merge when the pipeline for 40514e2a succeeds
mentioned in commit 9d11d21a
Indeed. It happens that chameleon.h includes simulate.h which includes starpu_simgrid_wrap.h, so that's why it actually works without the -include. It would be for external applications, in which the .c file that defines main() could perhaps not include chameleon.h, that it would be needed.
Err, it seems this has come back in both cmake places?!
$ git clone --recursive git@gitlab.inria.fr:solverstack/chameleon.git $ cd chameleon $ grep -r simgrid_wrap . ./include/chameleon/simulate.h:#include <starpu_simgrid_wrap.h> ./cmake_modules/morse_cmake/modules/find/FindSTARPU.cmake: list(APPEND REQUIRED_FLAGS "-include starpu_simgrid_wrap.h") ./CMakeLists.txt:# Make cmake include starpu_simgrid_wrap.h (which #define main and thus makes # ./CMakeLists.txt: list(APPEND CMAKE_REQUIRED_FLAGS "-include" "starpu_simgrid_wrap.h")
(showing up in CMakeLists.txt is expected, in
./cmake_modules/morse_cmake/modules/find/FindSTARPU.cmake
it isn't.)It seems like it's d73d6858 which reverted cmake_modules to dd40b792c7f27bd8644e7837b17dbc876f92eec7
I have submitted !110 (merged) which sets it back to f99bada1af8f986d91f651eb9748d0ac6367ef5e