Hello,

I use External_project and set up a cmake subproject that uses au specific 
CMAKE_COMMAND (a wrapper that does export environment variables)
This wrapper is correctly called on first configure but not if CMake decides to 
rerun CMake at build step.

[ 45%] Performing build step for 'lap_project'
cd /appli_RD/LACOSTE/OMEGA/cmakesuperbuild/build-gnu-debug/lap/build-debug && 
/appli_RD/LACOSTE/OMEGA/cmakesuperbuild/build-gnu-debug/make_wrapper_lap.sh
gmake[3]: entrant dans le répertoire « 
/appli_RD/LACOSTE/OMEGA/cmakesuperbuild/build-gnu-debug/lap/build-debug »
/appli_MTS/SIP/devtools/cmake/3.8.2/x86_64/Linux/SUSE11.3/bin/cmake 
-H/appli_RD/LACOSTE/OMEGA/cmakesuperbuild/lap 
-B/appli_RD/LACOSTE/OMEGA/cmakesuperbuild/build-gnu-debug/lap/build-debug 
--check-build-system CMakeFiles/Makefile.cmake 0
Re-run cmake file: Makefile older than: 
/appli_RD/LACOSTE/OMEGA/cmakesuperbuild/lap/test/CMakeLists.txt

My only workaround is to rm the project subdirectory and rerun make (in that 
case the wrapper is used):
[ 50%] Performing configure step for 'lap_project'
cd /appli_RD/LACOSTE/OMEGA/cmakesuperbuild/build-gnu-debug/lap/build-debug && 
/appli_RD/LACOSTE/OMEGA/cmakesuperbuild/build-gnu-debug/cmake_wrapper_lap.sh

I tried passing -DCMAKE_COMMAND=mywrapper.sh but it only raise a warning saying 
that this variable was not used by the project.

IMHO it’s a but in ExternalProject_add(). Correct ?

Any advice or help is welcome.

Regards,

XL.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to