anko-intel opened a new issue #18091: config/linux.cmake  - misleading comment 
about setting Debug build
URL: https://github.com/apache/incubator-mxnet/issues/18091
 
 
   ## Description
   Uncommenting the second line below from config.cmake file:
   ```
   # Uncomment the following line to compile with debug information
   # set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMake build type") 
   ```
   
   doesn't switch compilation to Debug type. Release library is produced 
instead.
   
   ## To Reproduce
   Follow the instruction: [Installing MXNet from source on 
Ubuntu](https://mxnet.apache.org/get_started/ubuntu_setup):
   1. 
   `cp config/linux.cmake config.cmake`
   2. 
   uncomment line in config.cmake:
   [# set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMake build type") 
](https://github.com/apache/incubator-mxnet/blob/master/config/linux.cmake#L84) 
   3. 
   ```
   rm -rf build
   mkdir -p build && cd build
   cmake -GNinja ..
   ```
   it produces:
   ```
   -- The C compiler identification is GNU 7.5.0
   -- The CXX compiler identification is GNU 7.5.0
   -- Check for working C compiler: /usr/lib/ccache/cc
   -- Check for working C compiler: /usr/lib/ccache/cc -- works
   -- Detecting C compiler ABI info
   -- Detecting C compiler ABI info - done
   -- Detecting C compile features
   -- Detecting C compile features - done
   -- Check for working CXX compiler: /usr/lib/ccache/c++
   -- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
   -- Detecting CXX compiler ABI info
   -- Detecting CXX compiler ABI info - done
   -- Detecting CXX compile features
   -- Detecting CXX compile features - done
   -- CMAKE_CROSSCOMPILING FALSE
   -- CMAKE_HOST_SYSTEM_PROCESSOR x86_64
   -- CMAKE_SYSTEM_PROCESSOR x86_64
   -- CMAKE_SYSTEM_NAME Linux
   -- CMake version '3.14.0' using generator 'Ninja'
   -- Performing Test SUPPORT_CXX11
   -- Performing Test SUPPORT_CXX11 - Success
   -- Performing Test SUPPORT_CXX0X
   -- Performing Test SUPPORT_CXX0X - Success
   -- CMAKE_BUILD_TYPE is unset, defaulting to Release
   ...
   ```
   
   ## What have you tried to solve it?
   
   Setting CMAKE_BUILD_TYPE from the command line works properly:
   `cmake -DCMAKE_BUILD_TYPE=Debug -GNinja ..`
   
   ## Environment
   ```
   cmake --version
   cmake version 3.14.0
   uname --s -r -v -m -p -i -o
   Linux 5.3.0-45-generic #37~18.04.1-Ubuntu SMP Fri Mar 27 15:58:10 UTC 2020 
x86_64 x86_64 x86_64 GNU/Linux
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to