STORM-IRIT / Radium-Engine

Research 3D Engine for rendering, animation and processing
https://storm-irit.github.io/Radium-Engine/
Apache License 2.0
100 stars 50 forks source link

cmake external update skip needs to set status for all externals #557

Closed MathiasPaulin closed 4 years ago

MathiasPaulin commented 4 years ago

If one set a RADIUM_SKIP_XXX_EXTERNAL to OFF, all externals will be updated and not only the one identified by XXX. If one wants to update only an external, all others must be explicitely set to ON . This seems a little counter-intuitive

dlyr commented 4 years ago

could you give the commands you have tested and the relevant part to check what is going wrong ?

MathiasPaulin commented 4 years ago

After the first configuration/installation of externals command : cmake -DCMAKE_BUILD_TYPE=Release -DRADIUM_IO_ASSIMP=ON output :

...
[addExternalFolder] Skip Core::external update (use RADIUM_SKIP_CORE_EXTERNAL to change behavior)
...
[addExternalFolder] Skip IO::external update (use RADIUM_SKIP_IO_EXTERNAL to change behavior)
...
[addExternalFolder] Skip Engine::external update (use RADIUM_SKIP_ENGINE_EXTERNAL to change behavior)
...

Then to force updating of IO only (and, unexpected, all is updated) : cmake -DCMAKE_BUILD_TYPE=Release -DRADIUM_SKIP_IO_EXTERNAL=OFF -DRADIUM_IO_ASSIMP=ON messages :

...
-- [addExternalFolder] Configure cmake project
-- Configuring done
-- Generating done
-- Build files have been written to: /ssd/mathias/RadiumEcosystem/Radium-Engine/cmake-build-release/src/Core/external
-- [addExternalFolder] Start build
[  4%] Performing update step for 'Eigen3'
[  8%] Performing update step for 'cpplocate'
[ 12%] Performing update step for 'OpenMesh'
[ 16%] Performing configure step for 'Eigen3'
[ 20%] Performing configure step for 'cpplocate'
[ 25%] Performing configure step for 'OpenMesh'
... output from compile(nothing to do)/install messages(up to date)
...
-- [addExternalFolder] Create temporary directory
-- [addExternalFolder] Configure cmake project with options -DRADIUM_IO_ASSIMP=ON;-DRADIUM_IO_TINYPLY=ON
-- Configuring done
-- Generating done
-- Build files have been written to: /ssd/mathias/RadiumEcosystem/Radium-Engine/cmake-build-release/src/IO/external
-- [addExternalFolder] Start build
[  6%] Performing update step for 'assimp'
[ 12%] Performing update step for 'tinyply'
[ 18%] Performing configure step for 'assimp'
[ 25%] Performing configure step for 'tinyply'
... expected messages for IO external
...
-- [addExternalFolder] Create temporary directory
-- [addExternalFolder] Configure cmake project
-- Configuring done
-- Generating done
-- Build files have been written to: /ssd/mathias/RadiumEcosystem/Radium-Engine/cmake-build-release/src/Engine/external
-- [addExternalFolder] Start build
[  3%] Performing update step for 'glbinding'
[  6%] Performing update step for 'stb'
[  9%] Performing update step for 'glm'
[ 12%] Performing configure step for 'glbinding'
[ 15%] Performing configure step for 'glm'
[ 18%] No configure step for 'stb'
[ 21%] Performing build step for 'stb'
... output from compile(nothing to do)/install messages(up to date)

If being verbose at the configuration, we have the expected result on setting just one external update cmake -DCMAKE_BUILD_TYPE=Release -DRADIUM_SKIP_IO_EXTERNAL=OFF -DRADIUM_SKIP_CORE_EXTERNAL=ON -DRADIUM_SKIP_ENGINE_EXTERNAL=ON -DRADIUM_IO_ASSIMP=ON messages :

...
[addExternalFolder] Skip Core::external update (use RADIUM_SKIP_CORE_EXTERNAL to change behavior)
...
-- [addExternalFolder] Create temporary directory
-- [addExternalFolder] Configure cmake project with options -DRADIUM_IO_ASSIMP=ON;-DRADIUM_IO_TINYPLY=ON
-- Configuring done
-- Generating done
-- Build files have been written to: /ssd/mathias/RadiumEcosystem/Radium-Engine/cmake-build-release/src/IO/external
-- [addExternalFolder] Start build
[  6%] Performing update step for 'assimp'
[ 12%] Performing update step for 'tinyply'
[ 18%] Performing configure step for 'assimp'
[ 25%] Performing configure step for 'tinyply'
... expected messages for IO external
...
[addExternalFolder] Skip Engine::external update (use RADIUM_SKIP_ENGINE_EXTERNAL to change behavior)
...
dlyr commented 4 years ago

I could not reproduce on current master, cmake version 3.16.3 I have the expected behavior. Could you check cmake cache cmake -L

MathiasPaulin commented 4 years ago

I suspect an IDE problem (I have the same problem using CLion under MacOs, Linux and Windows). In a terminal, for MacOs and Linux, i got the expected behavior. Issue closed until I found what generates this as after a first build in terminal, the problem disappear even on CLion.