20.11.18 23:29, Brad King wrote:
SOURCE_DATE_EPOCH was created for use by packagers where tools
already wrap the build.  By making it an environment variable
packagers could jump through any number of build system layers
with no patching.

That's makes me confused, because CMake has CPack.
And with CPack process looks like:
- `cmake && make package`
So there are no any packagers tools, all work done with CMake.

Build systems configure compilers with command-line flags, not
environment variables.  If you want to do this from within the
build system then GCC could be taught a new option for that.

You could try hacking it with `CMAKE_<LANG>_COMPILER_LAUNCHER`:

   https://cmake.org/cmake/help/v3.13/variable/CMAKE_LANG_COMPILER_LAUNCHER.html

e.g. -DCMAKE_C_COMPILER_LAUNCHER='env;SOURCE_DATE_EPOCH=1' or

```cmake
set(CMAKE_C_COMPILER_LAUNCHER env SOURCE_DATE_EPOCH=1)
```

Thank you, I will try that.

--
Best regards,
Oleh Kravchenko

--

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-developers

Reply via email to